HASH_MAX_DESCSIZE warn_on on init tfm with HMAC template

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,

We have observed self test failure with hmac(versal-sha3-384) in
init_tfm callback.

[   14.672021] WARNING: CPU: 1 PID: 578 at crypto/shash.c:495
crypto_shash_init_tfm+0xac/0xd0

In init_tfm ("versal-sha3-384") we increase the descsize with
crypto_shash_descsize("sha3-384-generic") . When HMAC template is
enabled, it add 8 more bytes in descsize and reports warn_on because
descsize is 376 which is greater than 368 (HASH_MAX_DESCSIZE).

HMAC            versal-sha3-384         sha3-384-generic
    8         +              8                 +            360           = 376

What should be the preferred fix for this.
1. Increase the size of HASH_MAX_DESCSIZE macro by 8.
2. Register "versal-sha3-384" as ahash algo.


Thanks & Regards
Harsh Jain




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux