--- x/net/core/flow_dissector.c +++ y/net/core/flow_dissector.c @@ -1164,9 +1164,11 @@ proto_again: switch (proto) { case htons(ETH_P_IP): { const struct iphdr *iph; - struct iphdr _iph; - iph = __skb_header_pointer(skb, nhoff, sizeof(_iph), data, hlen, &_iph); + if (pskb_network_may_pull(skb, sizeof(struct iphdr))) + iph = (void *) skb_network_header(skb); + else + iph = NULL; if (!iph || iph->ihl < 5) { fdret = FLOW_DISSECT_RET_OUT_BAD; break; --- x/net/netfilter/nf_conntrack_core.c +++ y/net/netfilter/nf_conntrack_core.c @@ -346,9 +346,11 @@ static int ipv4_get_l4proto(const struct { int dataoff = -1; const struct iphdr *iph; - struct iphdr _iph; - iph = skb_header_pointer(skb, nhoff, sizeof(_iph), &_iph); + if (pskb_network_may_pull(skb, sizeof(struct iphdr))) + iph = (void *) skb_network_header(skb); + else + iph = NULL; if (!iph) return -1;