aboutsummaryrefslogtreecommitdiff
path: root/lib/pm-notifier-error-inject.c
diff options
context:
space:
mode:
authorEric Biggers <[email protected]>2018-03-28 10:57:22 -0700
committerJ. Bruce Fields <[email protected]>2018-04-03 15:08:17 -0400
commitf3aefb6a7066e24bfea7fcf1b07907576de69d63 (patch)
treed9c68f712e66b11ab0073c87cbc22b58f2e073f2 /lib/pm-notifier-error-inject.c
parent38a70315599dedacd9ff3bd1016f9048c9d0ad12 (diff)
sunrpc: remove incorrect HMAC request initialization
make_checksum_hmac_md5() is allocating an HMAC transform and doing crypto API calls in the following order: crypto_ahash_init() crypto_ahash_setkey() crypto_ahash_digest() This is wrong because it makes no sense to init() the request before a key has been set, given that the initial state depends on the key. And digest() is short for init() + update() + final(), so in this case there's no need to explicitly call init() at all. Before commit 9fa68f620041 ("crypto: hash - prevent using keyed hashes without setting key") the extra init() had no real effect, at least for the software HMAC implementation. (There are also hardware drivers that implement HMAC-MD5, and it's not immediately obvious how gracefully they handle init() before setkey().) But now the crypto API detects this incorrect initialization and returns -ENOKEY. This is breaking NFS mounts in some cases. Fix it by removing the incorrect call to crypto_ahash_init(). Reported-by: Michael Young <[email protected]> Fixes: 9fa68f620041 ("crypto: hash - prevent using keyed hashes without setting key") Fixes: fffdaef2eb4a ("gss_krb5: Add support for rc4-hmac encryption") Cc: [email protected] Signed-off-by: Eric Biggers <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
Diffstat (limited to 'lib/pm-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions