CVE-2026-143182: KEYS: Verify the key identity in __key_unlink_begin
In the Linux kernel, the following vulnerability has been resolved:
KEYS: Verify the key identity in keyunlinkbegin
When two keys have identical type and description, linking the second key replaces the first in a keyring. However, attempting to unlink the first key (no longer in the keyring) unlinks the second key.
This happens because keyunlinkbegin() calls assocarraydelete() with &key->indexkey, matching only on type and description rather than the key's identity.
Example:
keyctl newsession >/dev/null keyctl newring ringa @s keyctl newring ringb @s A=$(keyctl add user A ss %:ringa) B=$(keyctl add user A qq %:ringb) keyctl newring R @s keyctl link $A %:R keyctl link $B %:R keyctl unlink $A %:R keyctl show
Verify the key identity before unlinking, and return -ENOENT on mismatch, instead of unlinking the key with the wrong identity.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.10.276 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.15.227 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.120 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.66 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.7
Event History
Frequently Asked Questions
What conditions are required to trigger the incorrect unlink behavior?
A keyring must contain a replacement key with the same key type and description as an earlier key. An attempt to unlink the earlier key after it has been replaced can remove the replacement key instead.
What is the observable impact of a failed unlink attempt?
Instead of reporting that the requested key is absent from the keyring, the vulnerable behavior can unlink a different key that has the same type and description. The resolved behavior verifies key identity and returns -ENOENT when the requested key does not match.
How can an administrator determine whether this scenario may affect a workload?
Review workloads that create or link keys with duplicate type and description values in the same keyring, then unlink an older key after a newer matching key has replaced it. The example uses two user keys both named A, linked sequentially into the same keyring.