]> www.infradead.org Git - users/jedix/linux-maple.git/commit
crypto: shash - Fix buffer overrun in import function
authorHerbert Xu <herbert@gondor.apana.org.au>
Mon, 26 May 2025 08:56:46 +0000 (16:56 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 27 May 2025 05:43:32 +0000 (13:43 +0800)
commit0a84874c7e7dde5cdddc80a82093120e924a348b
tree375258bee154e1288056eb10860a9f8ca6fd3ae0
parent2297554f01df6d3d4e98a3915c183ce3e491740a
crypto: shash - Fix buffer overrun in import function

Only set the partial block length to zero if the algorithm is
block-only.  Otherwise the descriptor context could be empty,
e.g., for digest_null.

Reported-by: syzbot+4851c19615d35f0e4d68@syzkaller.appspotmail.com
Fixes: 7650f826f7b2 ("crypto: shash - Handle partial blocks in API")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/shash.c