diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-06-06 13:10:49 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-06-06 13:10:49 -0700 |
commit | 9e2828a6ead4f04635d0af11e9797934e5e934f5 (patch) | |
tree | c12203723c7264b150f841d4f04e8db540f54ed1 /crypto/hmac.c | |
parent | fa3dc36db2c62746336c4d5b138871ae8e8507ec (diff) | |
parent | a4f353ef678a3e189bba959cb57e8542ad588898 (diff) | |
download | linux-crypto-9e2828a6ead4f04635d0af11e9797934e5e934f5.tar.gz linux-crypto-9e2828a6ead4f04635d0af11e9797934e5e934f5.zip |
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu:
"This fixes a regression that breaks the jitterentropy RNG and a
potential memory leak in hmac"
* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
crypto: hmac - fix memory leak in hmac_init_tfm()
crypto: jitterentropy - change back to module_init()
Diffstat (limited to '')
-rw-r--r-- | crypto/hmac.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/hmac.c b/crypto/hmac.c index f03cb321..8b2a212e 100644 --- a/crypto/hmac.c +++ b/crypto/hmac.c @@ -152,8 +152,10 @@ static int hmac_init_tfm(struct crypto_tfm *tfm) parent->descsize = sizeof(struct shash_desc) + crypto_shash_descsize(hash); - if (WARN_ON(parent->descsize > HASH_MAX_DESCSIZE)) + if (WARN_ON(parent->descsize > HASH_MAX_DESCSIZE)) { + crypto_free_shash(hash); return -EINVAL; + } ctx->hash = hash; return 0; |