syzbot


KCSAN: data-race in kernfs_iop_permission / kernfs_iop_permission (7)

Status: moderation: reported on 2025/03/10 16:18
Subsystems: kernfs
[Documentation on labels]
Reported-by: syzbot+3838461eacfdddaf77ee@syzkaller.appspotmail.com
First crash: 1d13h, last: 1d13h
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in kernfs_iop_permission / kernfs_iop_permission kernfs 1 453d 453d 0/28 auto-obsoleted due to no activity on 2024/01/18 07:18
upstream KCSAN: data-race in kernfs_iop_permission / kernfs_iop_permission (2) kernfs 1 395d 395d 0/28 auto-obsoleted due to no activity on 2024/03/16 21:17
upstream KCSAN: data-race in kernfs_iop_permission / kernfs_iop_permission (4) kernfs 3 229d 250d 0/28 auto-obsoleted due to no activity on 2024/08/29 19:56
upstream KCSAN: data-race in kernfs_iop_permission / kernfs_iop_permission (3) kernfs 1 304d 304d 0/28 auto-obsoleted due to no activity on 2024/06/15 22:09
upstream KCSAN: data-race in kernfs_iop_permission / kernfs_iop_permission (6) kernfs 1 114d 114d 0/28 auto-obsoleted due to no activity on 2025/01/13 01:11
upstream KCSAN: data-race in kernfs_iop_permission / kernfs_iop_permission (5) kernfs 1 174d 174d 0/28 auto-obsoleted due to no activity on 2024/10/23 06:46

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

write to 0xffff8881060deee4 of 4 bytes by task 3299 on cpu 1:
 inode_set_mtime_to_ts include/linux/fs.h:1708 [inline]
 set_inode_attr fs/kernfs/inode.c:163 [inline]
 kernfs_refresh_inode fs/kernfs/inode.c:177 [inline]
 kernfs_iop_permission+0x14c/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 0xffff8881060deee4 of 4 bytes by task 3302 on cpu 0:
 inode_set_mtime_to_ts include/linux/fs.h:1708 [inline]
 set_inode_attr fs/kernfs/inode.c:163 [inline]
 kernfs_refresh_inode fs/kernfs/inode.c:177 [inline]
 kernfs_iop_permission+0x14c/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:1428
 do_sys_open fs/open.c:1443 [inline]
 __do_sys_openat fs/open.c:1459 [inline]
 __se_sys_openat fs/open.c:1454 [inline]
 __x64_sys_openat+0xf3/0x120 fs/open.c:1454
 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: 0x0b587599 -> 0x0c08bfa3

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 3302 Comm: syz-executor Not tainted 6.14.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/03/10 16:17 upstream 80e54e84911a 16256247 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in kernfs_iop_permission / kernfs_iop_permission
* Struck through repros no longer work on HEAD.