KCSAN: data-race in hash_ip4_add / hash_ip4_gc_do

Status: moderation: reported on 2026/07/30 04:54
Subsystems: kernel
Labels: race:benign
[Documentation on labels]
Reported-by: syzbot+a5878dead7af0dcd187c@syzkaller.appspotmail.com
First crash: 9h49m, last: 9h49m
✨ AI Jobs (1)
ID Workflow Result Correct Bug Created Started Finished Revision Error
36a26a2e assessment-kcsan Benign: ✅ KCSAN: data-race in hash_ip4_add / hash_ip4_gc_do 2026/07/30 04:54 2026/07/30 04:54 2026/07/30 05:15 2377cd3d

			
		

Sample crash report:
==================================================================
BUG: KCSAN: data-race in hash_ip4_add / hash_ip4_gc_do

read-write to 0xffff8881277293b8 of 4 bytes by task 282 on cpu 0:
 hash_ip4_gc_do+0x24f/0x5d0 net/netfilter/ipset/ip_set_hash_gen.h:525
 hash_ip4_gc+0x12a/0x290 net/netfilter/ipset/ip_set_hash_gen.h:592
 process_one_work kernel/workqueue.c:3322 [inline]
 process_scheduled_works+0x4d4/0x9a0 kernel/workqueue.c:3405
 worker_thread+0x569/0x750 kernel/workqueue.c:3486
 kthread+0x221/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 0xffff8881277293b8 of 4 bytes by task 8810 on cpu 1:
 hash_ip4_add+0x238/0xf70 net/netfilter/ipset/ip_set_hash_gen.h:897
 hash_ip4_uadt+0x452/0x500 net/netfilter/ipset/ip_set_hash_ip.c:160
 call_ad+0x231/0x640 net/netfilter/ipset/ip_set_core.c:1758
 ip_set_ad+0x5b1/0x680 net/netfilter/ipset/ip_set_core.c:1848
 ip_set_uadd+0x41/0x50 net/netfilter/ipset/ip_set_core.c:1871
 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+0x5a7/0x680 net/netlink/af_netlink.c:1345
 netlink_sendmsg+0x5be/0x6f0 net/netlink/af_netlink.c:1900
 sock_sendmsg_nosec net/socket.c:775 [inline]
 __sock_sendmsg net/socket.c:790 [inline]
 ____sys_sendmsg+0x532/0x580 net/socket.c:2684
 ___sys_sendmsg+0x195/0x1e0 net/socket.c:2738
 __sys_sendmsg net/socket.c:2770 [inline]
 __do_sys_sendmsg net/socket.c:2775 [inline]
 __se_sys_sendmsg net/socket.c:2773 [inline]
 __x64_sys_sendmsg+0xd4/0x160 net/socket.c:2773
 x64_sys_call+0x194c/0x3020 arch/x86/include/generated/asm/syscalls_64.h:47
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x136/0x3c0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00000012 -> 0x0000000f

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 8810 Comm: syz.2.1239 Tainted: G        W           syzkaller #0 PREEMPT(lazy) 
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/07/30 04:54 upstream fc46aed51f62 6ef5c1e2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in hash_ip4_add / hash_ip4_gc_do
* Struck through repros no longer work on HEAD.