KCSAN: data-race in fasync_remove_entry / kill_fasync

8 views
Skip to first unread message

syzbot

unread,
Jan 24, 2020, 3:47:09 PM1/24/20
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 245a4300 Merge branch 'rcu/kcsan' into tip/locking/kcsan
git tree: https://github.com/google/ktsan.git kcsan
console output: https://syzkaller.appspot.com/x/log.txt?x=1182bb69e00000
kernel config: https://syzkaller.appspot.com/x/.config?x=a4b9db179318d21f
dashboard link: https://syzkaller.appspot.com/bug?extid=09bf1e5945ed0ef02d92
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
CC: [bfi...@fieldses.org jla...@kernel.org linux-...@vger.kernel.org linux-...@vger.kernel.org vi...@zeniv.linux.org.uk el...@google.com]

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

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+09bf1e...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in fasync_remove_entry / kill_fasync

read to 0xffff88812a17d700 of 8 bytes by interrupt on cpu 1:
kill_fasync+0x3f/0x180 fs/fcntl.c:1019
perf_event_wakeup+0x11f/0x160 kernel/events/core.c:6042
perf_pending_event+0x12d/0x170 kernel/events/core.c:6098
irq_work_run_list+0x136/0x190 kernel/irq_work.c:156
irq_work_run+0x48/0xa0 kernel/irq_work.c:172
smp_irq_work_interrupt+0x3f/0x100 arch/x86/kernel/irq_work.c:21
irq_work_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:860
memcmp+0x43/0x70 lib/string.c:885
memcmp include/linux/string.h:421 [inline]
llc_ui_addr_null net/llc/af_llc.c:85 [inline]
llc_ui_sendmsg+0x530/0xa20 net/llc/af_llc.c:917
sock_sendmsg_nosec net/socket.c:639 [inline]
sock_sendmsg+0x9f/0xc0 net/socket.c:659
____sys_sendmsg+0x212/0x4d0 net/socket.c:2330
___sys_sendmsg+0xb5/0x100 net/socket.c:2384
__sys_sendmmsg+0x123/0x350 net/socket.c:2474
__do_sys_sendmmsg net/socket.c:2503 [inline]
__se_sys_sendmmsg net/socket.c:2500 [inline]
__x64_sys_sendmmsg+0x64/0x80 net/socket.c:2500
do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
entry_SYSCALL_64_after_hwframe+0x44/0xa9

write to 0xffff88812a17d700 of 8 bytes by task 23117 on cpu 0:
fasync_remove_entry+0xba/0x120 fs/fcntl.c:882
fasync_helper+0xcf/0xdc fs/fcntl.c:981
perf_fasync+0x6c/0xa0 kernel/events/core.c:6002
__fput+0x46a/0x520 fs/file_table.c:277
____fput+0x1f/0x30 fs/file_table.c:313
task_work_run+0xf6/0x130 kernel/task_work.c:113
tracehook_notify_resume include/linux/tracehook.h:188 [inline]
exit_to_usermode_loop+0x2b4/0x2c0 arch/x86/entry/common.c:164
prepare_exit_to_usermode arch/x86/entry/common.c:195 [inline]
syscall_return_slowpath arch/x86/entry/common.c:278 [inline]
do_syscall_64+0x384/0x3a0 arch/x86/entry/common.c:304
entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 23117 Comm: syz-executor.0 Not tainted 5.5.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================


---
This bug 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 bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Aug 4, 2020, 8:11:13 AM8/4/20
to syzkaller-upst...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages