mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 04:34:08 +08:00
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>
This commit is contained in:
parent
2a6af25bef
commit
e1bd95bf7c
@ -566,6 +566,7 @@ static void skcipher_sock_destruct(struct sock *sk)
|
|||||||
struct crypto_ablkcipher *tfm = crypto_ablkcipher_reqtfm(&ctx->req);
|
struct crypto_ablkcipher *tfm = crypto_ablkcipher_reqtfm(&ctx->req);
|
||||||
|
|
||||||
skcipher_free_sgl(sk);
|
skcipher_free_sgl(sk);
|
||||||
|
memzero_explicit(ctx->iv, crypto_ablkcipher_ivsize(tfm));
|
||||||
sock_kfree_s(sk, ctx->iv, crypto_ablkcipher_ivsize(tfm));
|
sock_kfree_s(sk, ctx->iv, crypto_ablkcipher_ivsize(tfm));
|
||||||
sock_kfree_s(sk, ctx, ctx->len);
|
sock_kfree_s(sk, ctx, ctx->len);
|
||||||
af_alg_release_parent(sk);
|
af_alg_release_parent(sk);
|
||||||
|
Loading…
Reference in New Issue
Block a user