diff options
author | Sabrina Dubroca <sd@queasysnail.net> | 2018-09-12 17:44:43 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-09-13 12:03:47 -0700 |
commit | c844eb46b7d43c2cf760169df5ae1d5b033af338 (patch) | |
tree | 909dc26b18e1ee20e6fcac8936b4bcaa1bfa9eeb /net/tls | |
parent | 86029d10af18381814881d6cce2dd6872163b59f (diff) | |
download | linux-c844eb46b7d43c2cf760169df5ae1d5b033af338.tar.gz linux-c844eb46b7d43c2cf760169df5ae1d5b033af338.tar.bz2 linux-c844eb46b7d43c2cf760169df5ae1d5b033af338.zip |
tls: clear key material from kernel memory when do_tls_setsockopt_conf fails
Fixes: 3c4d7559159b ("tls: kernel TLS support")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tls')
-rw-r--r-- | net/tls/tls_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tls/tls_main.c b/net/tls/tls_main.c index 737b3865be1b..523622dc74f8 100644 --- a/net/tls/tls_main.c +++ b/net/tls/tls_main.c @@ -509,7 +509,7 @@ static int do_tls_setsockopt_conf(struct sock *sk, char __user *optval, goto out; err_crypto_info: - memset(crypto_info, 0, sizeof(*crypto_info)); + memzero_explicit(crypto_info, sizeof(union tls_crypto_context)); out: return rc; } |