diff --git a/net/ipv4/ip_tunnel_core.c b/net/ipv4/ip_tunnel_core.c index 586b1b3e35b805d46158531ae8e7b49122abbaa7..bb26b5494ba885b5f7eb22a0889463c8dd09bc91 100644 --- a/net/ipv4/ip_tunnel_core.c +++ b/net/ipv4/ip_tunnel_core.c @@ -113,6 +113,9 @@ int __iptunnel_pull_header(struct sk_buff *skb, int hdr_len, skb->protocol = inner_proto; } + if (!pskb_inet_may_pull(skb)) + return -ENOMEM; + skb_clear_hash_if_not_l4(skb); __vlan_hwaccel_clear_tag(skb); skb_set_queue_mapping(skb, 0);