Re: [PATCH v2 4/6] KEYS: Prevent overflow of quota in key_alloc()

From: Eric Biggers

Date: Mon Oct 19 2026 - 15:28:58 EST


On Mon, Oct 19, 2026 at 09:17:24PM +0300, Jarkko Sakkinen wrote:
> Check that the calculated quota length does not go over INT_MAX.
>
> Cc: stable@xxxxxxxxxxxxxxx
> Assisted-by: LLM
> Fixes: 7e047ef5fe2d ("[PATCH] keys: sort out key quota system")
> Reviewed-by: David Howells <dhowells@xxxxxxxxxx>
> Signed-off-by: Jarkko Sakkinen <jarkko@xxxxxxxxxx>

Seems this should be merged into patch 3?

Also is this reachable? I.e. do any of the key types actually specify
def_datalen > INT_MAX - KEY_MAX_DESC_SIZE + 1?

- Eric