syzbot


KCSAN: data-race in __fput / setattr_copy

Status: auto-obsoleted due to no activity on 2024/08/28 10:06
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+63e7b0bda6a14dbfe7e7@syzkaller.appspotmail.com
First crash: 45d, last: 45d

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

write to 0xffff888115c194d8 of 2 bytes by task 3075 on cpu 0:
 setattr_copy+0x297/0x2b0 fs/attr.c:317
 shmem_setattr+0x532/0x830 mm/shmem.c:1238
 notify_change+0x814/0x8a0 fs/attr.c:495
 chmod_common+0x13c/0x270 fs/open.c:654
 do_fchmodat fs/open.c:702 [inline]
 __do_sys_chmod fs/open.c:726 [inline]
 __se_sys_chmod fs/open.c:724 [inline]
 __x64_sys_chmod+0x92/0x110 fs/open.c:724
 x64_sys_call+0x14a9/0x2e00 arch/x86/include/generated/asm/syscalls_64.h:91
 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 0xffff888115c194d8 of 2 bytes by task 4906 on cpu 1:
 fsnotify_parent include/linux/fsnotify.h:84 [inline]
 fsnotify_file include/linux/fsnotify.h:131 [inline]
 fsnotify_close include/linux/fsnotify.h:412 [inline]
 __fput+0x222/0x6f0 fs/file_table.c:408
 ____fput+0x15/0x20 fs/file_table.c:450
 task_work_run+0x13a/0x1a0 kernel/task_work.c:222
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:114 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
 syscall_exit_to_user_mode+0xbe/0x130 kernel/entry/common.c:218
 do_syscall_64+0xd6/0x1c0 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x6180 -> 0x61b0

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 4906 Comm: syz.3.340 Not tainted 6.10.0-syzkaller-12246-g786c8248dbd3 #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/07/24 10:05 upstream 786c8248dbd3 57b2edb1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __fput / setattr_copy
* Struck through repros no longer work on HEAD.