]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 13:03:12 +0000 (14:03 +0100)
commitaa9dc3d80dd588c94f1abe9b9fa50576f2dd0ff6
tree7e3c6281154a53a27f1d732df46a234ed6b6ea60
parentce649d74650a9fd7890c2450a58c091103e5790d
crypto: ahash - Fix crypto_ahash_import with partial block data

[ Upstream commit b0356b75f42fde15d4be268c5891f2cee6eb65bf ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
crypto/ahash.c