syzbot


KCSAN: data-race in inode_doinit_with_dentry / inode_doinit_with_dentry (3)

Status: moderation: reported on 2025/01/22 10:00
Subsystems: selinux
[Documentation on labels]
Reported-by: syzbot+45113f4157790f28cc47@syzkaller.appspotmail.com
First crash: 7d19h, last: 7d19h
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in inode_doinit_with_dentry / inode_doinit_with_dentry (2) selinux 1 283d 283d 0/28 auto-obsoleted due to no activity on 2024/05/26 16:52
upstream KCSAN: data-race in inode_doinit_with_dentry / inode_doinit_with_dentry selinux 1 647d 647d 0/28 auto-obsoleted due to no activity on 2023/05/28 13:10

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

write to 0xffff888112265f82 of 1 bytes by task 7397 on cpu 1:
 inode_doinit_with_dentry+0x29c/0x840 security/selinux/hooks.c:1448
 __inode_security_revalidate security/selinux/hooks.c:300 [inline]
 inode_security security/selinux/hooks.c:325 [inline]
 selinux_file_open+0xff/0x3b0 security/selinux/hooks.c:3978
 security_file_open+0x33/0x70 security/security.c:3104
 do_dentry_open+0x1fa/0xa20 fs/open.c:921
 vfs_open+0x38/0x1f0 fs/open.c:1068
 dentry_open+0x4a/0x90 fs/open.c:1091
 pidfs_alloc_file+0xe6/0x150 fs/pidfs.c:701
 __pidfd_prepare kernel/fork.c:2030 [inline]
 pidfd_prepare+0x5f/0xe0 kernel/fork.c:2078
 pidfd_create kernel/pid.c:605 [inline]
 __do_sys_pidfd_open kernel/pid.c:641 [inline]
 __se_sys_pidfd_open+0x129/0x250 kernel/pid.c:626
 __x64_sys_pidfd_open+0x31/0x40 kernel/pid.c:626
 x64_sys_call+0x11b8/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:435
 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 0xffff888112265f82 of 1 bytes by task 7396 on cpu 0:
 inode_doinit_with_dentry+0x78/0x840 security/selinux/hooks.c:1423
 __inode_security_revalidate security/selinux/hooks.c:300 [inline]
 inode_security security/selinux/hooks.c:325 [inline]
 selinux_file_open+0xff/0x3b0 security/selinux/hooks.c:3978
 security_file_open+0x33/0x70 security/security.c:3104
 do_dentry_open+0x1fa/0xa20 fs/open.c:921
 vfs_open+0x38/0x1f0 fs/open.c:1068
 dentry_open+0x4a/0x90 fs/open.c:1091
 pidfs_alloc_file+0xe6/0x150 fs/pidfs.c:701
 __pidfd_prepare kernel/fork.c:2030 [inline]
 pidfd_prepare+0x5f/0xe0 kernel/fork.c:2078
 pidfd_create kernel/pid.c:605 [inline]
 __do_sys_pidfd_open kernel/pid.c:641 [inline]
 __se_sys_pidfd_open+0x129/0x250 kernel/pid.c:626
 __x64_sys_pidfd_open+0x31/0x40 kernel/pid.c:626
 x64_sys_call+0x11b8/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:435
 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: 0x00 -> 0x01

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 7396 Comm: syz.4.29529 Not tainted 6.13.0-syzkaller-02526-gc4b9570cfb63 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/01/22 09:59 upstream c4b9570cfb63 da72ac06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in inode_doinit_with_dentry / inode_doinit_with_dentry
* Struck through repros no longer work on HEAD.