diff options
author | Vinay Kumar Yadav <vinay.yadav@chelsio.com> | 2020-10-19 17:20:25 +0530 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-10-20 17:29:17 -0700 |
commit | da1a039bcf293e4699d413c9f65d975da2d7c0bd (patch) | |
tree | 183784044aa098a07e8e5e00b916ca6e56374db9 /drivers/net | |
parent | 8580a61aede28d441e1c80588803411ee86aa299 (diff) | |
download | linux-da1a039bcf293e4699d413c9f65d975da2d7c0bd.tar.bz2 |
chelsio/chtls: fix writing freed memory
When chtls_sock *csk is freed, same memory can be allocated
to different csk in chtls_sock_create().
csk->cdev = NULL; statement might ends up modifying wrong
csk, eventually causing kernel panic.
removing (csk->cdev = NULL) statement as it is not required.
Fixes: 3a0a97838923 ("crypto/chtls: Fix chtls crash in connection cleanup")
Signed-off-by: Vinay Kumar Yadav <vinay.yadav@chelsio.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c b/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c index bdb53fa41022..ec4f79049a06 100644 --- a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c +++ b/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c @@ -483,7 +483,6 @@ void chtls_destroy_sock(struct sock *sk) chtls_purge_write_queue(sk); free_tls_keyid(sk); kref_put(&csk->kref, chtls_sock_release); - csk->cdev = NULL; if (sk->sk_family == AF_INET) sk->sk_prot = &tcp_prot; #if IS_ENABLED(CONFIG_IPV6) |