linux_dsm_epyc7002/security/keys
David Howells 94efe72f76 [PATCH] Destruction of failed keyring oopses
The attached patch makes sure that a keyring that failed to instantiate
properly is destroyed without oopsing [CAN-2005-2099].

The problem occurs in three stages:

 (1) The key allocator initialises the type-specific data to all zeroes. In
     the case of a keyring, this will become a link in the keyring name list
     when the keyring is instantiated.

 (2) If a user (any user) attempts to add a keyring with anything other than
     an empty payload, the keyring instantiation function will fail with an
     error and won't add the keyring to the name list.

 (3) The keyring's destructor then sees that the keyring has a description
     (name) and tries to remove the keyring from the name list, which oopses
     because the link pointers are both zero.

This bug permits any user to take down a box trivially.

Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-04 13:11:14 -07:00
..
compat.c [PATCH] Keys: Make request-key create an authorisation key 2005-06-24 00:05:19 -07:00
internal.h [PATCH] Keys: Make request-key create an authorisation key 2005-06-24 00:05:19 -07:00
key.c [PATCH] RCU: clean up a few remaining synchronize_kernel() calls 2005-06-25 16:24:38 -07:00
keyctl.c [PATCH] Keys: Fix key management syscall interface bugs 2005-08-04 08:20:47 -07:00
keyring.c [PATCH] Destruction of failed keyring oopses 2005-08-04 13:11:14 -07:00
Makefile [PATCH] Keys: Make request-key create an authorisation key 2005-06-24 00:05:19 -07:00
proc.c [PATCH] keys: Discard key spinlock and use RCU for key payload 2005-06-24 00:05:18 -07:00
process_keys.c [PATCH] Error during attempt to join key management session can leave semaphore pinned 2005-08-04 13:11:14 -07:00
request_key_auth.c [PATCH] Keys: Make request-key create an authorisation key 2005-06-24 00:05:19 -07:00
request_key.c [PATCH] Keys: Fix key management syscall interface bugs 2005-08-04 08:20:47 -07:00
user_defined.c [PATCH] eCryptfs: export user key type 2005-06-24 00:05:19 -07:00