From: Xiangyu Chen xiangyu.chen@windriver.com
Try to backport commit fb1a3132ee1a ("net/mlx5e: Fix use-after-free of encap entry in neigh update handler") to linux 5.10.y branch to fix CVE-2021-47247.
This commit modified the orginal commit due to kernel 5.10 doesn't have the commit 0d9f96471493 ("net/mlx5e: Extract tc tunnel encap/decap code to dedicated file") which moved encap/decap from en_tc.c to tc_tun_encap.c, so backport and move the additional functions to en_tc.c instead of tc_tun_encap.c
Vlad Buslov (1): net/mlx5e: Fix use-after-free of encap entry in neigh update handler
.../mellanox/mlx5/core/en/rep/neigh.c | 15 ++++----- .../ethernet/mellanox/mlx5/core/en/rep/tc.c | 6 +--- .../net/ethernet/mellanox/mlx5/core/en_tc.c | 33 +++++++++++++++++-- .../net/ethernet/mellanox/mlx5/core/en_tc.h | 3 ++ 4 files changed, 40 insertions(+), 17 deletions(-)