syzbot


KCSAN: data-race in fsnotify_perm / setattr_copy

Status: auto-closed as invalid on 2021/08/17 01:02
Subsystems: fs
[Documentation on labels]
First crash: 1243d, last: 1243d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in fsnotify_perm / setattr_copy (5) fs 1 334d 333d 0/28 auto-obsoleted due to no activity on 2024/02/12 19:37
upstream KCSAN: data-race in fsnotify_perm / setattr_copy (3) fs 1 1053d 1053d 0/28 auto-closed as invalid on 2022/02/23 05:39
upstream KCSAN: data-race in fsnotify_perm / setattr_copy (4) ext4 1 465d 465d 0/28 auto-obsoleted due to no activity on 2023/10/04 00:14
upstream KCSAN: data-race in fsnotify_perm / setattr_copy (2) ext4 1 1180d 1180d 0/28 auto-closed as invalid on 2021/10/19 09:08

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

write to 0xffff888100b21310 of 2 bytes by task 29971 on cpu 1:
 setattr_copy+0x1af/0x1c0 fs/attr.c:247
 shmem_setattr+0xb0/0x450 mm/shmem.c:1118
 notify_change+0x8a3/0xa80 fs/attr.c:398
 chmod_common+0x11c/0x250 fs/open.c:585
 vfs_fchmod fs/open.c:601 [inline]
 __do_sys_fchmod fs/open.c:610 [inline]
 __se_sys_fchmod fs/open.c:604 [inline]
 __x64_sys_fchmod+0xac/0xf0 fs/open.c:604
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888100b21310 of 2 bytes by task 5890 on cpu 0:
 fsnotify_parent include/linux/fsnotify.h:56 [inline]
 fsnotify_file include/linux/fsnotify.h:90 [inline]
 fsnotify_perm+0x20c/0x2e0 include/linux/fsnotify.h:115
 security_file_permission+0x87/0xa0 security/security.c:1509
 rw_verify_area+0x136/0x250 fs/read_write.c:400
 vfs_read+0xde/0x5d0 fs/read_write.c:487
 ksys_read+0xce/0x180 fs/read_write.c:634
 __do_sys_read fs/read_write.c:644 [inline]
 __se_sys_read fs/read_write.c:642 [inline]
 __x64_sys_read+0x3e/0x50 fs/read_write.c:642
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0x90 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x201a -> 0x200c

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 5890 Comm: agetty Not tainted 5.14.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/07/13 00:55 upstream 7fef2edf7cc7 f415556d .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in fsnotify_perm / setattr_copy
* Struck through repros no longer work on HEAD.