* Re: [syzbot] [tipc?] KMSAN: uninit-value in tipc_rcv (2)
2025-07-23 14:45 [syzbot] [tipc?] KMSAN: uninit-value in tipc_rcv (2) syzbot
@ 2025-08-03 9:39 ` syzbot
2025-09-19 15:23 ` Forwarded: [PATCH net] net/core : fix KMSAN: uninit value in tipc_rcv syzbot
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: syzbot @ 2025-08-03 9:39 UTC (permalink / raw)
To: davem, edumazet, horms, jmaloy, kuba, linux-kernel, netdev,
pabeni, syzkaller-bugs, tipc-discussion
syzbot has found a reproducer for the following issue on:
HEAD commit: 89748acdf226 Merge tag 'drm-next-2025-08-01' of https://gi..
git tree: upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=1395bcf0580000
kernel config: https://syzkaller.appspot.com/x/.config?x=7ff65239b4835001
dashboard link: https://syzkaller.appspot.com/bug?extid=9a4fbb77c9d4aacd3388
compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1625ff82580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=131bb834580000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/ce090dd92dc2/disk-89748acd.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/32b5903a7759/vmlinux-89748acd.xz
kernel image: https://storage.googleapis.com/syzbot-assets/dc68a867773d/bzImage-89748acd.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+9a4fbb77c9d4aacd3388@syzkaller.appspotmail.com
tipc: Started in network mode
tipc: Node identity 4689370d27fe, cluster identity 4711
tipc: Enabled bearer <eth:syzkaller0>, priority 0
=====================================================
BUG: KMSAN: uninit-value in tipc_rcv+0x17fa/0x1ea0 net/tipc/node.c:2132
tipc_rcv+0x17fa/0x1ea0 net/tipc/node.c:2132
tipc_l2_rcv_msg+0x213/0x320 net/tipc/bearer.c:668
__netif_receive_skb_list_ptype net/core/dev.c:6027 [inline]
__netif_receive_skb_list_core+0x133b/0x16b0 net/core/dev.c:6069
__netif_receive_skb_list net/core/dev.c:6121 [inline]
netif_receive_skb_list_internal+0xee7/0x1530 net/core/dev.c:6212
gro_normal_list include/net/gro.h:532 [inline]
gro_flush_normal include/net/gro.h:540 [inline]
napi_complete_done+0x3fb/0x7d0 net/core/dev.c:6581
napi_complete include/linux/netdevice.h:589 [inline]
tun_get_user+0x4c0d/0x6ca0 drivers/net/tun.c:1921
tun_chr_write_iter+0x3e9/0x5c0 drivers/net/tun.c:1996
do_iter_readv_writev+0x947/0xba0 fs/read_write.c:-1
vfs_writev+0x52a/0x1500 fs/read_write.c:1057
do_writev+0x1b5/0x580 fs/read_write.c:1103
__do_sys_writev fs/read_write.c:1171 [inline]
__se_sys_writev fs/read_write.c:1168 [inline]
__x64_sys_writev+0x99/0xf0 fs/read_write.c:1168
x64_sys_call+0x24b1/0x3e20 arch/x86/include/generated/asm/syscalls_64.h:21
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xd9/0x210 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Uninit was created at:
slab_post_alloc_hook mm/slub.c:4186 [inline]
slab_alloc_node mm/slub.c:4229 [inline]
kmem_cache_alloc_node_noprof+0x818/0xf00 mm/slub.c:4281
kmalloc_reserve+0x13c/0x4b0 net/core/skbuff.c:578
__alloc_skb+0x347/0x7d0 net/core/skbuff.c:669
napi_alloc_skb+0xc1/0x740 net/core/skbuff.c:811
napi_get_frags+0xab/0x250 net/core/gro.c:673
tun_napi_alloc_frags drivers/net/tun.c:1404 [inline]
tun_get_user+0x134f/0x6ca0 drivers/net/tun.c:1784
tun_chr_write_iter+0x3e9/0x5c0 drivers/net/tun.c:1996
do_iter_readv_writev+0x947/0xba0 fs/read_write.c:-1
vfs_writev+0x52a/0x1500 fs/read_write.c:1057
do_writev+0x1b5/0x580 fs/read_write.c:1103
__do_sys_writev fs/read_write.c:1171 [inline]
__se_sys_writev fs/read_write.c:1168 [inline]
__x64_sys_writev+0x99/0xf0 fs/read_write.c:1168
x64_sys_call+0x24b1/0x3e20 arch/x86/include/generated/asm/syscalls_64.h:21
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xd9/0x210 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
CPU: 1 UID: 0 PID: 5808 Comm: syz-executor123 Not tainted 6.16.0-syzkaller-10499-g89748acdf226 #0 PREEMPT(none)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
=====================================================
---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
^ permalink raw reply [flat|nested] 9+ messages in thread* Forwarded: [PATCH net] net/core : fix KMSAN: uninit value in tipc_rcv
2025-07-23 14:45 [syzbot] [tipc?] KMSAN: uninit-value in tipc_rcv (2) syzbot
2025-08-03 9:39 ` syzbot
@ 2025-09-19 15:23 ` syzbot
2025-09-20 17:01 ` Forwarded: [PATCH v2 " syzbot
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: syzbot @ 2025-09-19 15:23 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: [PATCH net] net/core : fix KMSAN: uninit value in tipc_rcv
Author: hariconscious@gmail.com
From: HariKrishna Sagala <hariconscious@gmail.com>
syzbot KMSAN points to the unint value in the socket buffer creation.
In the skbuff.c, kmalloc_reserve API takes gfp flags option, appended the
flag "GFP_ZERO" to the existing flags to get the zeroed buffer.
Reported-by:syzbot+9a4fbb77c9d4aacd3388@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=9a4fbb77c9d4aacd3388
Signed-off-by: HariKrishna Sagala <hariconscious@gmail.com>
---
#syz test
net/core/skbuff.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index ee0274417948..2308ebf99bbd 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -573,6 +573,7 @@ static void *kmalloc_reserve(unsigned int *size, gfp_t flags, int node,
void *obj;
obj_size = SKB_HEAD_ALIGN(*size);
+ flags |= __GFP_ZERO;
if (obj_size <= SKB_SMALL_HEAD_CACHE_SIZE &&
!(flags & KMALLOC_NOT_NORMAL_BITS)) {
obj = kmem_cache_alloc_node(net_hotdata.skb_small_head_cache,
--
2.43.0
^ permalink raw reply related [flat|nested] 9+ messages in thread* Forwarded: [PATCH v2 net] net/core : fix KMSAN: uninit value in tipc_rcv
2025-07-23 14:45 [syzbot] [tipc?] KMSAN: uninit-value in tipc_rcv (2) syzbot
2025-08-03 9:39 ` syzbot
2025-09-19 15:23 ` Forwarded: [PATCH net] net/core : fix KMSAN: uninit value in tipc_rcv syzbot
@ 2025-09-20 17:01 ` syzbot
2025-11-07 6:06 ` Forwarded: [PATCH] net: core: fix KMSAN: unint " syzbot
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: syzbot @ 2025-09-20 17:01 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: [PATCH v2 net] net/core : fix KMSAN: uninit value in tipc_rcv
Author: hariconscious@gmail.com
From: HariKrishna Sagala <hariconscious@gmail.com>
---
#syz test
diff --git a/net/tipc/node.c b/net/tipc/node.c
index a07fb073368c..f64f653e775a 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -2117,6 +2117,8 @@ void tipc_rcv(struct net *net, struct sk_buff *skb, struct tipc_bearer *b)
goto discard;
__skb_queue_head_init(&xmitq);
hdr = buf_msg(skb);
+ if(!hdr)
+ return -EINVAL;
usr = msg_user(hdr);
bc_ack = msg_bcast_ack(hdr);
^ permalink raw reply related [flat|nested] 9+ messages in thread* Forwarded: [PATCH] net: core: fix KMSAN: unint value in tipc_rcv
2025-07-23 14:45 [syzbot] [tipc?] KMSAN: uninit-value in tipc_rcv (2) syzbot
` (2 preceding siblings ...)
2025-09-20 17:01 ` Forwarded: [PATCH v2 " syzbot
@ 2025-11-07 6:06 ` syzbot
2025-11-07 7:15 ` syzbot
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: syzbot @ 2025-11-07 6:06 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: [PATCH] net: core: fix KMSAN: unint value in tipc_rcv
Author: hariconscious@gmail.com
#syz test
diff --git a/net/tipc/msg.c b/net/tipc/msg.c
index 76284fc538eb..144b02534196 100644
--- a/net/tipc/msg.c
+++ b/net/tipc/msg.c
@@ -69,6 +69,7 @@ struct sk_buff *tipc_buf_acquire(u32 size, gfp_t gfp)
{
struct sk_buff *skb;
+ gfp |= __GFP_ZERO;
skb = alloc_skb_fclone(BUF_OVERHEAD + size, gfp);
if (skb) {
skb_reserve(skb, BUF_HEADROOM);
^ permalink raw reply related [flat|nested] 9+ messages in thread* Forwarded: [PATCH] net: core: fix KMSAN: unint value in tipc_rcv
2025-07-23 14:45 [syzbot] [tipc?] KMSAN: uninit-value in tipc_rcv (2) syzbot
` (3 preceding siblings ...)
2025-11-07 6:06 ` Forwarded: [PATCH] net: core: fix KMSAN: unint " syzbot
@ 2025-11-07 7:15 ` syzbot
2025-11-07 10:19 ` syzbot
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: syzbot @ 2025-11-07 7:15 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: [PATCH] net: core: fix KMSAN: unint value in tipc_rcv
Author: hariconscious@gmail.com
#syz test
diff --git a/net/tipc/msg.c b/net/tipc/msg.c
index 76284fc538eb..eb50a9e23507 100644
--- a/net/tipc/msg.c
+++ b/net/tipc/msg.c
@@ -71,6 +71,8 @@ struct sk_buff *tipc_buf_acquire(u32 size, gfp_t gfp)
skb = alloc_skb_fclone(BUF_OVERHEAD + size, gfp);
if (skb) {
+ pr_info("tipc_buf_acquire\n");
+ memset(skb, 0, sizeof(struct sk_buff));
skb_reserve(skb, BUF_HEADROOM);
skb_put(skb, size);
skb->next = NULL;
^ permalink raw reply related [flat|nested] 9+ messages in thread* Forwarded: [PATCH] net: core: fix KMSAN: unint value in tipc_rcv
2025-07-23 14:45 [syzbot] [tipc?] KMSAN: uninit-value in tipc_rcv (2) syzbot
` (4 preceding siblings ...)
2025-11-07 7:15 ` syzbot
@ 2025-11-07 10:19 ` syzbot
2025-11-18 12:37 ` syzbot
2025-11-22 3:37 ` syzbot
7 siblings, 0 replies; 9+ messages in thread
From: syzbot @ 2025-11-07 10:19 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: [PATCH] net: core: fix KMSAN: unint value in tipc_rcv
Author: hariconscious@gmail.com
#syz test
diff --git a/net/tipc/msg.c b/net/tipc/msg.c
index 76284fc538eb..4c22cce4be30 100644
--- a/net/tipc/msg.c
+++ b/net/tipc/msg.c
@@ -71,6 +71,8 @@ struct sk_buff *tipc_buf_acquire(u32 size, gfp_t gfp)
skb = alloc_skb_fclone(BUF_OVERHEAD + size, gfp);
if (skb) {
+ pr_info("tipc_buf_acquire data len: %d\n", skb->data_len);
+ memset(skb->data, 0, skb->data_len);
skb_reserve(skb, BUF_HEADROOM);
skb_put(skb, size);
skb->next = NULL;
^ permalink raw reply related [flat|nested] 9+ messages in thread* Forwarded: [PATCH] net: core: fix KMSAN: unint value in tipc_rcv
2025-07-23 14:45 [syzbot] [tipc?] KMSAN: uninit-value in tipc_rcv (2) syzbot
` (5 preceding siblings ...)
2025-11-07 10:19 ` syzbot
@ 2025-11-18 12:37 ` syzbot
2025-11-22 3:37 ` syzbot
7 siblings, 0 replies; 9+ messages in thread
From: syzbot @ 2025-11-18 12:37 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: [PATCH] net: core: fix KMSAN: unint value in tipc_rcv
Author: hariconscious@gmail.com
#syz test
diff --git a/net/tipc/msg.c b/net/tipc/msg.c
index 76284fc538eb..ecfafb363a99 100644
--- a/net/tipc/msg.c
+++ b/net/tipc/msg.c
@@ -73,6 +73,7 @@ struct sk_buff *tipc_buf_acquire(u32 size, gfp_t gfp)
if (skb) {
skb_reserve(skb, BUF_HEADROOM);
skb_put(skb, size);
+ skb_put_zero(skb, BUF_OVERHEAD + size);
skb->next = NULL;
}
return skb;
^ permalink raw reply related [flat|nested] 9+ messages in thread* Forwarded: [PATCH] net: core: fix KMSAN: unint value in tipc_rcv
2025-07-23 14:45 [syzbot] [tipc?] KMSAN: uninit-value in tipc_rcv (2) syzbot
` (6 preceding siblings ...)
2025-11-18 12:37 ` syzbot
@ 2025-11-22 3:37 ` syzbot
7 siblings, 0 replies; 9+ messages in thread
From: syzbot @ 2025-11-22 3:37 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: [PATCH] net: core: fix KMSAN: unint value in tipc_rcv
Author: hariconscious@gmail.com
#syz test
diff --git a/net/tipc/msg.c b/net/tipc/msg.c
index 76284fc538eb..1f2a939d341c 100644
--- a/net/tipc/msg.c
+++ b/net/tipc/msg.c
@@ -73,6 +73,7 @@ struct sk_buff *tipc_buf_acquire(u32 size, gfp_t gfp)
if (skb) {
skb_reserve(skb, BUF_HEADROOM);
skb_put(skb, size);
+ memset(skb->data, 0, size);
skb->next = NULL;
}
return skb;
^ permalink raw reply related [flat|nested] 9+ messages in thread