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

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

write to 0xffff88810480e3d8 of 4 bytes by task 3289 on cpu 0:
 inode_set_ctime_to_ts+0x85/0x180 fs/inode.c:2716
 inode_set_ctime_current+0x1b7/0x7a0 fs/inode.c:2779
 shmem_xattr_handler_set+0x1a9/0x220 mm/shmem.c:4163
 __vfs_setxattr+0x2e5/0x310 fs/xattr.c:200
 __vfs_setxattr_noperm+0xed/0x420 fs/xattr.c:234
 __vfs_setxattr_locked+0x1af/0x1d0 fs/xattr.c:295
 vfs_setxattr+0x140/0x290 fs/xattr.c:321
 do_setxattr fs/xattr.c:636 [inline]
 filename_setxattr+0x198/0x2a0 fs/xattr.c:665
 path_setxattrat+0x284/0x310 fs/xattr.c:713
 __do_sys_lsetxattr fs/xattr.c:754 [inline]
 __se_sys_lsetxattr fs/xattr.c:750 [inline]
 __x64_sys_lsetxattr+0x71/0x90 fs/xattr.c:750
 x64_sys_call+0x29c8/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:190
 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 0xffff88810480e3d8 of 4 bytes by task 3511 on cpu 1:
 inode_get_ctime_nsec include/linux/fs.h:1678 [inline]
 inode_get_ctime include/linux/fs.h:1684 [inline]
 generic_fillattr+0x1c9/0x330 fs/stat.c:101
 shmem_getattr+0x17b/0x200 mm/shmem.c:1177
 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: 0x30fdc05a -> 0x333e5a92

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 3511 Comm: udevd Not tainted 6.13.0-rc1-syzkaller-00337-g7503345ac5f5 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================

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