syzbot


KCSAN: data-race in fsnotify / fsnotify_detach_mark

Status: auto-closed as invalid on 2020/06/18 13:43
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 1097d, last: 950d
similar bugs (7):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in fsnotify / fsnotify_detach_mark (5) 2 737d 723d 0/24 auto-closed as invalid on 2020/12/28 12:08
upstream KCSAN: data-race in fsnotify / fsnotify_detach_mark (4) 1 793d 793d 0/24 auto-closed as invalid on 2020/11/02 17:43
upstream KCSAN: data-race in fsnotify / fsnotify_detach_mark (8) 1 341d 341d 0/24 auto-closed as invalid on 2022/01/29 00:14
upstream KCSAN: data-race in fsnotify / fsnotify_detach_mark (7) 1 421d 421d 0/24 auto-closed as invalid on 2021/11/09 20:25
upstream KCSAN: data-race in fsnotify / fsnotify_detach_mark (6) 1 696d 696d 0/24 auto-closed as invalid on 2021/02/08 06:39
upstream KCSAN: data-race in fsnotify / fsnotify_detach_mark (2) 1 888d 888d 0/24 auto-closed as invalid on 2020/07/31 05:33
upstream KCSAN: data-race in fsnotify / fsnotify_detach_mark (3) 1 837d 837d 0/24 auto-closed as invalid on 2020/09/19 20:21

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

write to 0xffff888125664674 of 4 bytes by task 27523 on cpu 1:
 fsnotify_detach_mark+0xa4/0x1d0 fs/notify/mark.c:386
 fsnotify_clear_marks_by_group+0x293/0x320 fs/notify/mark.c:757
 fsnotify_destroy_group+0x5a/0x190 fs/notify/group.c:60
 fanotify_release+0x20e/0x240 fs/notify/fanotify/fanotify_user.c:555
 __fput+0x1e9/0x500 fs/file_table.c:280
 ____fput+0x1b/0x30 fs/file_table.c:313
 task_work_run+0xba/0x120 kernel/task_work.c:123
 tracehook_notify_resume include/linux/tracehook.h:188 [inline]
 exit_to_usermode_loop+0x2ae/0x2c0 arch/x86/entry/common.c:165
 prepare_exit_to_usermode arch/x86/entry/common.c:196 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:279 [inline]
 do_syscall_64+0x38b/0x3b0 arch/x86/entry/common.c:305
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff888125664674 of 4 bytes by task 27525 on cpu 0:
 send_to_group fs/notify/fsnotify.c:202 [inline]
 fsnotify+0x417/0x830 fs/notify/fsnotify.c:366
 fsnotify_file include/linux/fsnotify.h:78 [inline]
 fsnotify_modify include/linux/fsnotify.h:257 [inline]
 do_iter_write fs/read_write.c:1003 [inline]
 do_iter_write+0x212/0x3a0 fs/read_write.c:980
 vfs_iter_write+0x56/0x80 fs/read_write.c:1040
 iter_file_splice_write+0x530/0x830 fs/splice.c:760
 do_splice_from fs/splice.c:863 [inline]
 direct_splice_actor+0x97/0xb0 fs/splice.c:1037
 splice_direct_to_actor+0x22f/0x540 fs/splice.c:992
 do_splice_direct+0x152/0x1d0 fs/splice.c:1080
 do_sendfile+0x380/0x800 fs/read_write.c:1521
 __do_sys_sendfile64 fs/read_write.c:1576 [inline]
 __se_sys_sendfile64 fs/read_write.c:1568 [inline]
 __x64_sys_sendfile64+0xb8/0x140 fs/read_write.c:1568
 do_syscall_64+0xc7/0x3b0 arch/x86/entry/common.c:295
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 27525 Comm: syz-executor.5 Not tainted 5.7.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (6):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2020/04/24 10:10 https://github.com/google/ktsan.git kcsan 7c3cd68e5d38 03d97a1b .config log report
ci2-upstream-kcsan-gce 2020/03/06 02:52 https://github.com/google/ktsan.git kcsan 766d004d1b85 b655d91b .config log report
ci2-upstream-kcsan-gce 2020/02/24 19:02 https://github.com/google/ktsan.git kcsan 766d004d1b85 1253d6f0 .config log report
ci2-upstream-kcsan-gce 2020/01/13 09:50 https://github.com/google/ktsan.git kcsan 245a43005292 53faa9fe .config log report
ci2-upstream-kcsan-gce 2019/12/23 12:49 https://github.com/google/ktsan.git kcsan 245a43005292 be5c2c81 .config log report
ci2-upstream-kcsan-gce 2019/11/30 04:37 https://github.com/google/ktsan.git kcsan ef798c30ba4e 3a75be00 .config log report
* Struck through repros no longer work on HEAD.