]> git.baikalelectronics.ru Git - kernel.git/commit
tls: zero the crypto information from tls_context before freeing
authorSabrina Dubroca <sd@queasysnail.net>
Wed, 12 Sep 2018 15:44:42 +0000 (17:44 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 Sep 2018 19:03:47 +0000 (12:03 -0700)
commit0577b83b21d3b7596e378315b3dfe7cafc511d2e
treeca14c5fa1d55c1b5833e225571ed0aee777715cb
parent86f1431f0e148f867829cb57a066855922c7776e
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: c2c217d10788 ("tls: kernel TLS support")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/tls.h
net/tls/tls_device.c
net/tls/tls_device_fallback.c
net/tls/tls_main.c
net/tls/tls_sw.c