]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
crypto: ahash - Fix crypto_ahash_import with partial block data
authorHerbert Xu <herbert@gondor.apana.org.au>
Fri, 21 Nov 2025 05:36:03 +0000 (13:36 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 24 Nov 2025 09:52:30 +0000 (17:52 +0800)
commitb0356b75f42fde15d4be268c5891f2cee6eb65bf
tree34ca03ca86e96f8dd5267e5f23ff132fd26a74f0
parent80b61046b6899c6e881ff191aa99256d8e43cd58
crypto: ahash - Fix crypto_ahash_import with partial block data

Restore the partial block buffer in crypto_ahash_import by copying
it.  Check whether the partial block buffer exceeds the maximum
size and return -EOVERFLOW if it does.

Zero the partial block buffer in crypto_ahash_import_core.

Reported-by: T Pratham <t-pratham@ti.com>
Tested-by: T Pratham <t-pratham@ti.com>
Fixes: 9d7a0ab1c753 ("crypto: ahash - Handle partial blocks in API")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/ahash.c