kernel_samsung_a53x/drivers/net/ethernet/qlogic
Dinghao Liu 77b785c587 qed: Fix a potential use-after-free in qed_cxt_tables_alloc
[ Upstream commit b65d52ac9c085c0c52dee012a210d4e2f352611b ]

qed_ilt_shadow_alloc() will call qed_ilt_shadow_free() to
free p_hwfn->p_cxt_mngr->ilt_shadow on error. However,
qed_cxt_tables_alloc() accesses the freed pointer on failure
of qed_ilt_shadow_alloc() through calling qed_cxt_mngr_free(),
which may lead to use-after-free. Fix this issue by setting
p_mngr->ilt_shadow to NULL in qed_ilt_shadow_free().

Fixes: fe56b9e6a8d9 ("qed: Add module with basic common support")
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Link: https://lore.kernel.org/r/20231210045255.21383-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:49 +01:00
..
netxen net: vlan: introduce skb_vlan_eth_hdr() 2024-11-18 12:11:48 +01:00
qed qed: Fix a potential use-after-free in qed_cxt_tables_alloc 2024-11-18 12:11:49 +01:00
qede Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qlcnic net: vlan: introduce skb_vlan_eth_hdr() 2024-11-18 12:11:48 +01:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qla3xxx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qla3xxx.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00