diff options
author | Sabrina Dubroca <sd@queasysnail.net> | 2018-09-12 18:44:43 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-09-13 22:03:47 +0300 |
commit | c844eb46b7d43c2cf760169df5ae1d5b033af338 (patch) | |
tree | 909dc26b18e1ee20e6fcac8936b4bcaa1bfa9eeb /net | |
parent | 86029d10af18381814881d6cce2dd6872163b59f (diff) | |
download | linux-c844eb46b7d43c2cf760169df5ae1d5b033af338.tar.xz |
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')
-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; } |