syzbot


KCSAN: data-race in selinux_file_permission / selinux_inode_post_setxattr

Status: auto-closed as invalid on 2022/08/15 09:58
Subsystems: selinux
[Documentation on labels]
First crash: 653d, last: 653d

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

write to 0xffff888101f78844 of 4 bytes by task 7855 on cpu 0:
 selinux_inode_post_setxattr+0x217/0x2b0 security/selinux/hooks.c:3280
 security_inode_post_setxattr+0x8b/0xd0 security/security.c:1377
 __vfs_setxattr_noperm+0x356/0x3e0 fs/xattr.c:220
 __vfs_setxattr_locked+0x1a8/0x1c0 fs/xattr.c:277
 vfs_setxattr+0x145/0x2a0 fs/xattr.c:303
 do_setxattr fs/xattr.c:588 [inline]
 setxattr fs/xattr.c:611 [inline]
 path_setxattr+0x2d8/0x390 fs/xattr.c:630
 __do_sys_lsetxattr fs/xattr.c:653 [inline]
 __se_sys_lsetxattr fs/xattr.c:649 [inline]
 __x64_sys_lsetxattr+0x66/0x80 fs/xattr.c:649
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x46/0xb0

read to 0xffff888101f78844 of 4 bytes by task 7845 on cpu 1:
 selinux_file_permission+0x1e6/0x350 security/selinux/hooks.c:3587
 security_file_permission+0x42/0xa0 security/security.c:1517
 rw_verify_area+0x85/0x140 fs/read_write.c:385
 do_splice_to fs/splice.c:787 [inline]
 splice_direct_to_actor+0x23a/0x660 fs/splice.c:870
 do_splice_direct+0xfb/0x180 fs/splice.c:979
 do_sendfile+0x3ad/0x900 fs/read_write.c:1262
 __do_sys_sendfile64 fs/read_write.c:1327 [inline]
 __se_sys_sendfile64 fs/read_write.c:1313 [inline]
 __x64_sys_sendfile64+0x10c/0x150 fs/read_write.c:1313
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x46/0xb0

value changed: 0x0000007e -> 0x0000008f

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 7845 Comm: syz-executor.1 Not tainted 5.19.0-rc6-syzkaller-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/07/11 09:56 upstream 32346491ddf2 f3f217ff .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in selinux_file_permission / selinux_inode_post_setxattr
* Struck through repros no longer work on HEAD.