1. 13 Jul, 2009 1 commit
  2. 12 Jul, 2009 2 commits
    • Julien Tinnes's avatar
      personality handling: fix PER_CLEAR_ON_SETID for security reasons · b3a633c8
      Julien Tinnes authored
      We have found that the current PER_CLEAR_ON_SETID mask on Linux
      doesn't include neither ADDR_COMPAT_LAYOUT, nor MMAP_PAGE_ZERO.
      
      The current mask is READ_IMPLIES_EXEC|ADDR_NO_RANDOMIZE.
      
      We believe it is important to add MMAP_PAGE_ZERO, because by using
      this personality it is possible to have the first page mapped inside a
      process running as setuid root. This could be used in those scenarios:
      
      - Exploiting a NULL pointer dereference issue in a setuid root binary
      - Bypassing the mmap_min_addr restrictions of the Linux kernel: by
      running a setuid binary that would drop privileges before giving us
      control back (for instance by loading a user-supplied library), we
      could get the first page mapped in a process we control. By further
      using mremap and mprotect on this mapping, we can then completely
      bypass the mmap_min_addr restrictions.
      
      Less importantly, we believe ADDR_COMPAT_LAYOUT should also be added
      since on x86 32bits it will in practice disable most of the address
      space layout randomization (only the stack will remain randomized).
      Signed-off-by: default avatarJulien Tinnes <jt@cr0.org>
      Signed-off-by: default avatarTavis Ormandy <taviso@sdf.lonestar.org>
      Acked-by: default avatarChristoph Hellwig <hch@infradead.org>
      Acked-by: default avatarKees Cook <kees.cook@canonical.com>
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      b3a633c8
    • Thomas Liu's avatar
      SELinux: Convert avc_audit to use lsm_audit.h · 8113a8d8
      Thomas Liu authored
      Convert avc_audit in security/selinux/avc.c to use lsm_audit.h,
      for better maintainability and for less code duplication.
      
       - changed selinux to use common_audit_data instead of
         avc_audit_data
       - eliminated code in avc.c and used code from lsm_audit.h instead.
      
      I have tested to make sure that the avcs look the same before and
      after this patch.
      Signed-off-by: default avatarThomas Liu <tliu@redhat.com>
      Acked-by: default avatarEric Paris <eparis@redhat.com>
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      8113a8d8
  3. 09 Jul, 2009 3 commits
  4. 29 Jun, 2009 19 commits
  5. 28 Jun, 2009 15 commits