syzbot


KCSAN: data-race in avc_policy_seqno / avc_ss_reset (3)

Status: moderation: reported on 2025/04/03 01:45
Subsystems: selinux
[Documentation on labels]
Reported-by: syzbot+a7f7cb0737bd91aa698c@syzkaller.appspotmail.com
First crash: 1d08h, last: 1d08h
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in avc_policy_seqno / avc_ss_reset selinux 1 220d 220d 0/28 auto-obsoleted due to no activity on 2024/09/30 10:46
upstream KCSAN: data-race in avc_policy_seqno / avc_ss_reset (2) selinux 6 76d 134d 0/28 auto-obsoleted due to no activity on 2025/03/14 17:24

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

write to 0xffffffff88e9dbe8 of 4 bytes by task 16776 on cpu 1:
 avc_latest_notif_update security/selinux/avc.c:582 [inline]
 avc_ss_reset+0x218/0x250 security/selinux/avc.c:971
 selinux_notify_policy_change security/selinux/ss/services.c:2205 [inline]
 security_set_bools+0x30b/0x350 security/selinux/ss/services.c:3130
 sel_commit_bools_write+0x1ed/0x270 security/selinux/selinuxfs.c:1332
 vfs_write+0x295/0x950 fs/read_write.c:682
 ksys_pwrite64 fs/read_write.c:791 [inline]
 __do_sys_pwrite64 fs/read_write.c:799 [inline]
 __se_sys_pwrite64 fs/read_write.c:796 [inline]
 __x64_sys_pwrite64+0xfb/0x150 fs/read_write.c:796
 x64_sys_call+0xab9/0x2e10 arch/x86/include/generated/asm/syscalls_64.h:19
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffffffff88e9dbe8 of 4 bytes by task 16380 on cpu 0:
 avc_policy_seqno+0x15/0x20 security/selinux/avc.c:1207
 selinux_file_open+0x152/0x3c0 security/selinux/hooks.c:3994
 security_file_open+0x33/0x70 security/security.c:3114
 do_dentry_open+0x1fa/0xa20 fs/open.c:933
 vfs_open+0x38/0x1e0 fs/open.c:1086
 do_open fs/namei.c:3845 [inline]
 path_openat+0x1b1c/0x2000 fs/namei.c:4004
 do_filp_open+0x115/0x240 fs/namei.c:4031
 do_sys_openat2+0xaa/0x110 fs/open.c:1429
 do_sys_open fs/open.c:1444 [inline]
 __do_sys_openat fs/open.c:1460 [inline]
 __se_sys_openat fs/open.c:1455 [inline]
 __x64_sys_openat+0xf8/0x120 fs/open.c:1455
 x64_sys_call+0x1ac/0x2e10 arch/x86/include/generated/asm/syscalls_64.h:258
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00000025 -> 0x00000026

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 16380 Comm: syz-executor Not tainted 6.14.0-syzkaller-12508-g92b71befc349 #0 PREEMPT(voluntary) 
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/04/03 01:44 upstream 92b71befc349 c799dfdd .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in avc_policy_seqno / avc_ss_reset
* Struck through repros no longer work on HEAD.