Skip to content

Commit

Permalink
tls: clear key material from kernel memory when do_tls_setsockopt_con…
Browse files Browse the repository at this point in the history
…f fails

Fixes: 3c4d755 ("tls: kernel TLS support")
Signed-off-by: Sabrina Dubroca <[email protected]>
Signed-off-by: Sabrina Dubroca <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
qsn authored and davem330 committed Sep 13, 2018
1 parent 86029d1 commit c844eb4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/tls/tls_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit c844eb4

Please sign in to comment.