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: 44d, last: 23h34m
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 263d 263d 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 119d 177d 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 3706 on cpu 0:
 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+0x3ee/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 3707 on cpu 1:
 avc_policy_seqno+0x15/0x30 security/selinux/avc.c:1207
 selinux_file_permission+0x1fc/0x360 security/selinux/hooks.c:3645
 security_file_permission+0x3e/0x80 security/security.c:2844
 rw_verify_area fs/read_write.c:471 [inline]
 vfs_read+0x136/0x6f0 fs/read_write.c:561
 ksys_read+0xda/0x1a0 fs/read_write.c:713
 __do_sys_read fs/read_write.c:722 [inline]
 __se_sys_read fs/read_write.c:720 [inline]
 __x64_sys_read+0x40/0x50 fs/read_write.c:720
 x64_sys_call+0x2d77/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:1
 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: 0x00000001 -> 0x00000002

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 3707 Comm: syz-executor Not tainted 6.15.0-rc6-syzkaller-00188-gfee3e843b309 #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
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.