[syzbot] [kernel?] KCSAN: data-race in hash_net4_add / hash_net4_gc_do
From: syzbot
Date: Fri Apr 04 2025 - 03:30:32 EST
Hello,
syzbot found the following issue on:
HEAD commit: a2cc6ff5ec8f Merge tag 'firewire-updates-6.15' of git://gi..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=17d8194c580000
kernel config: https://syzkaller.appspot.com/x/.config?x=878fb2f189a26734
dashboard link: https://syzkaller.appspot.com/bug?extid=78974ef5957119ce0f61
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/6cdeb8c88045/disk-a2cc6ff5.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/06bfec3b61f0/vmlinux-a2cc6ff5.xz
kernel image: https://storage.googleapis.com/syzbot-assets/b7367ea0d4e6/bzImage-a2cc6ff5.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+78974ef5957119ce0f61@xxxxxxxxxxxxxxxxxxxxxxxxx
EXT4-fs (loop2): 1 truncate cleaned up
ext4 filesystem being mounted at /376/file0 supports timestamps until 2038-01-19 (0x7fffffff)
==================================================================
BUG: KCSAN: data-race in hash_net4_add / hash_net4_gc_do
read-write to 0xffff888120381268 of 4 bytes by task 23 on cpu 1:
hash_net4_gc_do+0x908/0xf90 net/netfilter/ipset/ip_set_hash_gen.h:518
hash_net4_gc+0x10d/0x280 net/netfilter/ipset/ip_set_hash_gen.h:583
process_one_work kernel/workqueue.c:3238 [inline]
process_scheduled_works+0x4de/0xa20 kernel/workqueue.c:3319
worker_thread+0x52c/0x710 kernel/workqueue.c:3400
kthread+0x4b7/0x540 kernel/kthread.c:464
ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:153
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
read to 0xffff888120381268 of 4 bytes by task 9403 on cpu 0:
hash_net4_add+0x292/0x1d50 net/netfilter/ipset/ip_set_hash_gen.h:869
hash_net4_uadt+0x51d/0x5d0 net/netfilter/ipset/ip_set_hash_net.c:202
call_ad+0x1a3/0x550 net/netfilter/ipset/ip_set_core.c:1751
ip_set_ad+0x5a7/0x670 net/netfilter/ipset/ip_set_core.c:1841
ip_set_uadd+0x41/0x50 net/netfilter/ipset/ip_set_core.c:1864
nfnetlink_rcv_msg+0x4ba/0x580 net/netfilter/nfnetlink.c:302
netlink_rcv_skb+0x12f/0x230 net/netlink/af_netlink.c:2534
nfnetlink_rcv+0x187/0x1610 net/netfilter/nfnetlink.c:667
netlink_unicast_kernel net/netlink/af_netlink.c:1313 [inline]
netlink_unicast+0x605/0x6c0 net/netlink/af_netlink.c:1339
netlink_sendmsg+0x609/0x720 net/netlink/af_netlink.c:1883
sock_sendmsg_nosec net/socket.c:712 [inline]
__sock_sendmsg+0x140/0x180 net/socket.c:727
____sys_sendmsg+0x350/0x4e0 net/socket.c:2566
___sys_sendmsg net/socket.c:2620 [inline]
__sys_sendmsg+0x1a0/0x240 net/socket.c:2652
__do_sys_sendmsg net/socket.c:2657 [inline]
__se_sys_sendmsg net/socket.c:2655 [inline]
__x64_sys_sendmsg+0x46/0x50 net/socket.c:2655
x64_sys_call+0x26f3/0x2e10 arch/x86/include/generated/asm/syscalls_64.h:47
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xc9/0x1c0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
value changed: 0x000003f4 -> 0x00000331
Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 9403 Comm: syz.2.1855 Not tainted 6.14.0-syzkaller-12966-ga2cc6ff5ec8f #0 PREEMPT(voluntary)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
==================================================================
Set syz1 is full, maxelem 65536 reached
---
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 syzkaller@xxxxxxxxxxxxxxxx.
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 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