Re: [syzbot] Re: KMSAN: uninit-value in ip6table_mangle_hook()

From: syzbot
Date: Tue Dec 03 2024 - 08:48:26 EST


For archival purposes, forwarding an incoming command email to
linux-kernel@xxxxxxxxxxxxxxx, syzkaller-bugs@xxxxxxxxxxxxxxxx.

***

Subject: Re: KMSAN: uninit-value in ip6table_mangle_hook()
Author: dmantipov@xxxxxxxxx

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git cdd30ebb1b9f36159d66f088b61aee264e649d7a

diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index 48fd53b98972..00840249554a 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -1224,7 +1224,9 @@ int ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev, __u8 dsfield,
(skb_cloned(skb) && !skb_clone_writable(skb, 0))) {
struct sk_buff *new_skb;

- new_skb = skb_realloc_headroom(skb, max_headroom);
+ new_skb = skb_copy_expand(skb, max_headroom,
+ skb_tailroom(skb),
+ GFP_ATOMIC);
if (!new_skb)
goto tx_err_dst_release;