[moderation] [fs?] KCSAN: data-race in fasync_remove_entry / sock_wake_async (12)

0 views
Skip to first unread message

syzbot

unread,
Jun 18, 2024, 6:08:22 AM (8 days ago) Jun 18
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 14d7c92f8df9 Revert "mm: mmap: allow for the maximum numbe..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=11dde146980000
kernel config: https://syzkaller.appspot.com/x/.config?x=cd45aedbb3f7637b
dashboard link: https://syzkaller.appspot.com/bug?extid=d7ef1d605864d2350c74
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [alex....@gmail.com bra...@kernel.org chuck...@oracle.com ja...@suse.cz jla...@kernel.org linux-...@vger.kernel.org linux-...@vger.kernel.org vi...@zeniv.linux.org.uk]

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/126222ab61b9/disk-14d7c92f.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/48cd219f1291/vmlinux-14d7c92f.xz
kernel image: https://storage.googleapis.com/syzbot-assets/2216ce34df10/bzImage-14d7c92f.xz

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

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

write to 0xffff888100470a18 of 8 bytes by task 4294 on cpu 0:
fasync_remove_entry+0xd2/0x130 fs/fcntl.c:909
fasync_helper+0x96/0xc0 fs/fcntl.c:1008
sock_fasync+0x60/0xd0 net/socket.c:1446
__fput+0x5fa/0x660 fs/file_table.c:419
____fput+0x15/0x20 fs/file_table.c:450
task_work_run+0x13a/0x1a0 kernel/task_work.c:180
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
exit_to_user_mode_loop kernel/entry/common.c:114 [inline]
exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
__syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
syscall_exit_to_user_mode+0xbe/0x130 kernel/entry/common.c:218
do_syscall_64+0xd6/0x1c0 arch/x86/entry/common.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff888100470a18 of 8 bytes by task 4293 on cpu 1:
sock_wake_async+0x2a/0x120 net/socket.c:1461
sk_wake_async_rcu include/net/sock.h:2443 [inline]
unix_write_space+0x135/0x140 net/unix/af_unix.c:543
sock_wfree+0x11e/0x330 net/core/sock.c:2482
unix_destruct_scm+0xc5/0xf0 net/unix/af_unix.c:1833
skb_release_head_state+0xbb/0x1a0 net/core/skbuff.c:1160
skb_release_all net/core/skbuff.c:1171 [inline]
__kfree_skb+0x16/0x150 net/core/skbuff.c:1187
kfree_skb_reason+0xb0/0x2b0 net/core/skbuff.c:1223
kfree_skb include/linux/skbuff.h:1257 [inline]
unix_release_sock+0x642/0x790 net/unix/af_unix.c:652
unix_release+0x57/0x80 net/unix/af_unix.c:1043
__sock_release net/socket.c:659 [inline]
sock_close+0x68/0x150 net/socket.c:1421
__fput+0x2c2/0x660 fs/file_table.c:422
____fput+0x15/0x20 fs/file_table.c:450
task_work_run+0x13a/0x1a0 kernel/task_work.c:180
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
exit_to_user_mode_loop kernel/entry/common.c:114 [inline]
exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
__syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
syscall_exit_to_user_mode+0xbe/0x130 kernel/entry/common.c:218
do_syscall_64+0xd6/0x1c0 arch/x86/entry/common.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0xffff888117547a80 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 4293 Comm: syz-executor.1 Not tainted 6.10.0-rc4-syzkaller-00033-g14d7c92f8df9 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
==================================================================


---
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