Skip to content

Commit 26f8402

Browse files
herbertxgregkh
authored andcommitted
crypto: hash - Increase HASH_MAX_DESCSIZE for hmac(sha3-224-s390)
commit 9d9b193 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 415273f commit 26f8402

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)