syzbot


KCSAN: data-race in selinux_inode_permission / setattr_copy (5)

Status: moderation: reported on 2024/05/31 03:06
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+1fd914f9286d12366beb@syzkaller.appspotmail.com
First crash: 15d, last: 15d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in selinux_inode_permission / setattr_copy (2) ext4 1 645d 645d 0/27 auto-obsoleted due to no activity on 2022/10/13 08:49
upstream KCSAN: data-race in selinux_inode_permission / setattr_copy (4) ext4 1 253d 253d 0/27 auto-obsoleted due to no activity on 2023/11/09 09:30
upstream KCSAN: data-race in selinux_inode_permission / setattr_copy ext4 1 952d 952d 0/27 auto-closed as invalid on 2021/12/11 01:02
upstream KCSAN: data-race in selinux_inode_permission / setattr_copy (3) ext4 1 301d 301d 0/27 auto-obsoleted due to no activity on 2023/09/22 07:25

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

write to 0xffff888107e78ed8 of 2 bytes by task 17974 on cpu 1:
 setattr_copy+0x29d/0x2c0 fs/attr.c:319
 ext4_setattr+0x3d4/0xeb0 fs/ext4/inode.c:5458
 notify_change+0x814/0x8a0 fs/attr.c:497
 chmod_common+0x13c/0x270 fs/open.c:650
 do_fchmodat fs/open.c:698 [inline]
 __do_sys_fchmodat fs/open.c:717 [inline]
 __se_sys_fchmodat fs/open.c:714 [inline]
 __x64_sys_fchmodat+0xa2/0x120 fs/open.c:714
 x64_sys_call+0x2a6f/0x2d70 arch/x86/include/generated/asm/syscalls_64.h:269
 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 0xffff888107e78ed8 of 2 bytes by task 17973 on cpu 0:
 selinux_inode_permission+0xf3/0x400 security/selinux/hooks.c:3114
 security_inode_permission+0x6e/0xb0 security/security.c:2216
 inode_permission+0xbf/0x300 fs/namei.c:536
 may_lookup fs/namei.c:1718 [inline]
 link_path_walk+0x15e/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]
 __do_sys_chdir fs/open.c:558 [inline]
 __se_sys_chdir+0x4f/0x150 fs/open.c:552
 __x64_sys_chdir+0x1f/0x30 fs/open.c:552
 x64_sys_call+0x2b05/0x2d70 arch/x86/include/generated/asm/syscalls_64.h:81
 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: 0x4000 -> 0x4ed3

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 17973 Comm: syz-executor.0 Not tainted 6.10.0-rc1-syzkaller-00027-g4a4be1ad3a6e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/05/31 03:06 upstream 4a4be1ad3a6e 34889ee3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in selinux_inode_permission / setattr_copy
* Struck through repros no longer work on HEAD.