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: 135d, last: 28d

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

write to 0xffff8881031ff820 of 8 bytes by task 3293 on cpu 0:
 inode_set_ctime_to_ts+0x73/0x180 fs/inode.c:2667
 inode_set_ctime_current+0x1b5/0x770 fs/inode.c:2731
 shmem_symlink+0x355/0x3c0 mm/shmem.c:4144
 vfs_symlink+0xca/0x1d0 fs/namei.c:4688
 do_symlinkat+0xe1/0x370 fs/namei.c:4714
 __do_sys_symlink fs/namei.c:4735 [inline]
 __se_sys_symlink fs/namei.c:4733 [inline]
 __x64_sys_symlink+0x50/0x60 fs/namei.c:4733
 x64_sys_call+0x2a77/0x2e10 arch/x86/include/generated/asm/syscalls_64.h:89
 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 0xffff8881031ff820 of 8 bytes by task 3375 on cpu 1:
 inode_get_ctime_sec include/linux/fs.h:1723 [inline]
 inode_get_ctime include/linux/fs.h:1733 [inline]
 generic_fillattr+0x1bc/0x330 fs/stat.c:101
 shmem_getattr+0x17b/0x200 mm/shmem.c:1249
 vfs_getattr_nosec fs/stat.c:208 [inline]
 vfs_getattr+0x172/0x1b0 fs/stat.c:246
 vfs_statx_path fs/stat.c:283 [inline]
 vfs_statx+0x130/0x330 fs/stat.c:349
 vfs_fstatat+0xe4/0x130 fs/stat.c:368
 __do_sys_newfstatat fs/stat.c:532 [inline]
 __se_sys_newfstatat+0x58/0x260 fs/stat.c:526
 __x64_sys_newfstatat+0x55/0x70 fs/stat.c:526
 x64_sys_call+0x2d6f/0x2e10 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: 0x0000000067e2ddc8 -> 0x0000000067e2ddcb

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 3375 Comm: udevd Not tainted 6.14.0-syzkaller-00685-g3ba7dfb8da62 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
==================================================================

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
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.