Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp829460iog; Wed, 29 Jun 2022 11:03:18 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t6Y/uO5/npNGYzE9alsOX+ZDKyzI8nMdNd3yLA2ghBSZnzx7D0APb0NHpDc+R7vhtqsHkT X-Received: by 2002:a17:902:e5d1:b0:16a:3611:1811 with SMTP id u17-20020a170902e5d100b0016a36111811mr10481798plf.101.1656525797987; Wed, 29 Jun 2022 11:03:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656525797; cv=none; d=google.com; s=arc-20160816; b=gAcylQBQXBMVeSR8+4oNMfdIAXICy9pYNF3UVv0sgNs5mZyu2QZaA95DUJ5kE6YM1M YZmxeUItH+tBWLnHMvfuNF09tqAfYDPQosoA5obRdNzCygj3S0tx2okzdyPTs9SPa2tk Bmg++z2SLEcqIGRtdQtqS14YIU6sKzRmuUJ5gJWo5WFy+z6rAG01cwtozZqbmpJ3Kyqw TWLen77hS4Cke5WC4Mq/VMKS9RqbRxZ4RIn9Y1rkRq3fBfMhUsJ8m5FX9kFkKcY9tHRY BMBpBj5S7/8G8FUL+KTH8mbS+EwhMzuhRBFK1i8gP38hQOMWQaGHcJ/qyrqvss6X2FWr g+aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=r2t6L9LYy0VNrjXEDiYIqXvvAyecwYEFPEt6oMidP+M=; b=zXW72941nBhdTChaeolQM/0KeY5P3JDBC8M2YhVGv4Z/zWnGemRTalC7udq07PBvt+ 4i+SVUqKo0PhY5Pk1db/hrs/CMWbzoaun2Te1FlCZq4SlF5Y7CejKMkfbm9h7esczloJ 6udT+BvBlBrPIGaTHWlSNypFg6ibzxkDO1dOpGtxv8Ve6r6o3P22sgM44M9Vm6DF+bEl jv+uLgEyu46L6LZVKZKNTkj0fECQXcxNsweRMW1tqEdxaSYw53OH4eBATYfuZGA6AkRV u8B5Y7y9bm0t6KCg4H5km8riNYsaESDTAF+pXYlFutkl0Qvic2BIDaxd3jfLMtNcFtu3 yNYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=ZEyUikfw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e4-20020a170902784400b0015ea5cf069esi20583626pln.489.2022.06.29.11.03.00; Wed, 29 Jun 2022 11:03:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=ZEyUikfw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231552AbiF2Rpi (ORCPT + 99 others); Wed, 29 Jun 2022 13:45:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231583AbiF2Rpe (ORCPT ); Wed, 29 Jun 2022 13:45:34 -0400 Received: from mail-yw1-x112a.google.com (mail-yw1-x112a.google.com [IPv6:2607:f8b0:4864:20::112a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 322482DA9B for ; Wed, 29 Jun 2022 10:45:32 -0700 (PDT) Received: by mail-yw1-x112a.google.com with SMTP id 00721157ae682-317710edb9dso156004047b3.0 for ; Wed, 29 Jun 2022 10:45:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=r2t6L9LYy0VNrjXEDiYIqXvvAyecwYEFPEt6oMidP+M=; b=ZEyUikfwRzHVsyqq9qIA1U/qmU1o1GkWvepHP9C98fFc57TuK4ZnSZEKmQ/dNpSzMS VlEiuGeHseG0Ny6lOdGaJswYkq5pfypse7A7NuaRFAxsvuOzbzdJMT96Ixn0g5l6si2r RRFlkGg5wJUVdHQ+X2DrjSEp54Zdft949kt66WlfebpwLiaR2VqymQ3iGDyD8Q5PHZLb 7MuproDt76NkJknfZTVLzzH/AHO+JQ3/LCKwu5NghTABbxndEX6qZqfH3EKZZqerzSiV PltrLsv9PEhLPVMZ/EgVJDoT8UH3ISsWc8CxtTVs6W2VUadaa1jiGuxUu+FIVN6W0SLQ Pt0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=r2t6L9LYy0VNrjXEDiYIqXvvAyecwYEFPEt6oMidP+M=; b=xkyAx/V3JxbDs52p18xzwsbZ/74ri5/fjNTmN4Fs4PXDPuH2y48zR1LcOL/EngRqXX BWrYWOygsfy8Ilg6vUCqLx9WbFU5qOYuJ1z16K93paMTKgOCZYV1g917C6Uk81sUuCAA MKP07mrKMxDnGkeWRk5H3/ZNT1tUvf2pEUWmzvDmy9tgbAfQukGhIxYpWIFZYfebHCff s6dXNwYksVM9SEwZjLfwyG4e3D5hI9Lxcttjx6I+looOoV/ejaBtOsEjZ2v+zXHGi18n Ul04ChtF+zyD97gbkCYzKJLfl+B1k1cCLXL1Ch6+eVS+VlrH4Rx09VPy2VhyihLarDMB 4liQ== X-Gm-Message-State: AJIora+HS4nQGLzSwqPVgIo7DODRjzACkB6NnhpYZlDcC2zm78cJ/w/Y +UYkayH9mjisE1KqMDHu9Q2k3IVKaC5MDCf1agtrQw== X-Received: by 2002:a81:1809:0:b0:317:c014:f700 with SMTP id 9-20020a811809000000b00317c014f700mr5364646ywy.255.1656524731116; Wed, 29 Jun 2022 10:45:31 -0700 (PDT) MIME-Version: 1.0 References: <000000000000b06e5505e299a9b6@google.com> In-Reply-To: <000000000000b06e5505e299a9b6@google.com> From: Eric Dumazet Date: Wed, 29 Jun 2022 19:45:19 +0200 Message-ID: Subject: Re: [syzbot] WARNING in sk_stream_kill_queues (8) To: syzbot , Stanislav Fomichev , Cong Wang , Daniel Borkmann , John Fastabend Cc: David Miller , Jakub Kicinski , LKML , netdev , Paolo Abeni , syzkaller-bugs , Wei Wang Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 29, 2022 at 7:41 PM syzbot wrote: > > Hello, > > syzbot found the following issue on: > > HEAD commit: aab35c3d5112 Add linux-next specific files for 20220627 > git tree: linux-next > console+strace: https://syzkaller.appspot.com/x/log.txt?x=126fef90080000 > kernel config: https://syzkaller.appspot.com/x/.config?x=6a874f114a1e4a6b > dashboard link: https://syzkaller.appspot.com/bug?extid=a0e6f8738b58f7654417 > compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14ae0c98080000 > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=145124f4080000 > > IMPORTANT: if you fix the issue, please add the following tag to the commit: > Reported-by: syzbot+a0e6f8738b58f7654417@syzkaller.appspotmail.com > > nf_conntrack: default automatic helper assignment has been turned off for security reasons and CT-based firewall rule not found. Use the iptables CT target to attach helpers instead. > ------------[ cut here ]------------ > WARNING: CPU: 1 PID: 3601 at net/core/stream.c:205 sk_stream_kill_queues+0x2ee/0x3d0 net/core/stream.c:205 > Modules linked in: > CPU: 1 PID: 3601 Comm: syz-executor340 Not tainted 5.19.0-rc4-next-20220627-syzkaller #0 > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 > RIP: 0010:sk_stream_kill_queues+0x2ee/0x3d0 net/core/stream.c:205 > Code: 03 0f b6 04 02 84 c0 74 08 3c 03 0f 8e ec 00 00 00 8b ab 28 02 00 00 e9 60 ff ff ff e8 3b 9a 29 fa 0f 0b eb 97 e8 32 9a 29 fa <0f> 0b eb a0 e8 29 9a 29 fa 0f 0b e9 6a fe ff ff e8 0d a1 75 fa e9 > RSP: 0018:ffffc90002e6fbf0 EFLAGS: 00010293 > RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 > RDX: ffff88801e90ba80 RSI: ffffffff87511cce RDI: 0000000000000005 > RBP: 0000000000000b00 R08: 0000000000000005 R09: 0000000000000000 > R10: 0000000000000b00 R11: 0000000000000004 R12: ffff88801e0c8e28 > R13: ffffffff913121c0 R14: ffff88801e0c8c28 R15: ffff88801e0c8db8 > FS: 0000000000000000(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000 > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > CR2: 000000000045b630 CR3: 000000000ba8e000 CR4: 00000000003506e0 > DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 > DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 > Call Trace: > > inet_csk_destroy_sock+0x1a5/0x440 net/ipv4/inet_connection_sock.c:1013 > __tcp_close+0xb92/0xf50 net/ipv4/tcp.c:2963 > tcp_close+0x29/0xc0 net/ipv4/tcp.c:2975 > inet_release+0x12e/0x270 net/ipv4/af_inet.c:428 > __sock_release+0xcd/0x280 net/socket.c:650 > sock_close+0x18/0x20 net/socket.c:1365 > __fput+0x277/0x9d0 fs/file_table.c:317 > task_work_run+0xdd/0x1a0 kernel/task_work.c:177 > exit_task_work include/linux/task_work.h:38 [inline] > do_exit+0xaf1/0x29f0 kernel/exit.c:795 > do_group_exit+0xd2/0x2f0 kernel/exit.c:925 > __do_sys_exit_group kernel/exit.c:936 [inline] > __se_sys_exit_group kernel/exit.c:934 [inline] > __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:934 > do_syscall_x64 arch/x86/entry/common.c:50 [inline] > do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 > entry_SYSCALL_64_after_hwframe+0x46/0xb0 > RIP: 0033:0x7f080e760989 > Code: Unable to access opcode bytes at RIP 0x7f080e76095f. > RSP: 002b:00007ffcee785818 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 > RAX: ffffffffffffffda RBX: 00007f080e7d4270 RCX: 00007f080e760989 > RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000 > RBP: 0000000000000000 R08: ffffffffffffffc0 R09: 0000000000000010 > R10: 0000000000000010 R11: 0000000000000246 R12: 00007f080e7d4270 > R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000001 > > > > --- > 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 syzkaller@googlegroups.com. > > syzbot will keep track of this issue. See: > https://goo.gl/tpsmEJ#status for how to communicate with syzbot. > syzbot can test patches for this issue, for details see: > https://goo.gl/tpsmEJ#testing-patches Stanislav has bisected the issue to: commit 965b57b469a589d64d81b1688b38dcb537011bb0 Author: Cong Wang Date: Wed Jun 15 09:20:12 2022 -0700 net: Introduce a new proto_ops ->read_skb() Currently both splice() and sockmap use ->read_sock() to read skb from receive queue, but for sockmap we only read one entire skb at a time, so ->read_sock() is too conservative to use. Introduce a new proto_ops ->read_skb() which supports this sematic, with this we can finally pass the ownership of skb to recv actors. For non-TCP protocols, all ->read_sock() can be simply converted to ->read_skb(). Signed-off-by: Cong Wang Signed-off-by: Daniel Borkmann Reviewed-by: John Fastabend Link: https://lore.kernel.org/bpf/20220615162014.89193-3-xiyou.wangcong@gmail.com