Files
linux/drivers/net/ethernet/qlogic/qed
Dinghao Liu b65d52ac9c qed: Fix a potential use-after-free in qed_cxt_tables_alloc
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: fe56b9e6a8 ("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>
2023-12-12 13:33:51 -08:00
..
2022-04-22 15:15:23 -07:00
2021-10-04 12:55:49 +01:00
2022-05-22 20:44:30 +01:00
2023-10-13 17:40:21 -07:00
2021-10-04 12:55:49 +01:00
2021-10-04 12:55:48 +01:00
2021-12-03 18:24:20 -08:00
2023-10-15 14:29:14 +01:00
2021-10-18 15:58:21 -07:00
2022-07-06 19:55:14 -07:00
2021-10-04 12:55:48 +01:00
2021-10-04 12:55:49 +01:00
2022-05-22 20:44:30 +01:00
2023-08-23 08:21:37 +01:00