[moderation] [fs?] KCSAN: data-race in fsnotify_detach_mark / inotify_handle_inode_event

3 views
Skip to first unread message

syzbot

unread,
Dec 7, 2023, 7:03:28 PM12/7/23
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: bee0e7762ad2 Merge tag 'for-linus-iommufd' of git://git.ke..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1093f49ce80000
kernel config: https://syzkaller.appspot.com/x/.config?x=ac34c1f29a8029df
dashboard link: https://syzkaller.appspot.com/bug?extid=10e3c00a15f242a8c5a5
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [amir...@gmail.com ja...@suse.cz linux-...@vger.kernel.org linux-...@vger.kernel.org]

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/233be5f65dd2/disk-bee0e776.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/94423738a289/vmlinux-bee0e776.xz
kernel image: https://storage.googleapis.com/syzbot-assets/0b977463fa9a/bzImage-bee0e776.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+10e3c0...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in fsnotify_detach_mark / inotify_handle_inode_event

write to 0xffff88810383ebd4 of 4 bytes by task 16561 on cpu 1:
fsnotify_detach_mark+0xe0/0x190 fs/notify/mark.c:455
fsnotify_destroy_mark+0x97/0x190 fs/notify/mark.c:497
__do_sys_inotify_rm_watch fs/notify/inotify/inotify_user.c:817 [inline]
__se_sys_inotify_rm_watch+0xfd/0x180 fs/notify/inotify/inotify_user.c:794
__x64_sys_inotify_rm_watch+0x31/0x40 fs/notify/inotify/inotify_user.c:794
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x44/0x110 arch/x86/entry/common.c:82
entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffff88810383ebd4 of 4 bytes by task 10261 on cpu 0:
inotify_handle_inode_event+0x2c5/0x310 fs/notify/inotify/inotify_fsnotify.c:132
fsnotify_handle_inode_event+0x19b/0x1f0 fs/notify/fsnotify.c:264
fsnotify_handle_event fs/notify/fsnotify.c:316 [inline]
send_to_group fs/notify/fsnotify.c:364 [inline]
fsnotify+0x101c/0x1150 fs/notify/fsnotify.c:570
__fsnotify_parent+0x307/0x480 fs/notify/fsnotify.c:230
fsnotify_parent include/linux/fsnotify.h:77 [inline]
fsnotify_file include/linux/fsnotify.h:100 [inline]
fsnotify_close include/linux/fsnotify.h:342 [inline]
__fput+0x1da/0x630 fs/file_table.c:380
__fput_sync+0x44/0x50 fs/file_table.c:475
__do_sys_close fs/open.c:1590 [inline]
__se_sys_close+0xfa/0x1a0 fs/open.c:1575
__x64_sys_close+0x1f/0x30 fs/open.c:1575
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x44/0x110 arch/x86/entry/common.c:82
entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x00000003 -> 0x00000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 10261 Comm: syz-executor.5 Not tainted 6.7.0-rc4-syzkaller-00009-gbee0e7762ad2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
==================================================================
EXT4-fs (loop5): unmounting filesystem 00000000-0000-0000-0000-000000000000.
EXT4-fs (loop5): unmounting filesystem 00000000-0000-0000-0000-000000000000.
EXT4-fs (loop5): unmounting filesystem 00000000-0000-0000-0000-000000000000.
EXT4-fs (loop5): unmounting filesystem 00000000-0000-0000-0000-000000000000.
EXT4-fs (loop5): unmounting filesystem 00000000-0000-0000-0000-000000000000.
EXT4-fs (loop5): unmounting filesystem 00000000-0000-0000-0000-000000000000.


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages