syzbot


KCSAN: data-race in fill_mg_cmtime / simple_unlink

Status: moderation: reported on 2025/12/08 12:07
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+bfda6b53f6bfa1e0f7fd@syzkaller.appspotmail.com
First crash: 2d07h, last: 1d12h

Sample crash report:
==================================================================
BUG: KCSAN: data-race in fill_mg_cmtime / simple_unlink

write to 0xffff888104b5d54c of 4 bytes by task 4814 on cpu 1:
 inode_set_mtime_to_ts include/linux/fs.h:1658 [inline]
 __simple_unlink fs/libfs.c:798 [inline]
 simple_unlink+0x54/0x80 fs/libfs.c:814
 shmem_unlink+0x12d/0x140 mm/shmem.c:3991
 shmem_rename2+0x1a1/0x290 mm/shmem.c:4076
 vfs_rename+0x97f/0xad0 fs/namei.c:5929
 do_renameat2+0x383/0x810 fs/namei.c:6047
 __do_sys_rename fs/namei.c:6090 [inline]
 __se_sys_rename fs/namei.c:6088 [inline]
 __x64_sys_rename+0x58/0x70 fs/namei.c:6088
 x64_sys_call+0x24e/0x3000 arch/x86/include/generated/asm/syscalls_64.h:83
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd8/0x2a0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888104b5d54c of 4 bytes by task 3308 on cpu 0:
 inode_get_mtime_nsec include/linux/fs.h:1644 [inline]
 inode_get_mtime include/linux/fs.h:1650 [inline]
 fill_mg_cmtime+0x5b/0x260 fs/stat.c:55
 generic_fillattr+0x24a/0x340 fs/stat.c:99
 shmem_getattr+0x181/0x200 mm/shmem.c:1274
 vfs_getattr_nosec+0x146/0x1e0 fs/stat.c:213
 vfs_getattr fs/stat.c:262 [inline]
 vfs_statx_path fs/stat.c:299 [inline]
 vfs_statx+0x113/0x390 fs/stat.c:356
 vfs_fstatat+0x115/0x170 fs/stat.c:375
 __do_sys_newfstatat fs/stat.c:542 [inline]
 __se_sys_newfstatat+0x55/0x260 fs/stat.c:536
 __x64_sys_newfstatat+0x55/0x70 fs/stat.c:536
 x64_sys_call+0x111f/0x3000 arch/x86/include/generated/asm/syscalls_64.h:263
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd8/0x2a0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x0f0d2d4f -> 0x0f180a0a

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

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/12/09 07:36 upstream cfd4039213e7 d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fill_mg_cmtime / simple_unlink
2025/12/08 12:06 upstream ba65a4e7120a d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fill_mg_cmtime / simple_unlink
* Struck through repros no longer work on HEAD.