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: 52d, last: 2d20h
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 271d 271d 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 127d 185d 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 0xffffffff88e76c48 of 4 bytes by task 21698 on cpu 1:
 avc_latest_notif_update security/selinux/avc.c:582 [inline]
 avc_ss_reset+0x20c/0x240 security/selinux/avc.c:971
 selinux_notify_policy_change security/selinux/ss/services.c:2205 [inline]
 security_set_bools+0x301/0x340 security/selinux/ss/services.c:3130
 sel_commit_bools_write+0x1ea/0x270 security/selinux/selinuxfs.c:1332
 do_loop_readv_writev include/linux/uio.h:-1 [inline]
 vfs_writev+0x3eb/0x870 fs/read_write.c:1057
 do_writev+0xe7/0x210 fs/read_write.c:1101
 __do_sys_writev fs/read_write.c:1169 [inline]
 __se_sys_writev fs/read_write.c:1166 [inline]
 __x64_sys_writev+0x45/0x50 fs/read_write.c:1166
 x64_sys_call+0x2006/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:21
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd0/0x1a0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffffffff88e76c48 of 4 bytes by task 15222 on cpu 0:
 avc_policy_seqno+0x15/0x30 security/selinux/avc.c:1207
 selinux_file_open+0x140/0x370 security/selinux/hooks.c:3994
 security_file_open+0x36/0x70 security/security.c:3114
 do_dentry_open+0x204/0xa20 fs/open.c:933
 vfs_open+0x37/0x1e0 fs/open.c:1086
 do_open fs/namei.c:3880 [inline]
 path_openat+0x1c5e/0x2170 fs/namei.c:4039
 do_filp_open+0x109/0x230 fs/namei.c:4066
 do_sys_openat2+0xa6/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+0xf2/0x120 fs/open.c:1455
 x64_sys_call+0x1af/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:258
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd0/0x1a0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x000000c1 -> 0x000000c2

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 15222 Comm: syz-executor Not tainted 6.15.0-rc7-syzkaller-00014-gd608703fcdd9 #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
==================================================================
EXT4-fs (loop5): unmounting filesystem 00000000-0000-0000-0000-000000000000.

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/05/22 07:26 upstream d608703fcdd9 0919b50b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in avc_policy_seqno / avc_ss_reset
2025/05/16 05:43 upstream fee3e843b309 cfde8269 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in avc_policy_seqno / avc_ss_reset
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.