Re: [PATCH 6.1/6.6/6.12.y] crypto: rsa-pkcs1pad: Don't WARN on an empty digest
From: Sasha Levin
Date: Tue Jul 21 2026 - 21:00:39 EST
> KEYCTL_PKEY_VERIFY lets an unprivileged caller supply a zero-length
> digest (in_len == 0). keyctl_pkey_params_get_2() accepts the zero
> length and the request reaches pkcs1pad_verify(), where the empty
> digest is rejected but only after being passed through
> WARN_ON(!digest_size).
[...]
> Mainline does not contain this code path; commit 1e562deacecc
> ("crypto: rsassa-pkcs1 - Migrate to sig_alg backend") removed
> pkcs1pad_verify() in v6.13-rc1. This is a minimal fix for the
> affected stable branches.
The fix looks correct to me and matches the mainline end state (the
sig_alg replacement rejects an empty digest with a plain -EINVAL and
no WARN). But since this is a stable-only patch with no upstream
commit to reference, I'd like a crypto maintainer ack before queueing
it.
--
Thanks,
Sasha