summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2025-07-31 09:41:47 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-08-28 16:34:14 +0200
commit26f8402ba28fff6fd6b5c5bfe352641875e58c03 (patch)
tree0d4b3baea2226d3a2dd0851334a84e92644127ef
parent415273fc22bf9a65a27a648229509d998cb6914c (diff)
crypto: hash - Increase HASH_MAX_DESCSIZE for hmac(sha3-224-s390)
commit 9d9b193ed73a65ec47cf1fd39925b09da8216461 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: 6f90ba706551 ("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>
-rw-r--r--include/crypto/hash.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/crypto/hash.h b/include/crypto/hash.h
index db294d452e8c..bbaeae705ef0 100644
--- a/include/crypto/hash.h
+++ b/include/crypto/hash.h
@@ -184,7 +184,7 @@ struct shash_desc {
* Worst case is hmac(sha3-224-s390). Its context is a nested 'shash_desc'
* containing a 'struct s390_sha_ctx'.
*/
-#define HASH_MAX_DESCSIZE (sizeof(struct shash_desc) + 360)
+#define HASH_MAX_DESCSIZE (sizeof(struct shash_desc) + 361)
#define MAX_SYNC_HASH_REQSIZE (sizeof(struct ahash_request) + \
HASH_MAX_DESCSIZE)