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 <[email protected]> Reported-by: Eric Biggers <[email protected]> Fixes: 6f90ba7 ("crypto: s390/sha3 - Use API partial block handling") Cc: <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent bf24d64 commit 9d9b193

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)