syzbot


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

Status: moderation: reported on 2024/07/01 00:14
Subsystems: kernfs
[Documentation on labels]
Reported-by: syzbot+cd7299efd53d383f40c3@syzkaller.appspotmail.com
First crash: 3d13h, last: 3d13h
Similar bugs (3)
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 203d 203d 0/27 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 144d 144d 0/27 auto-obsoleted due to no activity on 2024/03/16 21:17
upstream KCSAN: data-race in kernfs_iop_permission / kernfs_iop_permission (3) kernfs 1 53d 53d 0/27 auto-obsoleted due to no activity on 2024/06/15 22:09

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

write to 0xffff8881040ba060 of 8 bytes by task 11628 on cpu 0:
 inode_set_atime_to_ts include/linux/fs.h:1557 [inline]
 set_inode_attr fs/kernfs/inode.c:162 [inline]
 kernfs_refresh_inode fs/kernfs/inode.c:177 [inline]
 kernfs_iop_permission+0x118/0x220 fs/kernfs/inode.c:288
 do_inode_permission fs/namei.c:461 [inline]
 inode_permission+0x18c/0x300 fs/namei.c:528
 may_lookup fs/namei.c:1726 [inline]
 link_path_walk+0x1b8/0x810 fs/namei.c:2273
 path_lookupat+0x72/0x2b0 fs/namei.c:2492
 filename_lookup+0x127/0x300 fs/namei.c:2522
 user_path_at_empty+0x42/0x120 fs/namei.c:2929
 user_path_at include/linux/namei.h:58 [inline]
 ksys_umount fs/namespace.c:1916 [inline]
 __do_sys_umount fs/namespace.c:1924 [inline]
 __se_sys_umount fs/namespace.c:1922 [inline]
 __x64_sys_umount+0x88/0xe0 fs/namespace.c:1922
 x64_sys_call+0x3af/0x2d70 arch/x86/include/generated/asm/syscalls_64.h:167
 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 0xffff8881040ba060 of 8 bytes by task 11589 on cpu 1:
 inode_set_atime_to_ts include/linux/fs.h:1557 [inline]
 set_inode_attr fs/kernfs/inode.c:162 [inline]
 kernfs_refresh_inode fs/kernfs/inode.c:177 [inline]
 kernfs_iop_permission+0x118/0x220 fs/kernfs/inode.c:288
 do_inode_permission fs/namei.c:461 [inline]
 inode_permission+0x18c/0x300 fs/namei.c:528
 may_lookup fs/namei.c:1726 [inline]
 link_path_walk+0x1b8/0x810 fs/namei.c:2273
 path_parentat fs/namei.c:2540 [inline]
 __filename_parentat+0x13c/0x3c0 fs/namei.c:2564
 filename_parentat fs/namei.c:2582 [inline]
 do_unlinkat+0x9b/0x4c0 fs/namei.c:4382
 __do_sys_unlink fs/namei.c:4455 [inline]
 __se_sys_unlink fs/namei.c:4453 [inline]
 __x64_sys_unlink+0x30/0x40 fs/namei.c:4453
 x64_sys_call+0x28a3/0x2d70 arch/x86/include/generated/asm/syscalls_64.h:88
 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: 0x0000000030ac424b -> 0x0000000000a4528a

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 11589 Comm: syz-executor Not tainted 6.10.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/07/01 00:14 upstream 22a40d14b572 757f06b1 .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.