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: 766d, last: 6d04h

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

write to 0xffff8881037c4778 of 4 bytes by task 3377 on cpu 0:
 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 0xffff8881037c4778 of 4 bytes by task 3134 on cpu 1:
 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+0x4b0/0x570 fs/file_table.c:306
 ____fput+0x11/0x20 fs/file_table.c:348
 task_work_run+0xde/0x110 kernel/task_work.c:179
 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
 exit_to_user_mode_loop+0x124/0x130 kernel/entry/common.c:171
 exit_to_user_mode_prepare kernel/entry/common.c:203 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline]
 syscall_exit_to_user_mode+0x6a/0x90 kernel/entry/common.c:296
 do_syscall_64+0x37/0x70 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

value changed: 0x0000071d -> 0xffffffff

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 3134 Comm: syz-executor.3 Not tainted 6.2.0-rc5-syzkaller-00047-g7c46948a6e9c-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023
==================================================================

Crashes (317):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci2-upstream-kcsan-gce 2023/01/27 12:10 upstream 7c46948a6e9c 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2023/01/24 18:13 upstream 7bf70dbb1882 9dfcf09c .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2023/01/16 19:51 upstream 5dc4c995db9e a63719e7 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2023/01/16 00:07 upstream 7c6984405241 a63719e7 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2023/01/10 06:19 upstream 1fe4fd6f5cad 48bc529a .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2023/01/07 04:47 upstream 1f5abbd77e2c 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2023/01/05 04:15 upstream 69b41ac87e4a 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/12/27 20:08 upstream 1b929c02afd3 44712fbc .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/12/26 07:41 upstream 1b929c02afd3 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/12/24 08:56 upstream 51094a24b85e 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/12/19 17:41 upstream f9ff5644bcc0 05494336 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/12/14 08:37 upstream 764822972d64 f6511626 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/12/11 20:59 upstream 4cee37b3a4e6 67be1ae7 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/12/04 21:08 upstream c2bf05db6c78 e080de16 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/11/21 16:23 upstream eb7081409f94 5bb70014 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/11/19 17:22 upstream ab290eaddc4c 5bb70014 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/11/11 17:18 upstream 4bbf3422df78 f42ee5d8 .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/11/02 11:46 upstream f526d6a82242 08977f5d .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/10/31 03:52 upstream b72018ab8236 2a71366b .config console log report info [disk image] [vmlinux] [kernel image] KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/10/22 11:18 upstream 440b7895c990 c0b80a55 .config console log report info [disk image] [vmlinux] KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/10/12 04:20 upstream 60bb8154d1d7 02b6492e .config console log report info [disk image] [vmlinux] KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/10/11 10:29 upstream e2302539dd4f 5bcf0c31 .config console log report info [disk image] [vmlinux] KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/10/10 06:51 upstream 4899a36f91a9 aea5da89 .config console log report info [disk image] [vmlinux] KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/10/03 18:52 upstream 4fe89d07dcc2 feb56351 .config console log report info [disk image] [vmlinux] KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/09/25 13:14 upstream 1a61b828566f 0042f2b4 .config console log report info [disk image] [vmlinux] 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 console log report info [disk image] [vmlinux] 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 console log report info [disk image] [vmlinux] 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 console log report info [disk image] [vmlinux] 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 console log report info [disk image] [vmlinux] 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 console log report info [disk image] [vmlinux] 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 console log report info [disk image] [vmlinux] 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 console log report info [disk image] [vmlinux] 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 console log report info [disk image] [vmlinux] 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 console log report info [disk image] [vmlinux] 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 console log report info [disk image] [vmlinux] 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 console log report info [disk image] [vmlinux] 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 console log report info [disk image] [vmlinux] 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 console 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 console log report info [disk image] [vmlinux] 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 console log report info [disk image] [vmlinux] 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 console log report info [disk image] [vmlinux] 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 console log report info [disk image] [vmlinux] 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 console log report info [disk image] [vmlinux] 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 console log report info [disk image] [vmlinux] 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 console 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 console 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 console 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 console 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 console 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 console 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 console log report info
* Struck through repros no longer work on HEAD.