]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Jan 2020 10:05:42 +0000 (11:05 +0100)
commit4186b3f76f10c7972e811543d3a78360ecf04ef2
treefbcfaedd310ff8e968efbe410492f7b6df0e18e6
parentc23d9c4e975ee2c78e9c840a78f06f2c6bac9460
net: socionext: fix possible user-after-free in netsec_process_rx

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: 77ef2067ddb9f ("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>
drivers/net/ethernet/socionext/netsec.c