syzbot


KCSAN: data-race in init_file / prepare_creds (2)

Status: moderation: reported on 2025/07/27 03:30
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+0873b15fae924aab48d4@syzkaller.appspotmail.com
First crash: 110d, last: 11d
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in init_file / prepare_creds fs 6 1 168d 168d 0/29 auto-obsoleted due to no activity on 2025/07/25 02:49

Sample crash report:
==================================================================
BUG: KCSAN: data-race in init_file / prepare_creds

write to 0xffff8881470b1ca8 of 4 bytes by task 30137 on cpu 1:
 get_cred_many include/linux/cred.h:202 [inline]
 get_cred include/linux/cred.h:218 [inline]
 init_file+0x2e/0x1d0 fs/file_table.c:158
 alloc_empty_file+0x8b/0x200 fs/file_table.c:241
 alloc_file fs/file_table.c:354 [inline]
 alloc_file_pseudo+0xc6/0x160 fs/file_table.c:383
 sock_alloc_file+0x9c/0x1e0 net/socket.c:483
 sock_map_fd net/socket.c:513 [inline]
 __sys_socket+0x116/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+0x1147/0x3000 arch/x86/include/generated/asm/syscalls_64.h:42
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff8881470b1c00 of 184 bytes by task 30136 on cpu 0:
 prepare_creds+0x6c/0x4c0 kernel/cred.c:219
 __do_sys_capset kernel/capability.c:247 [inline]
 __se_sys_capset+0x2a3/0x450 kernel/capability.c:216
 __x64_sys_capset+0x31/0x40 kernel/capability.c:216
 x64_sys_call+0x2823/0x3000 arch/x86/include/generated/asm/syscalls_64.h:127
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 30136 Comm: syz.4.9533 Tainted: G        W           syzkaller #0 PREEMPT(voluntary) 
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025
==================================================================

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/11/03 03:32 upstream 6146a0f1dfae 2c50b6a9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in init_file / prepare_creds
2025/10/06 20:58 upstream fd94619c4336 91305dbe .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in init_file / prepare_creds
2025/10/04 06:22 upstream 9b0d551bcc05 49379ee0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in init_file / prepare_creds
2025/09/21 15:36 upstream f975f08c2e89 67c37560 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in init_file / prepare_creds
2025/08/03 17:26 upstream 186f3edfdd41 7368264b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in init_file / prepare_creds
2025/07/27 03:29 upstream 302f88ff3584 fb8f743d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in init_file / prepare_creds
* Struck through repros no longer work on HEAD.