1
0
Fork 0
alistair23-linux/drivers/crypto/chelsio
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
..
chtls chelsio/chtls: fix a double free in chtls_setkey() 2020-12-08 10:40:26 +01:00
Kconfig crypto: chelsio - replace AES cipher calls with library calls 2019-07-26 14:58:35 +10:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
chcr_algo.c crypto: chelsio - This fixes the kernel panic which occurs during a libkcapi test 2020-10-01 13:17:33 +02:00
chcr_algo.h crypto: chelsio - Rename arrays to avoid conflict with crypto/sha256.h 2019-09-05 14:54:54 +10:00
chcr_core.c Crypto: chelsio - Fixes a hang issue during driver registration 2020-05-02 08:49:00 +02:00
chcr_core.h crypto: chelsio - avoid using sa_entry imm 2019-01-25 18:41:51 +08:00
chcr_crypto.h crypto: chelsio - replace AES cipher calls with library calls 2019-07-26 14:58:35 +10:00
chcr_ipsec.c crypto: chelsio - replace AES cipher calls with library calls 2019-07-26 14:58:35 +10:00