crypto: s390/sha512 - Fix sha512 state size
authorHerbert Xu <herbert@gondor.apana.org.au>
Tue, 29 Apr 2025 09:12:30 +0000 (17:12 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 30 Apr 2025 02:49:20 +0000 (10:49 +0800)
commit5b39aa368bcfe193666ad4a68ef55f41dfd74028
tree6d55cf9149ea73605c63713f677c7f241c8d7a17
parent2dfc7cd74a5e062a5405560447517e7aab1c7341
crypto: s390/sha512 - Fix sha512 state size

The sha512 state size in s390_sha_ctx is out by a factor of 8,
fix it so that it stays below HASH_MAX_DESCSIZE.  Also fix the
state init function which was writing garbage to the state.  Luckily
this is not actually used for anything other than export.

Reported-by: Harald Freudenberger <freude@linux.ibm.com>
Fixes: 572b5c4682c7 ("crypto: s390/sha512 - Use API partial block handling")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/s390/crypto/sha.h
arch/s390/crypto/sha512_s390.c