summaryrefslogtreecommitdiff
path: root/lib/test_overflow.c
diff options
context:
space:
mode:
authorMaxim Mikityanskiy <maximmi@mellanox.com>2019-03-15 17:41:43 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-02 11:02:57 +0300
commitc01e42fdccf5880b3ecb6bd8a8eaa8b24d17526a (patch)
tree161ca56357b160a754938f9dd41df418a68f11a2 /lib/test_overflow.c
parentf9444b6aaa011c03a76d3486a18e270deb5f3501 (diff)
downloadlinux-c01e42fdccf5880b3ecb6bd8a8eaa8b24d17526a.tar.xz
net/mlx5e: Fix use-after-free after xdp_return_frame
[ Upstream commit 12fc512f5741443a03adde2ead20724da8ad550a ] xdp_return_frame releases the frame. It leads to releasing the page, so it's not allowed to access xdpi.xdpf->len after that, because xdpi.xdpf is at xdp->data_hard_start after convert_to_xdp_frame. This patch moves the memory access to precede the return of the frame. Fixes: 58b99ee3e3ebe ("net/mlx5e: Add support for XDP_REDIRECT in device-out side") Signed-off-by: Maxim Mikityanskiy <maximmi@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions