linux-stable-rt/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
Kconfig
Makefile
capability.c
commoncap.c [PATCH] make cap_ptrace enforce PTRACE_TRACME checks 2006-03-25 08:22:56 -08:00
dummy.c Merge branch 'audit.b3' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current 2006-03-25 09:24:53 -08:00
inode.c
root_plug.c
seclvl.c
security.c [PATCH] refactor capable() to one implementation, add __capable() helper 2006-03-25 08:22:56 -08:00