[RFC PATCH 5/8] KEYS: Prevent overflow of quota in key_alloc()

David Howells dhowells at redhat.com
Mon Oct 19 15:40:47 UTC 2026


Jarkko Sakkinen <jarkko at kernel.org> wrote:

> -	if (desclen > U16_MAX)

This should also be KEY_MAX_DESC_SIZE.

> +	if (desclen > U16_MAX || type->def_datalen > INT_MAX - desclen - 1)

That looks awkward, but I can see why you did it.

Reviewed-by: David Howells <dhowells at redhat.com>




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