Re: [RFC PATCH 8/8] KEYS: Verify the key identity in __keyctl_unlink

From: Jarkko Sakkinen

Date: Mon Oct 19 2026 - 13:00:27 EST


On Mon, Oct 19, 2026 at 04:55:13PM +0100, David Howells wrote:
> This will show it:
>
> 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 show
> keyctl link $A %:R
> keyctl show
> keyctl link $B %:R
> keyctl show
> keyctl unlink $A %:R
> keyctl show # R is now incorrectly empty
>
> Reviewed-by: David Howells <dhowells@xxxxxxxxxx>

I'll actually add this to my own test harness, thanks.

I'm a slightly worried of this patch given that you can
technically interpret it as a uapi change. I guess here it
is acceptable, and if a tree falls down, we'll respond
to that.

Br, Jarkko