Re: [PATCH] stable: crypto: sha256 - fix crash at kexec

From: Breno Leitao
Date: Wed Oct 01 2025 - 12:45:28 EST


Hello Eric,

On Wed, Oct 01, 2025 at 09:23:05AM -0700, Eric Biggers wrote:

> This looks fine, but technically 'unsigned int' would be more
> appropriate here, given the context. If we look at the whole function
> in 6.12, we can see that it took an 'unsigned int' length:

Ack. Do you want me to send a v2 with `unsigned int` instead?

> This also suggests that files with lengths greater than UINT_MAX are
> still broken. Is that okay?

I've tested it but kexec fails to load it, so, it seems we are safe
here:

# kexec --load kernel --initrd foo
kexec_file_load failed: File too large

> Anyway, I'm glad that I fixed all these functions to use size_t lengths
> in newer kernels...

Thanks for that!
--breno