syzbot


KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr

Status: moderation: reported on 2021/06/14 16:23
Reported-by: syzbot+b3b73ea5ad980e8335b5@syzkaller.appspotmail.com
First crash: 639d, last: 3d03h

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

write to 0xffff88811cd4c408 of 4 bytes by task 9898 on cpu 1:
 inotify_remove_from_idr+0x15c/0x310 fs/notify/inotify/inotify_user.c:511
 inotify_ignored_and_remove_idr+0x30/0x60 fs/notify/inotify/inotify_user.c:532
 inotify_freeing_mark+0x19/0x20 fs/notify/inotify/inotify_fsnotify.c:133
 fsnotify_free_mark fs/notify/mark.c:490 [inline]
 fsnotify_destroy_mark+0x1a8/0x1c0 fs/notify/mark.c:499
 __do_sys_inotify_rm_watch fs/notify/inotify/inotify_user.c:817 [inline]
 __se_sys_inotify_rm_watch+0xf7/0x170 fs/notify/inotify/inotify_user.c:794
 __x64_sys_inotify_rm_watch+0x2d/0x40 fs/notify/inotify/inotify_user.c:794
 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+0x63/0xcd

read to 0xffff88811cd4c408 of 4 bytes by task 1844 on cpu 0:
 inotify_handle_inode_event+0x199/0x2e0 fs/notify/inotify/inotify_fsnotify.c:113
 fsnotify_handle_inode_event fs/notify/fsnotify.c:264 [inline]
 fsnotify_handle_event fs/notify/fsnotify.c:316 [inline]
 send_to_group fs/notify/fsnotify.c:364 [inline]
 fsnotify+0x138e/0x1550 fs/notify/fsnotify.c:570
 __fsnotify_parent+0x30b/0x470 fs/notify/fsnotify.c:230
 fsnotify_parent include/linux/fsnotify.h:77 [inline]
 fsnotify_file include/linux/fsnotify.h:99 [inline]
 fsnotify_close include/linux/fsnotify.h:341 [inline]
 __fput+0x1d7/0x510 fs/file_table.c:306
 ____fput+0x11/0x20 fs/file_table.c:353
 task_work_run+0x8e/0x110 kernel/task_work.c:177
 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
 exit_to_user_mode_loop+0x124/0x130 kernel/entry/common.c:169
 exit_to_user_mode_prepare kernel/entry/common.c:201 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline]
 syscall_exit_to_user_mode+0x6a/0x90 kernel/entry/common.c:294
 do_syscall_64+0x37/0x70 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

value changed: 0x000079c9 -> 0xffffffff

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 1844 Comm: syz-executor.2 Not tainted 6.0.0-rc6-syzkaller-00309-g1a61b828566f-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022
==================================================================

Crashes (293):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/09/25 13:14 upstream 1a61b828566f 0042f2b4 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/09/24 15:06 upstream a63f2e7cb110 0042f2b4 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/09/21 10:30 upstream 60891ec99e14 380f82fb .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/09/18 19:06 upstream 38eddeedbbea dd9a85ff .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/09/17 01:51 upstream 6879c2d3b960 dd9a85ff .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/09/15 13:40 upstream 3245cb65fd91 dd9a85ff .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/09/15 02:08 upstream 3245cb65fd91 b884348d .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/09/14 05:37 upstream d1221cea11fc b884348d .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/09/12 22:41 upstream 80e78fcce86d f371ed7e .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/09/08 04:29 upstream 0066f1b0e275 435aeef7 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/09/06 11:09 upstream 53e99dcff61e 65aea2b9 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/09/06 10:09 upstream 53e99dcff61e 9dcd38fc .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/09/05 14:27 upstream 7e18e42e4b28 922294ab .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/09/05 04:49 upstream 7e18e42e4b28 28811d0a .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/09/04 14:48 upstream 7726d4c3e60b 28811d0a .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/09/03 09:09 upstream d895ec7938c4 49e94a20 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/09/02 17:57 upstream 42e66b1cc3a0 25194605 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/08/31 07:07 upstream dcf8e5633e2e 4a380809 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/08/29 10:38 upstream 8379c0b31fbc 07177916 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/08/27 09:30 upstream e022620b5d05 07177916 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/08/26 13:44 upstream 4c612826bec1 e5a303f1 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/08/25 11:46 upstream c40e8341e3b3 514514f6 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/08/23 07:58 upstream 072e51356cd5 26a13b38 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/08/19 17:53 upstream 4c2d0b039c5c 26a13b38 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/08/19 06:26 upstream 573ae4f13f63 26a13b38 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/08/16 10:24 upstream 7ebfc85e2cd7 7a7cb304 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/08/14 20:40 upstream 7ebfc85e2cd7 8dfcaa3d .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/08/11 18:30 upstream ffcf9c5700e4 787ed7e0 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/08/10 05:48 upstream 426b4ca2d6a5 c2a623d6 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/08/08 08:10 upstream 4e23eeebb2e5 88e3a122 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/08/07 14:17 upstream 1612c382ffbd 88e3a122 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/08/03 18:27 upstream e2b542100719 1c9013ac .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/08/02 06:45 upstream 9de1f9c8ca51 fef302b1 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/07/30 19:27 upstream 620725263f42 fef302b1 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/07/30 17:20 upstream e65c6a46df94 fef302b1 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/07/29 18:56 upstream 6e2c0490769e fef302b1 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/07/28 06:03 upstream 6e7765cb477a fb95c74d .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/07/27 08:42 upstream 5de64d44968e ae971e66 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/07/25 15:21 upstream e0dccc3b76fb 664c519c .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/07/24 11:40 upstream 515f71412bb7 22343af4 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/07/23 18:01 upstream 70664fc10c0d 22343af4 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/07/19 05:23 upstream 80e19f34c288 ff988920 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/07/16 04:02 upstream 9b59ec8d50a1 95cb00d1 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/07/14 13:31 upstream 4a57a8400075 5d921b08 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2021/06/14 13:11 upstream 009c9aa5be65 1ba81399 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2021/06/12 13:57 upstream ad347abe4a98 1ba81399 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2020/12/27 19:20 upstream f838f8d2b694 2242f77f .config log report info
* Struck through repros no longer work on HEAD.