--- a/net/ipv4/fou.c +++ b/net/ipv4/fou.c @@ -1008,6 +1008,9 @@ static int gue_err_proto_handler(int proto, struct sk_buff *skb, u32 info) { const struct net_protocol *ipprot = rcu_dereference(inet_protos[proto]); + if (ipprot == IPPROTO_UDP) + return -EINVAL; + if (ipprot && ipprot->err_handler) { if (!ipprot->err_handler(skb, info)) return 0;