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 prio:low
[Documentation on labels]
Reported-by: syzbot+0e4191706e238fb2eac9@syzkaller.appspotmail.com
First crash: 47d, last: 11h25m
▶ ▼ ✨ AI Jobs (4)
ID Workflow Result Correct Bug Created Started Finished Revision
08fcd70d repro-c 💥 KCSAN: data-race in hash_ipportnet4_add / hash_ipportnet4_gc_do 2026/10/04 08:29 2026/10/04 08:30 2026/10/04 10:44 57bbd979
ad305962 repro-c 💥 KCSAN: data-race in hash_ipportnet4_add / hash_ipportnet4_gc_do 2026/10/02 02:30 2026/10/02 02:30 2026/10/02 04:16 6d32eb1f
f1cf2d2f assessment-security DenialOfService: ❌ Exploitable: ❌ FilesystemTrigger: ❌ NetworkTrigger: ❌ PeripheralTrigger: ❌ RemoteTrigger: ❌ Unprivileged: ❌ UserNamespace: ✅ VMGuestTrigger: ❌ VMHostTrigger: ❌ ❓ KCSAN: data-race in hash_ipportnet4_add / hash_ipportnet4_gc_do 2026/09/07 00:42 2026/09/07 00:42 2026/09/07 00:45 4f7b22a0
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 0xffff888147294818 of 4 bytes by task 31368 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+0x53f/0xa10 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 0xffff888147294818 of 4 bytes by task 5700 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+0x22e/0x6a0 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:2579
 nfnetlink_rcv+0x15f/0x1740 net/netfilter/nfnetlink.c:667
 netlink_unicast_kernel net/netlink/af_netlink.c:1338 [inline]
 netlink_unicast+0x665/0x740 net/netlink/af_netlink.c:1364
 netlink_sendmsg+0x5ef/0x740 net/netlink/af_netlink.c:1923
 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: 0x00000001 -> 0x00000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 5700 Comm: syz.3.773 Not tainted syzkaller #0 PREEMPT(lazy) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/10/22 14:20 upstream 7be4bc52fd9e b55fad29 .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
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.