syzbot


KCSAN: data-race in fill_mg_cmtime / simple_rename_timestamp

Status: moderation: reported on 2024/12/27 01:11
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+470427272fce68efeddf@syzkaller.appspotmail.com
First crash: 41d, last: 17d

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

write to 0xffff88810356fdfc of 4 bytes by task 3935 on cpu 1:
 inode_set_mtime_to_ts include/linux/fs.h:1648 [inline]
 simple_rename_timestamp+0x50/0xd0 fs/libfs.c:816
 shmem_rename2+0x284/0x2c0 mm/shmem.c:3907
 vfs_rename+0x875/0x9c0 fs/namei.c:5067
 do_renameat2+0x6a2/0xa70 fs/namei.c:5224
 __do_sys_rename fs/namei.c:5271 [inline]
 __se_sys_rename fs/namei.c:5269 [inline]
 __x64_sys_rename+0x58/0x70 fs/namei.c:5269
 x64_sys_call+0x2b1c/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:83
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff88810356fdfc of 4 bytes by task 3931 on cpu 0:
 inode_get_mtime_nsec include/linux/fs.h:1634 [inline]
 inode_get_mtime include/linux/fs.h:1640 [inline]
 fill_mg_cmtime+0x58/0x280 fs/stat.c:55
 generic_fillattr+0x241/0x330 fs/stat.c:99
 shmem_getattr+0x17b/0x200 mm/shmem.c:1181
 vfs_getattr_nosec fs/stat.c:208 [inline]
 vfs_getattr fs/stat.c:246 [inline]
 vfs_statx_path+0x171/0x2d0 fs/stat.c:283
 vfs_statx+0xe1/0x170 fs/stat.c:347
 vfs_fstatat fs/stat.c:366 [inline]
 __do_sys_newfstatat fs/stat.c:530 [inline]
 __se_sys_newfstatat+0xdc/0x300 fs/stat.c:524
 __x64_sys_newfstatat+0x55/0x70 fs/stat.c:524
 x64_sys_call+0x236d/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:263
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x285369d6 -> 0x2859ca1f

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 3931 Comm: udevd Not tainted 6.13.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/01/20 15:25 upstream ffd294d346d1 6e87cfa2 .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/01/15 04:56 upstream 619f0b6fad52 7315a7cf .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in fill_mg_cmtime / simple_rename_timestamp
2024/12/27 01:10 upstream d6ef8b40d075 d3ccff63 .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.