syzbot


KCSAN: data-race in do_fcntl / selinux_file_fcntl

Status: moderation: reported on 2024/08/12 02:10
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+b5e0dfc57e7bb9713460@syzkaller.appspotmail.com
First crash: 31d, last: 31d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in do_fcntl / selinux_file_fcntl

read-write to 0xffff8881043ef848 of 4 bytes by task 11645 on cpu 0:
 setfl fs/fcntl.c:82 [inline]
 do_fcntl+0xd53/0xe20 fs/fcntl.c:375
 __do_sys_fcntl fs/fcntl.c:492 [inline]
 __se_sys_fcntl+0xc4/0x190 fs/fcntl.c:477
 __x64_sys_fcntl+0x43/0x50 fs/fcntl.c:477
 x64_sys_call+0x209e/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:73
 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 0xffff8881043ef848 of 4 bytes by task 11644 on cpu 1:
 selinux_file_fcntl+0x138/0x1e0 security/selinux/hooks.c:3894
 security_file_fcntl+0x4b/0x80 security/security.c:2924
 __do_sys_fcntl fs/fcntl.c:490 [inline]
 __se_sys_fcntl+0x88/0x190 fs/fcntl.c:477
 __x64_sys_fcntl+0x43/0x50 fs/fcntl.c:477
 x64_sys_call+0x209e/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:73
 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: 0x00002001 -> 0x00006c01

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 11644 Comm: syz.3.1794 Not tainted 6.11.0-rc2-syzkaller-00315-g7006fe2f7f78 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/08/12 02:09 upstream 7006fe2f7f78 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in do_fcntl / selinux_file_fcntl
* Struck through repros no longer work on HEAD.