]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
crypto: ahash - Zero positive err value in ahash_update_finish
authorHerbert Xu <herbert@gondor.apana.org.au>
Fri, 21 Nov 2025 05:54:20 +0000 (13:54 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 13:03:12 +0000 (14:03 +0100)
commitfd9c3a1c963f4bb92435df4fd538d917023aed86
tree528be28c3991f4dbc1b0dd81c3fe7fa39e5ef634
parentaa9dc3d80dd588c94f1abe9b9fa50576f2dd0ff6
crypto: ahash - Zero positive err value in ahash_update_finish

[ Upstream commit ebbdf6466b30e3b37f3b360826efd21f0633fb9e ]

The partial block length returned by a block-only driver should
not be passed up to the caller since ahash itself deals with the
partial block data.

Set err to zero in ahash_update_finish if it was positive.

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