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: 517d, last: 3d07h

Sample crash report:
loop3: detected capacity change from 0 to 16
FAT-fs (loop3): bogus number of reserved sectors
FAT-fs (loop3): Can't find a valid FAT filesystem
==================================================================
BUG: KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr

write to 0xffff8881067e3d18 of 4 bytes by task 1908 on cpu 1:
 inotify_remove_from_idr+0x15c/0x310 fs/notify/inotify/inotify_user.c:496
 inotify_ignored_and_remove_idr+0x30/0x60 fs/notify/inotify/inotify_user.c:517
 inotify_freeing_mark+0x19/0x20 fs/notify/inotify/inotify_fsnotify.c:133
 fsnotify_free_mark fs/notify/mark.c:449 [inline]
 fsnotify_destroy_mark+0xbc/0xd0 fs/notify/mark.c:458
 __do_sys_inotify_rm_watch fs/notify/inotify/inotify_user.c:804 [inline]
 __se_sys_inotify_rm_watch+0xf7/0x170 fs/notify/inotify/inotify_user.c:781
 __x64_sys_inotify_rm_watch+0x2d/0x40 fs/notify/inotify/inotify_user.c:781
 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+0x46/0xb0

read to 0xffff8881067e3d18 of 4 bytes by task 4038 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:323 [inline]
 send_to_group fs/notify/fsnotify.c:377 [inline]
 fsnotify+0x13db/0x1680 fs/notify/fsnotify.c:564
 __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:303
 ____fput+0x11/0x20 fs/file_table.c:350
 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+0x46/0xb0

value changed: 0x00000374 -> 0xffffffff

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 4038 Comm: syz-executor.3 Not tainted 5.18.0-syzkaller-02752-gfdaf9a5840ac-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (234):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/05/25 16:48 upstream fdaf9a5840ac 3037caa9 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/05/24 18:39 upstream 143a6252e1b8 fcfad4ff .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/05/18 20:11 upstream ef1302160bfb 50c53f39 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/05/17 00:56 upstream 42226c989789 744a39e2 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/05/14 22:51 upstream ec7f49619d8e 744a39e2 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/05/13 07:07 upstream 0ac824f379fb 9ad6612a .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/05/08 22:54 upstream 379c72654524 e60b1103 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/05/07 01:08 upstream 4b97bac0756a e60b1103 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/05/03 23:22 upstream ef8e4d3c2ab1 dc9e5259 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/05/02 23:11 upstream 9050ba3a61a4 2df221f6 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/05/02 15:00 upstream 672c0c517342 2df221f6 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/05/01 09:17 upstream 57ae8a492116 2df221f6 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/04/30 22:31 upstream 8013d1d3d2e3 2df221f6 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/04/29 21:13 upstream 38d741cb70b3 44a5ca63 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/04/29 00:11 upstream 259b897e5a79 e9076525 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/04/28 04:01 upstream 8f4dd16603ce 8a1f1f07 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/04/24 16:02 upstream 22da5264abf4 131df97d .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/04/19 08:48 upstream b2d229d4ddb1 8bcc32a6 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/04/18 01:17 upstream a2c29ccd9477 8bcc32a6 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/04/17 15:33 upstream 90ea17a9e27b 8bcc32a6 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/04/15 19:38 upstream 028192fea1de 8bcc32a6 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/04/01 22:41 upstream d0d642a5d365 79a2a8fc .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/03/31 05:28 upstream 74164d284b29 9d49f3a7 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/03/29 09:37 upstream ae085d7f9365 6bdac766 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/03/21 04:47 upstream 14702b3b2438 e2d91b1d .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/03/19 07:56 upstream 34e047aa16c0 e2d91b1d .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/03/18 23:39 upstream 551acdc3c3d2 e2d91b1d .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/03/15 11:10 upstream 09688c0166e7 9e8eaa75 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/03/12 20:12 upstream 68453767131a 9e8eaa75 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/03/11 15:58 upstream 79b00034e9dc 9e8eaa75 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/03/09 11:21 upstream 92f90cc9fe0e 9e8eaa75 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/03/08 08:29 upstream ea4424be1688 7bdd8b2c .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/03/04 07:00 upstream 38f80f42147f 45a13a73 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/03/02 16:57 upstream fb184c4af9b9 45a13a73 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/02/26 09:07 upstream c47658311d60 45a13a73 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/02/25 09:51 upstream 53ab78cd6d5a 7c337266 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/02/23 23:38 upstream 5c1ee569660d 6e821dbf .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/02/21 13:53 upstream cfb92440ee71 3cd800e4 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/02/14 07:10 upstream 42964a18f81c 8b9ca619 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/02/11 22:13 upstream 1d41d2e82623 8b9ca619 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/02/01 06:56 upstream 26291c54e111 6b7c57fe .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/01/22 01:37 upstream 9b57f4589857 214351e1 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/01/21 10:36 upstream 2c271fe77d52 ab3d9f17 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/01/18 21:49 upstream 99613159ad74 731a2d23 .config log report info KCSAN: data-race in inotify_handle_inode_event / inotify_remove_from_idr
ci2-upstream-kcsan-gce 2022/01/17 16:44 upstream 0c947b893d69 731a2d23 .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