syzbot


KCSAN: data-race in fill_mg_cmtime / simple_rename_timestamp (2)

Status: moderation: reported on 2025/03/24 15:11
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+3d0e00746449e812d008@syzkaller.appspotmail.com
First crash: 53d, last: 20d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in fill_mg_cmtime / simple_rename_timestamp fs 3 116d 141d 0/28 auto-obsoleted due to no activity on 2025/03/17 15:26

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

write to 0xffff8881032283dc of 4 bytes by task 3535 on cpu 0:
 inode_set_mtime_to_ts include/linux/fs.h:1706 [inline]
 simple_rename_timestamp+0x53/0xd0 fs/libfs.c:809
 shmem_rename2+0x251/0x290 mm/shmem.c:4075
 vfs_rename+0x7d6/0xa20 fs/namei.c:5121
 do_renameat2+0x764/0xab0 fs/namei.c:5270
 __do_sys_rename fs/namei.c:5317 [inline]
 __se_sys_rename fs/namei.c:5315 [inline]
 __x64_sys_rename+0x58/0x70 fs/namei.c:5315
 x64_sys_call+0x2aee/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:83
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd0/0x1a0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff8881032283dc of 4 bytes by task 3484 on cpu 1:
 inode_get_mtime_nsec include/linux/fs.h:1692 [inline]
 inode_get_mtime include/linux/fs.h:1698 [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:1262
 vfs_getattr_nosec+0x143/0x1e0 fs/stat.c:210
 vfs_getattr fs/stat.c:259 [inline]
 vfs_statx_path fs/stat.c:296 [inline]
 vfs_statx+0x11a/0x380 fs/stat.c:353
 vfs_fstatat+0xe1/0x160 fs/stat.c:372
 __do_sys_newfstatat fs/stat.c:536 [inline]
 __se_sys_newfstatat+0x55/0x260 fs/stat.c:530
 __x64_sys_newfstatat+0x55/0x70 fs/stat.c:530
 x64_sys_call+0x2c22/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:263
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd0/0x1a0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x2b234138 -> 0x2b271e1c

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 3484 Comm: udevd Not tainted 6.15.0-rc3-syzkaller-00283-gf1a3944c860b #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/04/26 16:49 upstream f1a3944c860b c6b4fb39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fill_mg_cmtime / simple_rename_timestamp
2025/03/24 15:10 upstream 38fec10eb60d 875573af .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fill_mg_cmtime / simple_rename_timestamp
* Struck through repros no longer work on HEAD.