syzbot


KCSAN: data-race in alloc_fd / do_select (3)

Status: moderation: reported on 2025/12/26 07:26
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+f4d7fa978975628a932f@syzkaller.appspotmail.com
First crash: 6d04h, last: 6d04h
Similar bugs (2)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in alloc_fd / do_select (2) fs 6 5 835d 917d 0/29 auto-obsoleted due to no activity on 2023/10/24 02:54
upstream KCSAN: data-race in alloc_fd / do_select fs 6 1 1079d 1079d 0/29 auto-obsoleted due to no activity on 2023/04/12 06:33

Sample crash report:
==================================================================
BUG: KCSAN: data-race in alloc_fd / do_select

write to 0xffff88810d25a6c0 of 8 bytes by task 4377 on cpu 0:
 instrument_write include/linux/instrumented.h:41 [inline]
 ___set_bit include/asm-generic/bitops/instrumented-non-atomic.h:28 [inline]
 __set_open_fd fs/file.c:335 [inline]
 alloc_fd+0x275/0x3c0 fs/file.c:606
 __get_unused_fd_flags fs/file.c:617 [inline]
 get_unused_fd_flags+0x46/0x50 fs/file.c:622
 sock_map_fd net/socket.c:507 [inline]
 __sys_socket+0xf9/0x180 net/socket.c:1756
 __do_sys_socket net/socket.c:1761 [inline]
 __se_sys_socket net/socket.c:1759 [inline]
 __x64_sys_socket+0x3f/0x50 net/socket.c:1759
 x64_sys_call+0x127b/0x3000 arch/x86/include/generated/asm/syscalls_64.h:42
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xca/0x2b0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff88810d25a6c0 of 8 bytes by task 4378 on cpu 1:
 max_select_fd fs/select.c:444 [inline]
 do_select+0x295/0xf40 fs/select.c:494
 core_sys_select+0x3dc/0x6e0 fs/select.c:677
 do_pselect fs/select.c:759 [inline]
 __do_sys_pselect6 fs/select.c:798 [inline]
 __se_sys_pselect6+0x213/0x280 fs/select.c:789
 __x64_sys_pselect6+0x78/0x90 fs/select.c:789
 x64_sys_call+0x2e98/0x3000 arch/x86/include/generated/asm/syscalls_64.h:271
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xca/0x2b0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x000000000000007f -> 0x00000000000001ff

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 4378 Comm: syz.6.207 Not tainted syzkaller #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/12/26 07:25 upstream ccd1cdca5cd4 d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in alloc_fd / do_select
* Struck through repros no longer work on HEAD.