syzbot


KCSAN: data-race in selinux_cred_prepare / selinux_inode_permission (2)

Status: moderation: reported on 2025/11/10 05:18
Subsystems: selinux
[Documentation on labels]
Reported-by: syzbot+00a653d846b0a48a964b@syzkaller.appspotmail.com
First crash: 1d05h, last: 1d05h
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in selinux_cred_prepare / selinux_inode_permission selinux 6 3 85d 137d 0/29 auto-obsoleted due to no activity on 2025/10/12 14:45

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

write to 0xffff88811ac89c20 of 4 bytes by task 3652 on cpu 1:
 task_avdcache_search security/selinux/hooks.c:3150 [inline]
 selinux_inode_permission+0x3ac/0x740 security/selinux/hooks.c:3225
 security_inode_permission+0x6d/0xb0 security/security.c:2363
 inode_permission+0x106/0x310 fs/namei.c:601
 may_lookup fs/namei.c:1858 [inline]
 link_path_walk+0x162/0x900 fs/namei.c:2467
 path_lookupat+0x63/0x2a0 fs/namei.c:2675
 filename_lookup+0x147/0x340 fs/namei.c:2705
 user_path_at+0x3e/0x130 fs/namei.c:3215
 vfs_open_tree+0xef/0x530 fs/namespace.c:3094
 __do_sys_open_tree fs/namespace.c:3109 [inline]
 __se_sys_open_tree fs/namespace.c:3104 [inline]
 __x64_sys_open_tree+0x45/0xc0 fs/namespace.c:3104
 x64_sys_call+0x2a8b/0x3000 arch/x86/include/generated/asm/syscalls_64.h:429
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff88811ac89c00 of 104 bytes by task 3651 on cpu 0:
 selinux_cred_prepare+0x60/0x70 security/selinux/hooks.c:4167
 security_prepare_creds+0xbb/0x120 security/security.c:3315
 prepare_creds+0x34a/0x4c0 kernel/cred.c:242
 __sys_setuid+0x67/0x310 kernel/sys.c:663
 __do_sys_setuid kernel/sys.c:700 [inline]
 __se_sys_setuid kernel/sys.c:698 [inline]
 __x64_sys_setuid+0x1e/0x30 kernel/sys.c:698
 x64_sys_call+0x1a84/0x3000 arch/x86/include/generated/asm/syscalls_64.h:106
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 3651 Comm: syz.0.57 Tainted: G        W           syzkaller #0 PREEMPT(voluntary) 
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/11/10 05:18 upstream e9a6fb0bcdd7 4e1406b4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in selinux_cred_prepare / selinux_inode_permission
* Struck through repros no longer work on HEAD.