[syzbot] [net?] KMSAN: uninit-value in __inet_bind

1 view
Skip to first unread message

syzbot

unread,
Feb 14, 2026, 5:14:36 AM (yesterday) Feb 14
to da...@davemloft.net, dsa...@kernel.org, edum...@google.com, ho...@kernel.org, ku...@kernel.org, linux-...@vger.kernel.org, net...@vger.kernel.org, pab...@redhat.com, syzkall...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: cd7a5651db26 alpha: add missing address argument in call t..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=11bc7e5a580000
kernel config: https://syzkaller.appspot.com/x/.config?x=50148b563a4d5941
dashboard link: https://syzkaller.appspot.com/bug?extid=aae646f09192f72a68dc
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=122c0652580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14f7e15a580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/23c623fcb1bf/disk-cd7a5651.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/5128bb44f38d/vmlinux-cd7a5651.xz
kernel image: https://storage.googleapis.com/syzbot-assets/a65d6b263e08/bzImage-cd7a5651.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+aae646...@syzkaller.appspotmail.com

wlan0: Creating new IBSS network, BSSID 50:50:50:50:50:50
wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50
wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50
=====================================================
BUG: KMSAN: uninit-value in __inet_bind+0x8a4/0xf20 net/ipv4/af_inet.c:511
__inet_bind+0x8a4/0xf20 net/ipv4/af_inet.c:511
inet_bind_sk net/ipv4/af_inet.c:464 [inline]
inet_bind+0x12c/0x1a0 net/ipv4/af_inet.c:469
kernel_bind+0xd6/0x130 net/socket.c:3554
rds_tcp_conn_path_connect+0x952/0xff0 net/rds/tcp_connect.c:175
rds_connect_worker+0x353/0x4d0 net/rds/threads.c:176
process_one_work kernel/workqueue.c:3275 [inline]
process_scheduled_works+0xae7/0x1d60 kernel/workqueue.c:3358
worker_thread+0xede/0x1580 kernel/workqueue.c:3439
kthread+0x53f/0x600 kernel/kthread.c:467
ret_from_fork+0x20f/0x910 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

Uninit was stored to memory at:
kernel_bind+0x92/0x130 net/socket.c:3552
rds_tcp_conn_path_connect+0x952/0xff0 net/rds/tcp_connect.c:175
rds_connect_worker+0x353/0x4d0 net/rds/threads.c:176
process_one_work kernel/workqueue.c:3275 [inline]
process_scheduled_works+0xae7/0x1d60 kernel/workqueue.c:3358
worker_thread+0xede/0x1580 kernel/workqueue.c:3439
kthread+0x53f/0x600 kernel/kthread.c:467
ret_from_fork+0x20f/0x910 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

Uninit was stored to memory at:
rds_tcp_conn_path_connect+0xaf8/0xff0 net/rds/tcp_connect.c:174
rds_connect_worker+0x353/0x4d0 net/rds/threads.c:176
process_one_work kernel/workqueue.c:3275 [inline]
process_scheduled_works+0xae7/0x1d60 kernel/workqueue.c:3358
worker_thread+0xede/0x1580 kernel/workqueue.c:3439
kthread+0x53f/0x600 kernel/kthread.c:467
ret_from_fork+0x20f/0x910 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

Uninit was created at:
slab_post_alloc_hook mm/slub.c:4466 [inline]
slab_alloc_node mm/slub.c:4788 [inline]
kmem_cache_alloc_noprof+0x373/0x1200 mm/slub.c:4795
rds_tcp_conn_alloc+0x7b/0xbb0 net/rds/tcp.c:376
__rds_conn_create+0x267f/0x34e0 net/rds/connection.c:283
rds_conn_create_outgoing+0x5d/0x80 net/rds/connection.c:377
rds_sendmsg+0x2684/0x4d70 net/rds/send.c:1321
sock_sendmsg_nosec net/socket.c:727 [inline]
__sock_sendmsg net/socket.c:742 [inline]
____sys_sendmsg+0xfe7/0x1080 net/socket.c:2592
___sys_sendmsg+0x271/0x3b0 net/socket.c:2646
__sys_sendmsg net/socket.c:2678 [inline]
__do_sys_sendmsg net/socket.c:2683 [inline]
__se_sys_sendmsg net/socket.c:2681 [inline]
__x64_sys_sendmsg+0x211/0x3e0 net/socket.c:2681
x64_sys_call+0x1e20/0x3ea0 arch/x86/include/generated/asm/syscalls_64.h:47
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x134/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f

CPU: 1 UID: 0 PID: 1096 Comm: kworker/u8:7 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
Workqueue: krds_cp_wq#0/0 rds_connect_worker
=====================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

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.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
1:09 AM (5 hours ago) 1:09 AM
to linux-...@vger.kernel.org, syzkall...@googlegroups.com
For archival purposes, forwarding an incoming command email to
linux-...@vger.kernel.org, syzkall...@googlegroups.com.

***

Subject: Re: [syzbot] [net?] KMSAN: uninit-value in __inet_bind
Author: tabre...@gmail.com

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git main

From 42a8555a679994cc8113267b7ba08af054a48852 Mon Sep 17 00:00:00 2001
From: Tabrez Ahmed <tabre...@gmail.com>
Date: Sun, 15 Feb 2026 11:24:13 +0530
Subject: [PATCH net] rds: tcp: fix uninit-value in __inet_bind

KMSAN reported an uninit-value access in __inet_bind() when binding
an RDS TCP socket. The uninitialized memory originates from
rds_tcp_conn_alloc(), which uses kmem_cache_alloc() to allocate the
rds_tcp_connection structure.

The structure is not zero-initialized, leaving random data in its fields.
When the networking stack later tries to bind the socket using these
dirty values, KMSAN flags the uninitialized access.

Fix this by using kmem_cache_zalloc() instead of kmem_cache_alloc() to
ensure the structure is zeroed out upon allocation.

Reported-by: syzbot+aae646...@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=aae646f09192f72a68dc
Fixes: 70041088e3b9 ("RDS: Add TCP transport to RDS")

Signed-off-by: Tabrez Ahmed <tabre...@gmail.com>
---
net/rds/tcp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/rds/tcp.c b/net/rds/tcp.c
index 45484a93d75f..04f310255692 100644
--- a/net/rds/tcp.c
+++ b/net/rds/tcp.c
@@ -373,7 +373,7 @@ static int rds_tcp_conn_alloc(struct rds_connection *conn, gfp_t gfp)
int ret = 0;

for (i = 0; i < RDS_MPATH_WORKERS; i++) {
- tc = kmem_cache_alloc(rds_tcp_conn_slab, gfp);
+ tc = kmem_cache_zalloc(rds_tcp_conn_slab, gfp);
if (!tc) {
ret = -ENOMEM;
goto fail;
--
2.43.0

syzbot

unread,
1:38 AM (4 hours ago) 1:38 AM
to linux-...@vger.kernel.org, syzkall...@googlegroups.com, tabre...@gmail.com
Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-by: syzbot+aae646...@syzkaller.appspotmail.com
Tested-by: syzbot+aae646...@syzkaller.appspotmail.com

Tested on:

commit: ee5492fd fbnic: close fw_log race between users and te..
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git main
console output: https://syzkaller.appspot.com/x/log.txt?x=1282c722580000
kernel config: https://syzkaller.appspot.com/x/.config?x=c4b32638806e00b5
dashboard link: https://syzkaller.appspot.com/bug?extid=aae646f09192f72a68dc
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
patch: https://syzkaller.appspot.com/x/patch.diff?x=152feb3a580000

Note: testing is done by a robot and is best-effort only.
Reply all
Reply to author
Forward
0 new messages