syzbot


KCSAN: data-race in inode_set_ctime_to_ts / inode_set_ctime_to_ts

Status: moderation: reported on 2025/02/04 13:08
Subsystems: kernfs
[Documentation on labels]
Reported-by: syzbot+e35fde329c576c81bd47@syzkaller.appspotmail.com
First crash: 17h33m, last: 17h33m

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

write to 0xffff88810669c548 of 4 bytes by task 3309 on cpu 1:
 inode_set_ctime_to_ts+0x85/0x180 fs/inode.c:2716
 set_inode_attr fs/kernfs/inode.c:164 [inline]
 kernfs_refresh_inode fs/kernfs/inode.c:177 [inline]
 kernfs_iop_permission+0x175/0x210 fs/kernfs/inode.c:288
 do_inode_permission fs/namei.c:525 [inline]
 inode_permission+0x18c/0x300 fs/namei.c:592
 may_create+0x18e/0x1f0 fs/namei.c:3175
 vfs_mkdir+0x54/0x320 fs/namei.c:4298
 do_mkdirat+0x136/0x2c0 fs/namei.c:4336
 __do_sys_mkdirat fs/namei.c:4351 [inline]
 __se_sys_mkdirat fs/namei.c:4349 [inline]
 __x64_sys_mkdirat+0x4e/0x60 fs/namei.c:4349
 x64_sys_call+0x1b6f/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:259
 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

write to 0xffff88810669c548 of 4 bytes by task 3304 on cpu 0:
 inode_set_ctime_to_ts+0x85/0x180 fs/inode.c:2716
 set_inode_attr fs/kernfs/inode.c:164 [inline]
 kernfs_refresh_inode fs/kernfs/inode.c:177 [inline]
 kernfs_iop_permission+0x175/0x210 fs/kernfs/inode.c:288
 do_inode_permission fs/namei.c:525 [inline]
 inode_permission+0x18c/0x300 fs/namei.c:592
 may_lookup fs/namei.c:1836 [inline]
 link_path_walk+0x5c1/0x830 fs/namei.c:2427
 path_openat+0x1af/0x1fc0 fs/namei.c:3985
 do_filp_open+0x107/0x230 fs/namei.c:4016
 do_sys_openat2+0xab/0x120 fs/open.c:1427
 do_sys_open fs/open.c:1442 [inline]
 __do_sys_openat fs/open.c:1458 [inline]
 __se_sys_openat fs/open.c:1453 [inline]
 __x64_sys_openat+0xf3/0x120 fs/open.c:1453
 x64_sys_call+0x2b30/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:258
 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: 0x32a1dd29 -> 0x32b13187

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 3304 Comm: syz-executor Not tainted 6.14.0-rc1-syzkaller-00020-g0de63bb7d919 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/02/04 13:07 upstream 0de63bb7d919 8f267cef .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in inode_set_ctime_to_ts / inode_set_ctime_to_ts
* Struck through repros no longer work on HEAD.