Skip to content

Commit 9d9b193

Browse files
committed
crypto: hash - Increase HASH_MAX_DESCSIZE for hmac(sha3-224-s390)
The value of HASH_MAX_DESCSIZE is off by one for hmac(sha3-224-s390). Fix this so that hmac(sha3-224-s390) can be registered. Reported-by: Ingo Franzki <ifranzki@linux.ibm.com> Reported-by: Eric Biggers <ebiggers@kernel.org> Fixes: 6f90ba7 ("crypto: s390/sha3 - Use API partial block handling") Cc: <stable@vger.kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent bf24d64 commit 9d9b193

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

include/crypto/hash.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ struct shash_desc {
184184
* Worst case is hmac(sha3-224-s390). Its context is a nested 'shash_desc'
185185
* containing a 'struct s390_sha_ctx'.
186186
*/
187-
#define HASH_MAX_DESCSIZE (sizeof(struct shash_desc) + 360)
187+
#define HASH_MAX_DESCSIZE (sizeof(struct shash_desc) + 361)
188188
#define MAX_SYNC_HASH_REQSIZE (sizeof(struct ahash_request) + \
189189
HASH_MAX_DESCSIZE)
190190

0 commit comments

Comments
 (0)