]> xenbits.xensource.com Git - arm/linux.git/commit
net: socionext: fix possible user-after-free in netsec_process_rx
authorLorenzo Bianconi <lorenzo@kernel.org>
Sat, 25 Jan 2020 11:48:50 +0000 (12:48 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 1 Feb 2020 09:34:39 +0000 (09:34 +0000)
commitb7eda225ebc1c2faa793ac2343c6d34b3b645a66
tree1c1b6f23fcf2e336d2088727d58bb46e96bdcf0b
parent717abad8646011b6eba7a19506f354905a461adf
net: socionext: fix possible user-after-free in netsec_process_rx

[ Upstream commit b5e82e3c89c78ee0407ea8e8087af5519b6c7bae ]

Fix possible use-after-free in in netsec_process_rx that can occurs if
the first packet is sent to the normal networking stack and the
following one is dropped by the bpf program attached to the xdp hook.
Fix the issue defining the skb pointer in the 'budget' loop

Fixes: ba2b232108d3c ("net: netsec: add XDP support")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/socionext/netsec.c