kernel-ark/security
David Howells c3a9d6541f [Security] Keys: Fix oops when adding key to non-keyring
This fixes the problem of an oops occuring when a user attempts to add a
key to a non-keyring key [CVE-2006-1522].

The problem is that __keyring_search_one() doesn't check that the
keyring it's been given is actually a keyring.

I've fixed this problem by:

 (1) declaring that caller of __keyring_search_one() must guarantee that
     the keyring is a keyring; and

 (2) making key_create_or_update() check that the keyring is a keyring,
     and return -ENOTDIR if it isn't.

This can be tested by:

	keyctl add user b b `keyctl add user a a @s`

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-10 09:33:46 -07:00
..
keys [Security] Keys: Fix oops when adding key to non-keyring 2006-04-10 09:33:46 -07:00
selinux [SELINUX] Fix build after ipsec decap state changes. 2006-04-09 12:35:53 -07:00
capability.c
commoncap.c
dummy.c
inode.c
Kconfig
Makefile
root_plug.c
seclvl.c
security.c