]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/mlx5: DR, Fix wrong action data allocation in decap action
authorYevgeny Kliteynik <kliteyn@nvidia.com>
Sun, 4 Jun 2023 18:07:04 +0000 (21:07 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Jun 2023 09:14:12 +0000 (11:14 +0200)
commitbf7a5d954f862ae267f02afe8ff339775d00167d
treec1f265ff856099190c0bf38119672071d8c95fc0
parent3cb0d1406c41bdb7abedbc2ff090e373e754ac12
net/mlx5: DR, Fix wrong action data allocation in decap action

[ Upstream commit ef4c5afc783dc3d47640270a9b94713229c697e8 ]

When TUNNEL_L3_TO_L2 decap action was created, a pointer to a local
variable was passed as its HW action data, resulting in attempt to
free invalid address:

  BUG: KASAN: invalid-free in mlx5dr_action_destroy+0x318/0x410 [mlx5_core]

Fixes: 4781df92f4da ("net/mlx5: DR, Move STEv0 modify header logic")
Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Reviewed-by: Alex Vesker <valex@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c