syzbot


KCSAN: data-race in avc_policy_seqno / avc_ss_reset

Status: auto-obsoleted due to no activity on 2024/09/30 10:46
Subsystems: selinux
[Documentation on labels]
Reported-by: syzbot+d2d06053a1fc1ce869cb@syzkaller.appspotmail.com
First crash: 42d, last: 42d

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

write to 0xffffffff88baae08 of 4 bytes by task 4513 on cpu 1:
 avc_latest_notif_update security/selinux/avc.c:584 [inline]
 avc_ss_reset+0x218/0x250 security/selinux/avc.c:973
 selinux_notify_policy_change security/selinux/ss/services.c:2174 [inline]
 security_set_bools+0x30b/0x350 security/selinux/ss/services.c:3093
 sel_commit_bools_write+0x1e4/0x260 security/selinux/selinuxfs.c:1328
 do_loop_readv_writev fs/read_write.c:764 [inline]
 vfs_writev+0x402/0x880 fs/read_write.c:973
 do_writev+0xf8/0x220 fs/read_write.c:1018
 __do_sys_writev fs/read_write.c:1091 [inline]
 __se_sys_writev fs/read_write.c:1088 [inline]
 __x64_sys_writev+0x45/0x50 fs/read_write.c:1088
 x64_sys_call+0x1f18/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:21
 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 0xffffffff88baae08 of 4 bytes by task 3421 on cpu 0:
 avc_policy_seqno+0x15/0x20 security/selinux/avc.c:1208
 selinux_file_permission+0x218/0x360 security/selinux/hooks.c:3639
 security_file_permission+0x43/0x70 security/security.c:2722
 rw_verify_area fs/read_write.c:377 [inline]
 vfs_read+0x133/0x6e0 fs/read_write.c:467
 ksys_read+0xeb/0x1b0 fs/read_write.c:619
 __do_sys_read fs/read_write.c:629 [inline]
 __se_sys_read fs/read_write.c:627 [inline]
 __x64_sys_read+0x42/0x50 fs/read_write.c:627
 x64_sys_call+0x27d3/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:1
 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: 0x00000001 -> 0x00000002

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 3421 Comm: udevd Not tainted 6.11.0-rc5-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/08/26 10:45 upstream 5be63fc19fca d7d32352 .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.