linux/security
David Howells 34574dd10b keys: Handle there being no fallback destination keyring for request_key()
When request_key() is called, without there being any standard process
keyrings on which to fall back if a destination keyring is not specified, an
oops is liable to occur when construct_alloc_key() calls down_write() on
dest_keyring's semaphore.

Due to function inlining this may be seen as an oops in down_write() as called
from request_key_and_link().

This situation crops up during boot, where request_key() is called from within
the kernel (such as in CIFS mounts) where nobody is actually logged in, and so
PAM has not had a chance to create a session keyring and user keyrings to act
as the fallback.

To fix this, make construct_alloc_key() not attempt to cache a key if there is
no fallback key if no destination keyring is given specifically.

Signed-off-by: David Howells <dhowells@redhat.com>
Tested-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-09 10:41:19 -07:00
..
integrity/ima
keys keys: Handle there being no fallback destination keyring for request_key() 2009-04-09 10:41:19 -07:00
selinux
smack smack: Add a new '-CIPSO' option to the network address label configuration 2009-03-28 15:01:37 +11:00
tomoyo tomoyo: remove "undelete domain" command. 2009-04-07 16:08:56 +10:00
Kconfig
Makefile
capability.c
commoncap.c cap_prctl: don't set error to 0 at 'no_change' 2009-04-09 09:12:03 +10:00
device_cgroup.c devcgroup: avoid using cgroup_lock 2009-04-02 19:04:55 -07:00
inode.c
root_plug.c
security.c CacheFiles: Export things for CacheFiles 2009-04-03 16:42:40 +01:00