linux_dsm_epyc7002/security/keys
David Howells 9ad0830f30 [PATCH] Keys: Fix key serial number collision handling
Fix the key serial number collision avoidance code in key_alloc_serial().

This didn't use to be so much of a problem as the key serial numbers were
allocated from a simple incremental counter, and it would have to go through
two billion keys before it could possibly encounter a collision.  However, now
that random numbers are used instead, collisions are much more likely.

This is fixed by finding a hole in the rbtree where the next unused serial
number ought to be and using that by going almost back to the top of the
insertion routine and redoing the insertion with the new serial number rather
than trying to be clever and attempting to work out the insertion point
pointer directly.

This fixes kernel BZ .

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-06 14:45:00 -08:00
..
compat.c [PATCH] keys: Permit running process to instantiate keys 2006-01-08 20:13:53 -08:00
internal.h [PATCH] Keys: Allow in-kernel key requestor to pass auxiliary data to upcaller 2006-06-29 10:26:20 -07:00
key.c [PATCH] Keys: Fix key serial number collision handling 2007-02-06 14:45:00 -08:00
keyctl.c [PATCH] Keys: Allow in-kernel key requestor to pass auxiliary data to upcaller 2006-06-29 10:26:20 -07:00
keyring.c [PATCH] security/keys/*: user kmemdup() 2006-12-07 08:39:25 -08:00
Makefile [PATCH] Keys: Split key permissions checking into a .c file 2005-10-08 14:53:31 -07:00
permission.c [PATCH] keys: Permit running process to instantiate keys 2006-01-08 20:13:53 -08:00
proc.c [PATCH] keys: restrict contents of /proc/keys to Viewable keys 2006-06-26 09:58:18 -07:00
process_keys.c [PATCH] lockdep: name some old style locks 2006-12-07 08:39:36 -08:00
request_key_auth.c [PATCH] keys: sort out key quota system 2006-06-26 09:58:18 -07:00
request_key.c [PATCH] Keys: Allow in-kernel key requestor to pass auxiliary data to upcaller 2006-06-29 10:26:20 -07:00
user_defined.c [PATCH] keys: discard the contents of a key on revocation 2006-06-26 09:58:18 -07:00