KCSAN: data-race in hash_ipportnet4_add / hash_ipportnet4_gc_do

Status: moderation: reported on 2026/09/05 02:15
Subsystems: kernel
Labels: race:benign
[Documentation on labels]
Reported-by: syzbot+0e4191706e238fb2eac9@syzkaller.appspotmail.com
First crash: 1h49m, last: 1h49m
✨ AI Jobs (1)
ID Workflow Result Correct Bug Created Started Finished Revision
570555ae assessment-kcsan Benign: ✅ KCSAN: data-race in hash_ipportnet4_add / hash_ipportnet4_gc_do 2026/09/05 02:14 2026/09/05 02:14 2026/09/05 02:34 7ce8fcf4

Sample crash report:
==================================================================
BUG: KCSAN: data-race in hash_ipportnet4_add / hash_ipportnet4_gc_do

read-write to 0xffff88812a4c4738 of 4 bytes by task 3381 on cpu 1:
 hash_ipportnet4_gc_do+0x27c/0x600 net/netfilter/ipset/ip_set_hash_gen.h:645
 hash_ipportnet4_gc+0x135/0x2a0 net/netfilter/ipset/ip_set_hash_gen.h:712
 process_one_work kernel/workqueue.c:3396 [inline]
 process_scheduled_works+0x56a/0xa50 kernel/workqueue.c:3479
 worker_thread+0x569/0x750 kernel/workqueue.c:3560
 kthread+0x223/0x270 kernel/kthread.c:436
 ret_from_fork+0x146/0x330 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

read to 0xffff88812a4c4738 of 4 bytes by task 4595 on cpu 0:
 hash_ipportnet4_add+0x2ae/0x16f0 net/netfilter/ipset/ip_set_hash_gen.h:1017
 hash_ipportnet4_uadt+0xb9f/0xd00 net/netfilter/ipset/ip_set_hash_ipportnet.c:291
 call_ad+0x231/0x640 net/netfilter/ipset/ip_set_core.c:1771
 ip_set_ad+0x5b1/0x680 net/netfilter/ipset/ip_set_core.c:1861
 ip_set_uadd+0x41/0x50 net/netfilter/ipset/ip_set_core.c:1884
 nfnetlink_rcv_msg+0x4e2/0x5b0 net/netfilter/nfnetlink.c:300
 netlink_rcv_skb+0x11e/0x220 net/netlink/af_netlink.c:2556
 nfnetlink_rcv+0x15f/0x1740 net/netfilter/nfnetlink.c:667
 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
 netlink_unicast+0x5a9/0x680 net/netlink/af_netlink.c:1345
 netlink_sendmsg+0x5be/0x6f0 net/netlink/af_netlink.c:1900
 sock_sendmsg_nosec net/socket.c:800 [inline]
 __sock_sendmsg net/socket.c:815 [inline]
 ____sys_sendmsg+0x532/0x580 net/socket.c:2713
 ___sys_sendmsg+0x195/0x1e0 net/socket.c:2767
 __sys_sendmsg net/socket.c:2799 [inline]
 __do_sys_sendmsg net/socket.c:2804 [inline]
 __se_sys_sendmsg net/socket.c:2802 [inline]
 __x64_sys_sendmsg+0xd4/0x160 net/socket.c:2802
 x64_sys_call+0x22ab/0x2550 arch/x86/include/generated/asm/syscalls_64.h:47
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x112/0x360 arch/x86/entry/syscall_64.c:84
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00000004 -> 0x00000003

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 4595 Comm: syz.1.314 Not tainted syzkaller #0 PREEMPT(lazy) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
==================================================================
bridge0: port 3(syz_tun) entered disabled state
syz_tun (unregistering): left allmulticast mode
syz_tun (unregistering): left promiscuous mode
bridge0: port 3(syz_tun) entered disabled state
syz.1.314 (4595) used greatest stack depth: 9208 bytes left

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/09/05 02:14 upstream bc35965f6940 4f7b22a0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in hash_ipportnet4_add / hash_ipportnet4_gc_do
* Struck through repros no longer work on HEAD.