diff options
author | Sabrina Dubroca <sd@queasysnail.net> | 2018-09-12 17:44:42 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-09-13 12:03:47 -0700 |
commit | 86029d10af18381814881d6cce2dd6872163b59f (patch) | |
tree | ca14c5fa1d55c1b5833e225571ed0aee777715cb /net/tls/tls_device_fallback.c | |
parent | 7cba09c6d5bc73ebbd25a353742d9ddb7a713b95 (diff) | |
download | linux-86029d10af18381814881d6cce2dd6872163b59f.tar.bz2 |
tls: zero the crypto information from tls_context before freeing
This contains key material in crypto_send_aes_gcm_128 and
crypto_recv_aes_gcm_128.
Introduce union tls_crypto_context, and replace the two identical
unions directly embedded in struct tls_context with it. We can then
use this union to clean up the memory in the new tls_ctx_free()
function.
Fixes: 3c4d7559159b ("tls: kernel TLS support")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tls/tls_device_fallback.c')
-rw-r--r-- | net/tls/tls_device_fallback.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tls/tls_device_fallback.c b/net/tls/tls_device_fallback.c index 6102169239d1..450a6dbc5a88 100644 --- a/net/tls/tls_device_fallback.c +++ b/net/tls/tls_device_fallback.c @@ -320,7 +320,7 @@ static struct sk_buff *tls_enc_skb(struct tls_context *tls_ctx, goto free_req; iv = buf; - memcpy(iv, tls_ctx->crypto_send_aes_gcm_128.salt, + memcpy(iv, tls_ctx->crypto_send.aes_gcm_128.salt, TLS_CIPHER_AES_GCM_128_SALT_SIZE); aad = buf + TLS_CIPHER_AES_GCM_128_SALT_SIZE + TLS_CIPHER_AES_GCM_128_IV_SIZE; |