syzbot


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

Status: moderation: reported on 2024/11/18 01:11
Subsystems: kernfs
[Documentation on labels]
Reported-by: syzbot+4c0fe01a63464cb27a6b@syzkaller.appspotmail.com
First crash: 3d05h, last: 3d05h
Similar bugs (5)
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 342d 342d 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 284d 284d 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 118d 139d 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 193d 193d 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 (5) kernfs 1 63d 63d 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 0xffff8881064ccc80 of 4 bytes by task 3321 on cpu 1:
 inode_set_ctime_to_ts include/linux/fs.h:1678 [inline]
 set_inode_attr fs/kernfs/inode.c:164 [inline]
 kernfs_refresh_inode fs/kernfs/inode.c:177 [inline]
 kernfs_iop_permission+0x17f/0x220 fs/kernfs/inode.c:288
 do_inode_permission fs/namei.c:468 [inline]
 inode_permission+0x18c/0x300 fs/namei.c:535
 may_lookup fs/namei.c:1775 [inline]
 link_path_walk+0x5f3/0x820 fs/namei.c:2366
 path_openat+0x1af/0x1fa0 fs/namei.c:3929
 do_filp_open+0xf7/0x200 fs/namei.c:3960
 do_sys_openat2+0xab/0x120 fs/open.c:1415
 do_sys_open fs/open.c:1430 [inline]
 __do_sys_openat fs/open.c:1446 [inline]
 __se_sys_openat fs/open.c:1441 [inline]
 __x64_sys_openat+0xf3/0x120 fs/open.c:1441
 x64_sys_call+0x1025/0x2d60 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

write to 0xffff8881064ccc80 of 4 bytes by task 3322 on cpu 0:
 inode_set_ctime_to_ts include/linux/fs.h:1678 [inline]
 set_inode_attr fs/kernfs/inode.c:164 [inline]
 kernfs_refresh_inode fs/kernfs/inode.c:177 [inline]
 kernfs_iop_permission+0x17f/0x220 fs/kernfs/inode.c:288
 do_inode_permission fs/namei.c:468 [inline]
 inode_permission+0x18c/0x300 fs/namei.c:535
 may_lookup fs/namei.c:1775 [inline]
 link_path_walk+0x5f3/0x820 fs/namei.c:2366
 path_parentat fs/namei.c:2627 [inline]
 __filename_parentat+0x13c/0x3c0 fs/namei.c:2651
 filename_parentat fs/namei.c:2669 [inline]
 filename_create+0x77/0x2b0 fs/namei.c:4007
 do_mkdirat+0x63/0x2a0 fs/namei.c:4272
 __do_sys_mkdirat fs/namei.c:4295 [inline]
 __se_sys_mkdirat fs/namei.c:4293 [inline]
 __x64_sys_mkdirat+0x4e/0x60 fs/namei.c:4293
 x64_sys_call+0x2cd3/0x2d60 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

value changed: 0x191bdce5 -> 0x01c5d6b3

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 3322 Comm: syz-executor Not tainted 6.12.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/18 01:10 upstream adc218676eef cfe3a04a .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.