From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C6F96C433F5 for ; Sat, 4 Sep 2021 14:48:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A6D7D60FA0 for ; Sat, 4 Sep 2021 14:48:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236703AbhIDOtb (ORCPT ); Sat, 4 Sep 2021 10:49:31 -0400 Received: from relay.sw.ru ([185.231.240.75]:52562 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234792AbhIDOt3 (ORCPT ); Sat, 4 Sep 2021 10:49:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=Content-Type:MIME-Version:Date:Message-ID:From: Subject; bh=tXIHNQoEOkIAybC/J4mKwOIRiIwvVjP5yN4twwIB1v4=; b=C3JzPZ/yP/oFRxBx/ rRUpfsfaDJy3eZiwxS/hYRf2XPPl5aaAzVVEpdGNUaKMVSBHx2x0kHiAAV3D6mILYdYWoFjxwqxfQ PbueUNV9Wy9c9QrWEBClSzMN8MO2DtUZvCbG2hoHA2lCU3kH5uv4MT7CCUShmjXUU+UJMVEm9udV4 =; Received: from [10.93.0.56] by relay.sw.ru with esmtp (Exim 4.94.2) (envelope-from ) id 1mMWy0-000n07-Kv; Sat, 04 Sep 2021 17:48:24 +0300 Subject: Re: WARNING in sk_stream_kill_queues From: Vasily Averin To: Eric Dumazet , Hao Sun , davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org References: <9a35a6f2-9373-6561-341c-8933b537122e@virtuozzo.com> Message-ID: <71e8b315-3f3a-85ae-fede-914269a15272@virtuozzo.com> Date: Sat, 4 Sep 2021 17:48:23 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <9a35a6f2-9373-6561-341c-8933b537122e@virtuozzo.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/3/21 9:10 PM, Vasily Averin wrote: > On 9/3/21 7:56 PM, Eric Dumazet wrote: >> On 9/3/21 12:54 AM, Hao Sun wrote: >>> Hello, >>> >>> When using Healer to fuzz the latest Linux kernel, the following crash >>> was triggered. >>> >>> HEAD commit: 9e9fb7655ed58 Merge tag 'net-next-5.15' >>> git tree: upstream >>> console output: >>> https://drive.google.com/file/d/1AXEQDnn7SPgFAMjqbL03_24-X_8YHoAq/view?usp=sharing >>> kernel config: https://drive.google.com/file/d/1zgxbwaYkrM26KEmJ-5sUZX57gfXtRrwA/view?usp=sharing >>> C reproducer: https://drive.google.com/file/d/1qa4FVNoO-EsJGuDMtGlTxtHW0li-vMSP/view?usp=sharing >>> Syzlang reproducer: >>> https://drive.google.com/file/d/1pL6atNID5ZGzH4GceqyBCOC5IjFfiaVN/view?usp=sharing > >>> If you fix this issue, please add the following tag to the commit: >>> Reported-by: Hao Sun >> >> This is probably a dup, causes skb_expand_head() changes, >> CC Vasily Averin is currently working on a fix. > > Thank you for this report and especially for C reproducer! Eric, this problem is not related to my patches. I've reproduced the problem locally on orignal kernel with original config, then I've applied last version of my patch -- but it did not help, issue was reproduced again, then I've reverted all my patches, see lest below -- and reproduced the problem once again Thank you, Vasily Averin b8a0bb68ac30 (HEAD -> net-next-5.15) Revert "ipv6: allocate enough headroom in ip6_finish_output2()" 1bc2de674a1b Revert "ipv6: ip6_finish_output2: set sk into newly allocated nskb" 780e2f7d9b93 Revert "skbuff: introduce skb_expand_head()" 782eaeed9de7 Revert "ipv6: use skb_expand_head in ip6_finish_output2" 639e9842fc1f Revert "ipv6: use skb_expand_head in ip6_xmit" 3b16ee164bcd Revert "ipv4: use skb_expand_head in ip_finish_output2" ab48caf0e632 Revert "vrf: use skb_expand_head in vrf_finish_output" 4da67a72ceef Revert "ax25: use skb_expand_head" 9b113a8a62f0 Revert "bpf: use skb_expand_head in bpf_out_neigh_v4/6" fc4ab503ce8f Revert "vrf: fix NULL dereference in vrf_finish_output()" >>> ------------[ cut here ]------------ >>> WARNING: CPU: 1 PID: 10229 at net/core/stream.c:207 >>> sk_stream_kill_queues+0x162/0x190 net/core/stream.c:207 >>> Modules linked in: >>> CPU: 1 PID: 10229 Comm: syz-executor Not tainted 5.14.0+ #12 >>> Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS >>> rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org 04/01/2014 >>> RIP: 0010:sk_stream_kill_queues+0x162/0x190 net/core/stream.c:207 >>> Code: 41 5c e9 21 3b ce fd e8 1c 3b ce fd 89 de 48 89 ef e8 62 68 fe >>> ff e8 0d 3b ce fd 8b 95 68 02 00 00 85 d2 74 ca e8 fe 3a ce fd <0f> 0b >>> e8 f7 3a ce fd 8b 85 20 02 00 00 85 c0 74 c3 e8 e8 3a ce fd >>> RSP: 0018:ffffc900080b7c98 EFLAGS: 00010202 >>> RAX: 000000000002a750 RBX: 0000000000000180 RCX: ffffc90002c0d000 >>> RDX: 0000000000040000 RSI: ffffffff836939f2 RDI: ffff8881031f0b40 >>> RBP: ffff8881031f0b40 R08: 0000000000000000 R09: 0000000000000000 >>> R10: 000000000000000d R11: 000000000004f380 R12: ffff8881031f0c90 >>> R13: ffff8881031f0bc0 R14: ffff8881031f0cf0 R15: 0000000000000000 >>> FS: 00007f311adcb700(0000) GS:ffff88813dc00000(0000) knlGS:0000000000000000 >>> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 >>> CR2: 0000000000732190 CR3: 000000010ab01000 CR4: 0000000000752ee0 >>> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 >>> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 >>> PKRU: 55555554 >>> Call Trace: >>> inet_csk_destroy_sock+0x6f/0x1a0 net/ipv4/inet_connection_sock.c:1012 >>> __tcp_close+0x512/0x610 net/ipv4/tcp.c:2869 >>> tcp_close+0x29/0xa0 net/ipv4/tcp.c:2881 >>> inet_release+0x58/0xb0 net/ipv4/af_inet.c:431 >>> __sock_release+0x47/0xf0 net/socket.c:649 >>> sock_close+0x18/0x20 net/socket.c:1314 >>> __fput+0xdf/0x380 fs/file_table.c:280 >>> task_work_run+0x86/0xd0 kernel/task_work.c:164 >>> get_signal+0xde6/0x10b0 kernel/signal.c:2596 >>> arch_do_signal_or_restart+0xa9/0x860 arch/x86/kernel/signal.c:865 >>> handle_signal_work kernel/entry/common.c:148 [inline] >>> exit_to_user_mode_loop kernel/entry/common.c:172 [inline] >>> exit_to_user_mode_prepare+0xf2/0x280 kernel/entry/common.c:209 >>> __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] >>> syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:302 >>> do_syscall_64+0x40/0xb0 arch/x86/entry/common.c:86 >>> entry_SYSCALL_64_after_hwframe+0x44/0xae >>> RIP: 0033:0x46a9a9 >>> Code: f7 d8 64 89 02 b8 ff ff ff ff c3 66 0f 1f 44 00 00 48 89 f8 48 >>> 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d >>> 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 >>> RSP: 002b:00007f311adcac58 EFLAGS: 00000246 ORIG_RAX: 000000000000002c >>> RAX: 0000000000069340 RBX: 000000000078c0a0 RCX: 000000000046a9a9 >>> RDX: 0000000000088012 RSI: 0000000020000380 RDI: 0000000000000004 >>> RBP: 00000000004e4042 R08: 0000000000000000 R09: 0000000000000027 >>> R10: 000000000020c49a R11: 0000000000000246 R12: 000000000078c0a0 >>> R13: 0000000000000000 R14: 000000000078c0a0 R15: 00007ffe75b47830 >>> >