1
0
Fork 0
alistair23-linux/drivers/crypto/chelsio/chtls
Dan Carpenter 7c3894f695 chelsio/chtls: fix a double free in chtls_setkey()
[ Upstream commit 391119fb5c ]

The "skb" is freed by the transmit code in cxgb4_ofld_send() and we
shouldn't use it again.  But in the current code, if we hit an error
later on in the function then the clean up code will call kfree_skb(skb)
and so it causes a double free.

Set the "skb" to NULL and that makes the kfree_skb() a no-op.

Fixes: d25f2f71f6 ("crypto: chtls - Program the TLS session Key")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/X8ilb6PtBRLWiSHp@mwanda
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-08 10:40:26 +01:00
..
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
chtls.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
chtls_cm.c chelsio/chtls: fix panic during unload reload chtls 2020-12-08 10:40:25 +01:00
chtls_cm.h crypto: chtls - Fixed memory leak 2020-02-24 08:36:40 +01:00
chtls_hw.c chelsio/chtls: fix a double free in chtls_setkey() 2020-12-08 10:40:26 +01:00
chtls_io.c chelsio/chtls: fix tls record info to user 2020-11-01 12:01:03 +01:00
chtls_main.c net/tls: use the full sk_proto pointer 2019-09-05 09:49:49 +02:00