1. 06 5月, 2010 2 次提交
  2. 05 5月, 2010 4 次提交
  3. 29 4月, 2010 1 次提交
    • S
      selinux: generalize disabling of execmem for plt-in-heap archs · fcaaade1
      Stephen Smalley 提交于
      On Tue, 2010-04-27 at 11:47 -0700, David Miller wrote:
      > From: "Tom \"spot\" Callaway" <tcallawa@redhat.com>
      > Date: Tue, 27 Apr 2010 14:20:21 -0400
      >
      > > [root@apollo ~]$ cat /proc/2174/maps
      > > 00010000-00014000 r-xp 00000000 fd:00 15466577
      > >  /sbin/mingetty
      > > 00022000-00024000 rwxp 00002000 fd:00 15466577
      > >  /sbin/mingetty
      > > 00024000-00046000 rwxp 00000000 00:00 0
      > >  [heap]
      >
      > SELINUX probably barfs on the executable heap, the PLT is in the HEAP
      > just like powerpc32 and that's why VM_DATA_DEFAULT_FLAGS has to set
      > both executable and writable.
      >
      > You also can't remove the CONFIG_PPC32 ifdefs in selinux, since
      > because of the VM_DATA_DEFAULT_FLAGS setting used still in that arch,
      > the heap will always have executable permission, just like sparc does.
      > You have to support those binaries forever, whether you like it or not.
      >
      > Let's just replace the CONFIG_PPC32 ifdef in SELINUX with CONFIG_PPC32
      > || CONFIG_SPARC as in Tom's original patch and let's be done with
      > this.
      >
      > In fact I would go through all the arch/ header files and check the
      > VM_DATA_DEFAULT_FLAGS settings and add the necessary new ifdefs to the
      > SELINUX code so that other platforms don't have the pain of having to
      > go through this process too.
      
      To avoid maintaining per-arch ifdefs, it seems that we could just
      directly use (VM_DATA_DEFAULT_FLAGS & VM_EXEC) as the basis for deciding
      whether to enable or disable these checks.   VM_DATA_DEFAULT_FLAGS isn't
      constant on some architectures but instead depends on
      current->personality, but we want this applied uniformly.  So we'll just
      use the initial task state to determine whether or not to enable these
      checks.
      Signed-off-by: NStephen Smalley <sds@tycho.nsa.gov>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      fcaaade1
  4. 28 4月, 2010 3 次提交
    • D
      keys: the request_key() syscall should link an existing key to the dest keyring · 03449cd9
      David Howells 提交于
      The request_key() system call and request_key_and_link() should make a
      link from an existing key to the destination keyring (if supplied), not
      just from a new key to the destination keyring.
      
      This can be tested by:
      
      	ring=`keyctl newring fred @s`
      	keyctl request2 user debug:a a
      	keyctl request user debug:a $ring
      	keyctl list $ring
      
      If it says:
      
      	keyring is empty
      
      then it didn't work.  If it shows something like:
      
      	1 key in keyring:
      	1070462727: --alswrv     0     0 user: debug:a
      
      then it did.
      
      request_key() system call is meant to recursively search all your keyrings for
      the key you desire, and, optionally, if it doesn't exist, call out to userspace
      to create one for you.
      
      If request_key() finds or creates a key, it should, optionally, create a link
      to that key from the destination keyring specified.
      
      Therefore, if, after a successful call to request_key() with a desination
      keyring specified, you see the destination keyring empty, the code didn't work
      correctly.
      
      If you see the found key in the keyring, then it did - which is what the patch
      is required for.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Cc: James Morris <jmorris@namei.org>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      03449cd9
    • E
      LSM Audit: rename LSM_AUDIT_NO_AUDIT to LSM_AUDIT_DATA_NONE · cb84aa9b
      Eric Paris 提交于
      Most of the LSM common audit work uses LSM_AUDIT_DATA_* for the naming.
      This was not so for LSM_AUDIT_NO_AUDIT which means the generic initializer
      cannot be used.  This patch just renames the flag so the generic
      initializer can be used.
      Signed-off-by: NEric Paris <eparis@redhat.com>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      cb84aa9b
    • D
      keys: don't need to use RCU in keyring_read() as semaphore is held · b59ec78c
      David Howells 提交于
      keyring_read() doesn't need to use rcu_dereference() to access the keyring
      payload as the caller holds the key semaphore to prevent modifications
      from happening whilst the data is read out.
      
      This should solve the following warning:
      
      ===================================================
      [ INFO: suspicious rcu_dereference_check() usage. ]
      ---------------------------------------------------
      security/keys/keyring.c:204 invoked rcu_dereference_check() without protection!
      
      other info that might help us debug this:
      
      rcu_scheduler_active = 1, debug_locks = 0
      1 lock held by keyctl/2144:
       #0:  (&key->sem){+++++.}, at: [<ffffffff81177f7c>] keyctl_read_key+0x9c/0xcf
      
      stack backtrace:
      Pid: 2144, comm: keyctl Not tainted 2.6.34-rc2-cachefs #113
      Call Trace:
       [<ffffffff8105121f>] lockdep_rcu_dereference+0xaa/0xb2
       [<ffffffff811762d5>] keyring_read+0x4d/0xe7
       [<ffffffff81177f8c>] keyctl_read_key+0xac/0xcf
       [<ffffffff811788d4>] sys_keyctl+0x75/0xb9
       [<ffffffff81001eeb>] system_call_fastpath+0x16/0x1b
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      b59ec78c
  5. 27 4月, 2010 1 次提交
  6. 25 4月, 2010 1 次提交
  7. 23 4月, 2010 3 次提交
  8. 22 4月, 2010 1 次提交
  9. 21 4月, 2010 9 次提交
  10. 20 4月, 2010 1 次提交
  11. 15 4月, 2010 1 次提交
  12. 12 4月, 2010 13 次提交