]> git.feebdaed.xyz Git - 0xmirror/dpdk.git/commit
net/mlx5: fix null dereference in modify header
authorShani Peretz <shperetz@nvidia.com>
Sun, 16 Nov 2025 12:10:26 +0000 (14:10 +0200)
committerRaslan Darawsheh <rasland@nvidia.com>
Tue, 18 Nov 2025 13:19:42 +0000 (14:19 +0100)
commitdf19cf4aa720935a31edcb2954a88cfd038880e6
treedf1d509e33ca513e0d202eb1605d880ad3025ce9
parent970309c7aa889ee06178c6476fe153e17096fc25
net/mlx5: fix null dereference in modify header

GCC analyzer identified a code path where acts->mhdr could be
NULL when dereferenced.
When modify header validation fails in mlx5_tbl_translate_modify_header(),
 __flow_hw_action_template_destroy() sets acts->mhdr to NULL.
Add defensive NULL check in mlx5_tbl_ensure_shared_modify_header()
to prevent the dereference.

Bugzilla ID: 1521
Fixes: 12f2ed3f03c8 ("net/mlx5: set modify header as shared flow action")
Cc: stable@dpdk.org
Signed-off-by: Shani Peretz <shperetz@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
drivers/net/mlx5/mlx5_flow_hw.c