Files
erofs-linux/security/keys
Linus Torvalds 43a1e37445 security/keys: fix missed RCU read section on lookup
Nicholas Carlini reports that the keyring code calls assoc_array_find()
in find_key_to_update() without holding the RCU read lock, while the
assoc_array_gc() code really is designed around removing the node from
the tree and then freeing it after an RCU grace-period.

The regular key handling doesn't see this because holding the keyring
semaphore hides any lifetime issues, but the persistent key handling
uses a different model.

Instead of extending the keyring locking, just do the simple RCU locking
that the assoc_array was designed for.

Reported-by: Nicholas Carlini <[email protected]>
Cc: David Howells <[email protected]>
Cc: Jarkko Sakkinen <[email protected]>
Cc: Paul Moore <[email protected]>
Cc: James Morris James Morris <[email protected]>
Cc: Serge E. Hallyn <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2026-05-28 11:45:41 -07:00
..
…
…
2025-06-11 11:57:14 -07:00
…
2025-11-04 12:36:02 +01:00