diff --git a/net/ipv4/fou.c b/net/ipv4/fou.c index b1a8e4eec3f6..e63aa6b52460 100644 --- a/net/ipv4/fou.c +++ b/net/ipv4/fou.c @@ -213,6 +213,9 @@ static int gue_udp_recv(struct sock *sk, struct sk_buff *skb) return gue_control_message(skb, guehdr); proto_ctype = guehdr->proto_ctype; + if (unlikely(!proto_ctype)) + goto drop; + __skb_pull(skb, sizeof(struct udphdr) + hdrlen); skb_reset_transport_header(skb);