summaryrefslogtreecommitdiffstats
path: root/net/netrom
diff options
context:
space:
mode:
authorEdward Cree <ecree@solarflare.com>2018-07-09 18:09:54 +0100
committerDavid S. Miller <davem@davemloft.net>2018-07-09 14:55:53 -0700
commit8c057efaebb557b60ba514b5e39e8000a1eab0f1 (patch)
tree9e179eec6b8563653162dc8c5d933b454e21dcfc /net/netrom
parentc47078d6a33fd78d882200cdaacbcfcd63318234 (diff)
downloadlinux-8c057efaebb557b60ba514b5e39e8000a1eab0f1.tar.bz2
net: core: fix uses-after-free in list processing
In netif_receive_skb_list_internal(), all of skb_defer_rx_timestamp(), do_xdp_generic() and enqueue_to_backlog() can lead to kfree(skb). Thus, we cannot wait until after they return to remove the skb from the list; instead, we remove it first and, in the pass case, add it to a sublist afterwards. In the case of enqueue_to_backlog() we have already decided not to pass when we call the function, so we do not need a sublist. Fixes: 7da517a3bc52 ("net: core: Another step of skb receive list processing") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netrom')
0 files changed, 0 insertions, 0 deletions