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:Zhipeng Lu <alexious@zju.edu.cn> Reviewed-by:
Simon Horman <horms@kernel.org> Signed-off-by:
Saeed Mahameed <saeedm@nvidia.com> Signed-off-by:
Sasha Levin <sashal@kernel.org> Conflicts: drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c [fix context conflicts] Signed-off-by:
Chen Zhongjin <chenzhongjin@huawei.com>
Loading
Please sign in to comment