summaryrefslogtreecommitdiff
path: root/crypto/algif_aead.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-12-11 16:32:45 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-12-11 16:32:45 -0800
commit479a1006060c7452064ee0c83b25c7e648c479aa (patch)
tree56210bc618bbd39835402a583f5bd9b41c191989 /crypto/algif_aead.c
parent8dce1988dfaa3668372990f05ee2202d9d9521b5 (diff)
parent2bc89034e4e02fff5b5375dd7ecff41dd0e0f3eb (diff)
downloadlinux-crypto-479a1006060c7452064ee0c83b25c7e648c479aa.tar.gz
linux-crypto-479a1006060c7452064ee0c83b25c7e648c479aa.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 push fixes the following issues: - buffer overread in RSA - potential use after free in algif_aead. - error path null pointer dereference in af_alg - forbid combinations such as hmac(hmac(sha3)) which may crash - crash in salsa20 due to incorrect API usage" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: salsa20 - fix blkcipher_walk API usage crypto: hmac - require that the underlying hash algorithm is unkeyed crypto: af_alg - fix NULL pointer dereference in crypto: algif_aead - fix reference counting of null skcipher crypto: rsa - fix buffer overread when stripping leading zeroes
Diffstat (limited to 'crypto/algif_aead.c')
-rw-r--r--crypto/algif_aead.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/algif_aead.c b/crypto/algif_aead.c
index 805f485d..48b34e9c 100644
--- a/crypto/algif_aead.c
+++ b/crypto/algif_aead.c
@@ -503,6 +503,7 @@ static void aead_release(void *private)
struct aead_tfm *tfm = private;
crypto_free_aead(tfm->aead);
+ crypto_put_default_null_skcipher2();
kfree(tfm);
}
@@ -535,7 +536,6 @@ static void aead_sock_destruct(struct sock *sk)
unsigned int ivlen = crypto_aead_ivsize(tfm);
af_alg_pull_tsgl(sk, ctx->used, NULL, 0);
- crypto_put_default_null_skcipher2();
sock_kzfree_s(sk, ctx->iv, ivlen);
sock_kfree_s(sk, ctx, ctx->len);
af_alg_release_parent(sk);