AZL-118280: CVE-2026-143182 affecting package kernel 6.6.161.1-1
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
Event History
Frequently Asked Questions
What conditions are required to trigger the incorrect unlink?
A keyring must contain a replacement key with the same key type and description as another key that was previously linked. An attempt to unlink the original, no-longer-linked key can then remove the replacement key instead.
How can an administrator determine whether the vulnerable behavior is present?
The supplied reproduction creates two user keys with the same description, links them sequentially into a keyring, then unlinks the first key. On an affected system, the unlink operation removes the second key; the resolved behavior verifies identity and returns -ENOENT when the requested key no longer matches the keyring entry.
What is the expected behavior after the fix?
Unlinking a key that has been replaced by another key with the same type and description must not remove the replacement key. The operation returns -ENOENT when the key identity does not match.