[PATCH v2 6/6] KEYS: Verify the key identity in __keyctl_unlink

Eric Biggers ebiggers at kernel.org
Mon Oct 19 19:35:02 UTC 2026


On Mon, Oct 19, 2026 at 09:17:26PM +0300, Jarkko Sakkinen wrote:
> [PATCH v2 6/6] KEYS: Verify the key identity in __keyctl_unlink

There is no __keyctl_unlink.  Seems you mean __key_unlink_begin.

> Let's define the following preconditions:
> 
> - Two keys: A and B.
> - R is a keyring.
> - Both have the same type/description/domain.
> 
> Then:
> 
> 1. KEYCTL_LINK(A, R) => {A}
> 1. KEYCTL_LINK(B, R) => {B}
> 2. KEYCTL_UNLINK(A, R) => {}

Should be 1, 2, and 3?

> Instead, verify key tidentity before unlinking, and return -ENOENT on

tidentity => identity

Also should explicitly say what the bug is.

- Eric



More information about the Linux-security-module-archive mailing list