syzbot


KCSAN: data-race in __fsnotify_parent / __fsnotify_recalc_mask (5)

Status: upstream: reported on 2024/07/04 14:22
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+701037856c25b143f1ad@syzkaller.appspotmail.com
First crash: 2d19h, last: 2d19h
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [fs?] KCSAN: data-race in __fsnotify_parent / __fsnotify_recalc_mask (5) 3 (4) 2024/07/05 08:36
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __fsnotify_parent / __fsnotify_recalc_mask (4) fs 2 80d 108d 0/27 auto-obsoleted due to no activity on 2024/05/22 16:38
upstream KCSAN: data-race in __fsnotify_parent / __fsnotify_recalc_mask fs 1 574d 574d 0/27 auto-obsoleted due to no activity on 2023/02/11 07:53
upstream KCSAN: data-race in __fsnotify_parent / __fsnotify_recalc_mask (3) fs 1 244d 209d 0/27 auto-obsoleted due to no activity on 2023/12/25 00:07
upstream KCSAN: data-race in __fsnotify_parent / __fsnotify_recalc_mask (2) fs 1 310d 310d 0/27 auto-obsoleted due to no activity on 2023/10/05 20:31

Sample crash report:
EXT4-fs (loop3): unmounting filesystem 00000000-0000-0000-0000-000000000000.
==================================================================
BUG: KCSAN: data-race in __fsnotify_parent / __fsnotify_recalc_mask

write to 0xffff8881001c9d44 of 4 bytes by task 6671 on cpu 1:
 __fsnotify_recalc_mask+0x216/0x320 fs/notify/mark.c:248
 fsnotify_recalc_mask fs/notify/mark.c:265 [inline]
 fsnotify_add_mark_locked+0x703/0x870 fs/notify/mark.c:781
 fsnotify_add_inode_mark_locked include/linux/fsnotify_backend.h:812 [inline]
 inotify_new_watch fs/notify/inotify/inotify_user.c:620 [inline]
 inotify_update_watch fs/notify/inotify/inotify_user.c:647 [inline]
 __do_sys_inotify_add_watch fs/notify/inotify/inotify_user.c:786 [inline]
 __se_sys_inotify_add_watch+0x66f/0x810 fs/notify/inotify/inotify_user.c:729
 __x64_sys_inotify_add_watch+0x43/0x50 fs/notify/inotify/inotify_user.c:729
 x64_sys_call+0x2af1/0x2d70 arch/x86/include/generated/asm/syscalls_64.h:255
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff8881001c9d44 of 4 bytes by task 10004 on cpu 0:
 fsnotify_object_watched fs/notify/fsnotify.c:187 [inline]
 __fsnotify_parent+0xd4/0x370 fs/notify/fsnotify.c:217
 fsnotify_parent include/linux/fsnotify.h:96 [inline]
 fsnotify_file include/linux/fsnotify.h:131 [inline]
 fsnotify_open include/linux/fsnotify.h:401 [inline]
 vfs_open+0x1be/0x1f0 fs/open.c:1093
 do_open fs/namei.c:3654 [inline]
 path_openat+0x1ad9/0x1fa0 fs/namei.c:3813
 do_filp_open+0xf7/0x200 fs/namei.c:3840
 do_sys_openat2+0xab/0x120 fs/open.c:1413
 do_sys_open fs/open.c:1428 [inline]
 __do_sys_openat fs/open.c:1444 [inline]
 __se_sys_openat fs/open.c:1439 [inline]
 __x64_sys_openat+0xf3/0x120 fs/open.c:1439
 x64_sys_call+0x1057/0x2d70 arch/x86/include/generated/asm/syscalls_64.h:258
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00000000 -> 0x00002008

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 10004 Comm: syz-executor Not tainted 6.10.0-rc6-syzkaller-00069-g795c58e4c7fc #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/07/04 11:32 upstream 795c58e4c7fc 3f2748a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __fsnotify_parent / __fsnotify_recalc_mask
* Struck through repros no longer work on HEAD.