[PATCH v3] keys: Protect the update method check against type removal

Eric Biggers ebiggers at kernel.org
Sun Nov 1 22:15:19 UTC 2026


On Sat, Oct 31, 2026 at 05:26:36PM +0800, Cen Zhang wrote:
> Take key->sem before the first access to key->type and hold it until
> the preparsed payload has been freed. Once a key exists, only the GC
> changes key->type, and it does so with key->sem held for writing.

Reviewed-by: Eric Biggers <ebiggers at kernel.org>

But it seems broken that a key type can be removed while keys of that
type still exist.

- Eric



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