From: Greg Kroah-Hartman Date: Sat, 30 May 2026 10:38:58 +0000 (+0200) Subject: 6.6-stable patches X-Git-Tag: v5.10.258~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ecab9520494383dfef8c96776418e07ae74dfe78;p=thirdparty%2Fkernel%2Fstable-queue.git 6.6-stable patches added patches: security-keys-fix-missed-rcu-read-section-on-lookup.patch --- diff --git a/queue-6.6/security-keys-fix-missed-rcu-read-section-on-lookup.patch b/queue-6.6/security-keys-fix-missed-rcu-read-section-on-lookup.patch new file mode 100644 index 0000000000..a28ca2ebfa --- /dev/null +++ b/queue-6.6/security-keys-fix-missed-rcu-read-section-on-lookup.patch @@ -0,0 +1,43 @@ +From 43a1e3744548e6fd85873e6fb43e293eb4010694 Mon Sep 17 00:00:00 2001 +From: Linus Torvalds +Date: Thu, 28 May 2026 11:45:41 -0700 +Subject: security/keys: fix missed RCU read section on lookup + +From: Linus Torvalds + +commit 43a1e3744548e6fd85873e6fb43e293eb4010694 upstream. + +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 +Cc: David Howells +Cc: Jarkko Sakkinen +Cc: Paul Moore +Cc: James Morris James Morris +Cc: Serge E. Hallyn +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman +--- + security/keys/keyring.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/security/keys/keyring.c ++++ b/security/keys/keyring.c +@@ -1109,6 +1109,7 @@ key_ref_t find_key_to_update(key_ref_t k + kenter("{%d},{%s,%s}", + keyring->serial, index_key->type->name, index_key->description); + ++ guard(rcu)(); + object = assoc_array_find(&keyring->keys, &keyring_assoc_array_ops, + index_key); + diff --git a/queue-6.6/series b/queue-6.6/series index f040a0ab30..37f8053706 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -184,3 +184,4 @@ pds_core-add-an-error-code-check-in-pdsc_dl_info_get.patch pds_core-ensure-null-termination-for-firmware-versio.patch net-gro-don-t-merge-zcopy-skbs.patch loongarch-kprobes-fix-handling-of-fatal-unrecoverabl.patch +security-keys-fix-missed-rcu-read-section-on-lookup.patch