Re: [PATCH net v3] ipv6: sit: fix skb_under_panic with overflowed needed_headroom

From: Wang Liang
Date: Tue Apr 08 2025 - 04:08:55 EST



在 2025/4/3 19:50, Paolo Abeni 写道:
On 4/1/25 4:16 AM, Wang Liang wrote:
@@ -1452,7 +1457,9 @@ static int ipip6_tunnel_init(struct net_device *dev)
tunnel->dev = dev;
strcpy(tunnel->parms.name, dev->name);
- ipip6_tunnel_bind_dev(dev);
+ err = ipip6_tunnel_bind_dev(dev);
+ if (err)
+ return err;
err = dst_cache_init(&tunnel->dst_cache, GFP_KERNEL);
if (err)
I think you additionally need to propagate the error in
ipip6_tunnel_update() and handle it in ipip6_changelink() and
ipip6_tunnel_change().


Thanks,I will add it in next patch.


Side note: possibly other virtual devices are prone to similar issue. I
suspect vxlan and gre. Could you please have a look?


Ok, I will try to reproduce the issue in vxvlan/gre scene later.

Thanks,

Paolo