CVE-2026-143182
KEYS: Verify the key identity in __key_unlink_begin
- Severity
- unscored
- Affects
- Linux
- Published
- 3 December 2026 by Linux
- First seen on our lists
- 3 December 2026
In the Linux kernel, the following vulnerability has been resolved:
KEYS: Verify the key identity in __key_unlink_begin
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 __key_unlink_begin() calls assoc_array_delete() with
&key->index_key, matching only on type and description rather than the
key's identity.
Example:
keyctl new_session >/dev/null
keyctl newring ring_a @s
keyctl newring ring_b @s
A=$(keyctl add user A ss %:ring_a)
B=$(keyctl add user A qq %:ring_b)
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.
Our coverage
We have not written about this one. Know why it matters? Send a tip.