Skip to content
Commit 9b0ceca5 authored by Zhipeng Lu's avatar Zhipeng Lu Committed by Chen Zhongjin
Browse files

net/mlx5e: fix a double-free in arfs_create_groups

mainline inclusion
from mainline-v6.8-rc2
commit 3c6d5189246f590e4e1f167991558bdb72a4738b
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9Q9IE
CVE: CVE-2024-35835

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3c6d5189246f590e4e1f167991558bdb72a4738b



--------------------------------

When `in` allocated by kvzalloc fails, arfs_create_groups will free
ft->g and return an error. However, arfs_create_table, the only caller of
arfs_create_groups, will hold this error and call to
mlx5e_destroy_flow_table, in which the ft->g will be freed again.

Fixes: 1cabe6b0 ("net/mlx5e: Create aRFS flow tables")
Signed-off-by: default avatarZhipeng Lu <alexious@zju.edu.cn>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Conflicts:
	drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c
[fix context conflicts]
Signed-off-by: default avatarChen Zhongjin <chenzhongjin@huawei.com>
parent 80ab23a8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment