net: core: fix use-after-free in __netif_receive_skb_list_core
authorEdward Cree <ecree@solarflare.com>
Mon, 9 Jul 2018 17:10:19 +0000 (18:10 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 9 Jul 2018 21:55:53 +0000 (14:55 -0700)
commit9af86f9338949a9369bda5e6fed69347d1813054
treeae65bea3d9a4e669d59c4a765cfdf007f7d0ee38
parent9f17dbf04ddf55ae48f5bbafea4c4920ea943215
net: core: fix use-after-free in __netif_receive_skb_list_core

__netif_receive_skb_core can free the skb, so we have to use the dequeue-
 enqueue model when calling it from __netif_receive_skb_list_core.

Fixes: 88eb1944e18c ("net: core: propagate SKB lists through packet_type lookup")
Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c