ipvlan: fix use after free of skb
ipvlan_handle_frame is a rx_handler, and when it returns a value other
than RX_HANDLER_CONSUMED (here, NET_RX_DROP aka RX_HANDLER_ANOTHER),
__netif_receive_skb_core expects that the skb still exists and will
process it further, but we just freed it.
Fixes: 2ad7bf3638
("ipvlan: Initial check-in of the IPVLAN driver.")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
cf554ada0b
commit
a534dc5298
1 changed files with 1 additions and 1 deletions
|
@ -653,5 +653,5 @@ rx_handler_result_t ipvlan_handle_frame(struct sk_buff **pskb)
|
|||
WARN_ONCE(true, "ipvlan_handle_frame() called for mode = [%hx]\n",
|
||||
port->mode);
|
||||
kfree_skb(skb);
|
||||
return NET_RX_DROP;
|
||||
return RX_HANDLER_CONSUMED;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue