syzbot


KCSAN: data-race in generic_fillattr / inode_set_ctime_to_ts

Status: moderation: reported on 2024/12/08 06:59
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+29f67f1a6d82e4dae6fd@syzkaller.appspotmail.com
First crash: 159d, last: 20d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in generic_fillattr / inode_set_ctime_to_ts

write to 0xffff8881020ed258 of 8 bytes by task 13379 on cpu 0:
 inode_set_ctime_to_ts+0x72/0x170 fs/inode.c:2667
 setattr_copy+0x33f/0x4b0 fs/attr.c:366
 shmem_setattr+0x566/0x840 mm/shmem.c:1343
 notify_change+0x806/0x890 fs/attr.c:552
 vfs_utimes+0x2fc/0x410 fs/utimes.c:66
 do_utimes_path fs/utimes.c:99 [inline]
 do_utimes+0x150/0x210 fs/utimes.c:140
 __do_sys_utimensat fs/utimes.c:159 [inline]
 __se_sys_utimensat fs/utimes.c:143 [inline]
 __x64_sys_utimensat+0xc4/0x170 fs/utimes.c:143
 x64_sys_call+0x1a2c/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:281
 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 0xffff8881020ed258 of 8 bytes by task 5488 on cpu 1:
 inode_get_ctime_sec include/linux/fs.h:1731 [inline]
 inode_get_ctime include/linux/fs.h:1741 [inline]
 generic_fillattr+0x1c4/0x340 fs/stat.c:101
 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: 0x00000000680d1f8d -> 0x00000000680d1f8e

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 5488 Comm: udevd Tainted: G        W           6.15.0-rc3-syzkaller-00283-gf1a3944c860b #0 PREEMPT(voluntary) 
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
==================================================================

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/04/26 18:02 upstream f1a3944c860b c6b4fb39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in generic_fillattr / inode_set_ctime_to_ts
2025/03/25 16:46 upstream 3ba7dfb8da62 875573af .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in generic_fillattr / inode_set_ctime_to_ts
2025/02/07 10:16 upstream bb066fe812d6 53657d1b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in generic_fillattr / inode_set_ctime_to_ts
2025/01/24 01:11 upstream d0d106a2bd21 521b0ce3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in generic_fillattr / inode_set_ctime_to_ts
2024/12/08 06:59 upstream 7503345ac5f5 9ac0fdc6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in generic_fillattr / inode_set_ctime_to_ts
* Struck through repros no longer work on HEAD.