kernel_samsung_a53x/drivers/net/ethernet/broadcom
Dinghao Liu b88140da4f net: bnxt: fix a potential use-after-free in bnxt_init_tc
[ Upstream commit d007caaaf052f82ca2340d4c7b32d04a3f5dbf3f ]

When flow_indr_dev_register() fails, bnxt_init_tc will free
bp->tc_info through kfree(). However, the caller function
bnxt_init_one() will ignore this failure and call
bnxt_shutdown_tc() on failure of bnxt_dl_register(), where
a use-after-free happens. Fix this issue by setting
bp->tc_info to NULL after kfree().

Fixes: 627c89d00fb9 ("bnxt_en: flow_offload: offload tunnel decap rules via indirect callbacks")
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Reviewed-by: Michael Chan <michael.chan@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Link: https://lore.kernel.org/r/20231204024004.8245-1-dinghao.liu@zju.edu.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 12:11:39 +01:00
..
bnx2x Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bnxt net: bnxt: fix a potential use-after-free in bnxt_init_tc 2024-11-18 12:11:39 +01:00
genet Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
b44.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
b44.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bcm63xx_enet.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bcm63xx_enet.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bcmsysport.c Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
bcmsysport.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bgmac-bcma-mdio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bgmac-bcma.c Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
bgmac-platform.c Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
bgmac.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bgmac.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bnx2.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bnx2.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bnx2_fw.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cnic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cnic.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cnic_defs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cnic_if.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sb1250-mac.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00