Skip to content
Snippets Groups Projects
  1. Mar 14, 2010
  2. Mar 03, 2010
  3. Feb 25, 2010
  4. Feb 24, 2010
  5. Feb 23, 2010
    • wzt.wzt@gmail.com's avatar
      Security: add static to security_ops and default_security_ops variable · 189b3b1c
      wzt.wzt@gmail.com authored
      
      Enhance the security framework to support resetting the active security
      module. This eliminates the need for direct use of the security_ops and
      default_security_ops variables outside of security.c, so make security_ops
      and default_security_ops static. Also remove the secondary_ops variable as
      a cleanup since there is no use for that. secondary_ops was originally used by
      SELinux to call the "secondary" security module (capability or dummy),
      but that was replaced by direct calls to capability and the only
      remaining use is to save and restore the original security ops pointer
      value if SELinux is disabled by early userspace based on /etc/selinux/config.
      Further, if we support this directly in the security framework, then we can
      just use &default_security_ops for this purpose since that is now available.
      
      Signed-off-by: default avatarZhitong Wang <zhitong.wangzt@alibaba-inc.com>
      Acked-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      189b3b1c
  6. Feb 21, 2010
  7. Feb 16, 2010
  8. Feb 15, 2010
  9. Feb 14, 2010
  10. Feb 10, 2010
  11. Feb 08, 2010
    • Xiaotian Feng's avatar
      selinux: fix memory leak in sel_make_bools · 8007f102
      Xiaotian Feng authored
      
      In sel_make_bools, kernel allocates memory for bool_pending_names[i]
      with security_get_bools. So if we just free bool_pending_names, those
      memories for bool_pending_names[i] will be leaked.
      
      This patch resolves dozens of following kmemleak report after resuming
      from suspend:
      unreferenced object 0xffff88022e4c7380 (size 32):
        comm "init", pid 1, jiffies 4294677173
        backtrace:
          [<ffffffff810f76b5>] create_object+0x1a2/0x2a9
          [<ffffffff810f78bb>] kmemleak_alloc+0x26/0x4b
          [<ffffffff810ef3eb>] __kmalloc+0x18f/0x1b8
          [<ffffffff811cd511>] security_get_bools+0xd7/0x16f
          [<ffffffff811c48c0>] sel_write_load+0x12e/0x62b
          [<ffffffff810f9a39>] vfs_write+0xae/0x10b
          [<ffffffff810f9b56>] sys_write+0x4a/0x6e
          [<ffffffff81011b82>] system_call_fastpath+0x16/0x1b
          [<ffffffffffffffff>] 0xffffffffffffffff
      
      Signed-off-by: default avatarXiaotian Feng <dfeng@redhat.com>
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      8007f102
  12. Feb 07, 2010
  13. Feb 05, 2010
  14. Feb 04, 2010
  15. Feb 03, 2010
  16. Feb 02, 2010
  17. Jan 26, 2010
  18. Jan 24, 2010
  19. Jan 17, 2010
    • Stephen Smalley's avatar
      selinux: change the handling of unknown classes · 19439d05
      Stephen Smalley authored
      
      If allow_unknown==deny, SELinux treats an undefined kernel security
      class as an error condition rather than as a typical permission denial
      and thus does not allow permissions on undefined classes even when in
      permissive mode.  Change the SELinux logic so that this case is handled
      as a typical permission denial, subject to the usual permissive mode and
      permissive domain handling.
      
      Also drop the 'requested' argument from security_compute_av() and
      helpers as it is a legacy of the original security server interface and
      is unused.
      
      Changes:
      - Handle permissive domains consistently by moving up the test for a
      permissive domain.
      - Make security_compute_av_user() consistent with security_compute_av();
      the only difference now is that security_compute_av() performs mapping
      between the kernel-private class and permission indices and the policy
      values.  In the userspace case, this mapping is handled by libselinux.
      - Moved avd_init inside the policy lock.
      
      Based in part on a patch by Paul Moore <paul.moore@hp.com>.
      
      Reported-by: default avatarAndrew Worsley <amworsley@gmail.com>
      Signed-off-by: default avatarStephen D. Smalley <sds@tycho.nsa.gov>
      Reviewed-by: default avatarPaul Moore <paul.moore@hp.com>
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      19439d05
Loading