diff options
author | Stephan Mueller <smueller@chronox.de> | 2014-11-10 23:37:57 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2014-11-12 09:14:31 -0500 |
commit | e1bd95bf7c25530a99ce371e0a26e4932efc021d (patch) | |
tree | d398358707325a4677c8ba46d06f5335c9e5b1d1 | |
parent | 2a6af25befd0197e805b3aa5ebfc253079ce7136 (diff) |
crypto: algif - zeroize IV buffer
Zeroize the buffer holding the IV used for the completed
cipher operation before the buffer is released by the
skcipher AF_ALG interface handler.
Signed-off-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r-- | crypto/algif_skcipher.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.c index 83187f497c7c..85e3bdbe214c 100644 --- a/crypto/algif_skcipher.c +++ b/crypto/algif_skcipher.c | |||
@@ -566,6 +566,7 @@ static void skcipher_sock_destruct(struct sock *sk) | |||
566 | struct crypto_ablkcipher *tfm = crypto_ablkcipher_reqtfm(&ctx->req); | 566 | struct crypto_ablkcipher *tfm = crypto_ablkcipher_reqtfm(&ctx->req); |
567 | 567 | ||
568 | skcipher_free_sgl(sk); | 568 | skcipher_free_sgl(sk); |
569 | memzero_explicit(ctx->iv, crypto_ablkcipher_ivsize(tfm)); | ||
569 | sock_kfree_s(sk, ctx->iv, crypto_ablkcipher_ivsize(tfm)); | 570 | sock_kfree_s(sk, ctx->iv, crypto_ablkcipher_ivsize(tfm)); |
570 | sock_kfree_s(sk, ctx, ctx->len); | 571 | sock_kfree_s(sk, ctx, ctx->len); |
571 | af_alg_release_parent(sk); | 572 | af_alg_release_parent(sk); |