Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp377923pxp; Fri, 11 Mar 2022 06:10:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJx8jgbxhw69AB3ucoPGr2/1AVdi6PH72hv6IpipldzM5pLLHZtwhA1JV50eTu2wfJ9L4j30 X-Received: by 2002:a17:90b:1809:b0:1bf:59c:d20b with SMTP id lw9-20020a17090b180900b001bf059cd20bmr21964980pjb.220.1647007821341; Fri, 11 Mar 2022 06:10:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1647007821; cv=none; d=google.com; s=arc-20160816; b=RxZAxcwQtdSFVFmNlBZ1NfnrQ0/e2nKeQ/qOqjN7C7Paw7ECi2i+zwCdpb+IJV3GVm Cn0m12obquJYCc8vGSecPDHAWs55ZfcrlzJtgz5wnhYR4j2e4WG6AeCAnl2Q9SX26pZr U++7vJqKscioyMO2A+U+t57tu2s8St2YoLw7iMvSNoyTilEDRAB3BhK/b+jvtvgjwPTT VqVZ1OfHYkXVDLhCU1tHAEIDthr/c9nV8tvdrDOqG1em8/cFjC7t6rbl1rU0bADuDGn/ 0eKthpbcJvEdqYQL+P/G8+fpLIYqZhLR35RrbjVi+vYHilybMjCB3K8M6G86FxjPWs1T CziA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:dkim-signature; bh=vPDslFAB2WX3+89jiOl8aHGYg43S9qtM0t31/Go73nE=; b=pMSdCPzkpxFD/dHLgt/lSr6vDlqWI4eYw+5lCF6Vu4tliJsTRK4bznGTWp7qgxaG5E pdz1LRzYRNLl+AwD7bd0+rq8fHVdSBnI2/F+AKFP7zSCcHahEOuIkTXAQeWfQ15yEgwh mgkhJMKKJE+e6oWXS3qwyL3O0Aw+9crGUcf/bGsL2k5BZPAq2Q61Uj3Q65Nzih7TywSV rvSziep3bgckIPc56pVoahw1nqmy88aaCb6kqa+LeDfZOS0cpqSB1TDqUEf+gZU0NcUx EyktVJ9+lFUgervD/ExzwPb/drWi26isFG5L8Ir4vhYh60N26LR/h2EnHpD4RkeFo5fW 45fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=k3V0lcgR; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g10-20020a056a0023ca00b004f779b9743dsi5017937pfc.183.2022.03.11.06.10.04; Fri, 11 Mar 2022 06:10:21 -0800 (PST) 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=@linaro.org header.s=google header.b=k3V0lcgR; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240507AbiCJQHf (ORCPT + 99 others); Thu, 10 Mar 2022 11:07:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240737AbiCJQH3 (ORCPT ); Thu, 10 Mar 2022 11:07:29 -0500 Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DA71187E2B for ; Thu, 10 Mar 2022 08:06:17 -0800 (PST) Received: by mail-pg1-x52e.google.com with SMTP id o23so5058032pgk.13 for ; Thu, 10 Mar 2022 08:06:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:content-language:to:cc :references:from:subject:in-reply-to:content-transfer-encoding; bh=vPDslFAB2WX3+89jiOl8aHGYg43S9qtM0t31/Go73nE=; b=k3V0lcgRuAv9K/+lHB10VICnm56R5wMnlGzfUklzmF9p0UV9qKSYyidKibFeSTzT2x tKj7rN1wFW/EZWJDGRenXI2nj/uDIFh5liIn5Tt60CaxkXp5nWeKjH+681f51xaDlLlm L3i3C5dBYYFr9ZxaIMzIo9+KN6qI5r4mnFaXl8Mp7Y4AbKH1kauCgvgrq0xCn4hM/ztH W7jAJHgPGjGt5O52Ri3GSWGdAahrqISrz3v9RwQgTpHNK7WuEAhOr+h6YSh8REfJoDk4 rXDPWXOuzYMFYl5jJF7TAF0zPhMxlFhUYH8S53eHIvzfw1XoGEo8wWbQNgB0uCDVv+Me dCmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent :content-language:to:cc:references:from:subject:in-reply-to :content-transfer-encoding; bh=vPDslFAB2WX3+89jiOl8aHGYg43S9qtM0t31/Go73nE=; b=xLGK0zy/E9/05PiSmUfOjvNdxrc+V0akJ2JqokwFOhCVp/mkfzYWnHymAUKJB0DlEv cUJLbWcIG37AixOjp7vWDApqURNwb+V2UQPSivNrZjJ5xzmlq4RuMIDmVPJN5LjGNNu1 SVvaFkBKg7MWAS9mz9Vad/k6YjWTZIlh6Hp6GuxAgIEsTpa2c/cqusozjqTvwpITxkBA S3QnY5AZgQWbBOl+8teDpPiD3l70gRj3dUj9251yMpJLEoX1v8XqFRvyZb1oDVlgRYKl ZGLO6A8pgzFtWayruFLiZnO4mIBKiAP0oLyR8r5VOityIMpIJ98sueqYPD+142TsdMp6 w21A== X-Gm-Message-State: AOAM530O/JwfknQe9i2yCCMKE3z9vSPjciU8T/nPBWhCqBvZ/zofTo7x hrXNynWqMPXtdaXDo+oMyhdYYg== X-Received: by 2002:a63:6a49:0:b0:37c:7a6e:e7a6 with SMTP id f70-20020a636a49000000b0037c7a6ee7a6mr4615349pgc.545.1646928377027; Thu, 10 Mar 2022 08:06:17 -0800 (PST) Received: from [192.168.254.17] ([50.39.160.154]) by smtp.gmail.com with ESMTPSA id w204-20020a627bd5000000b004f6f70163e8sm7148989pfc.31.2022.03.10.08.06.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Mar 2022 08:06:16 -0800 (PST) Message-ID: Date: Thu, 10 Mar 2022 08:06:15 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US To: Willem de Bruijn Cc: David Ahern , David Laight , "davem@davemloft.net" , Hideaki YOSHIFUJI , Jakub Kicinski , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , "netdev@vger.kernel.org" , "bpf@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" , "syzbot+e223cf47ec8ae183f2a0@syzkaller.appspotmail.com" References: <20220308000146.534935-1-tadeusz.struk@linaro.org> <14626165dad64bbaabed58ba7d59e523@AcuMS.aculab.com> <6155b68c-161b-0745-b303-f7e037b56e28@linaro.org> <66463e26-8564-9f58-ce41-9a2843891d1a@kernel.org> <45522c89-a3b4-4b98-232b-9c69470124a3@linaro.org> <8fdab42f-171f-53d7-8e0e-b29161c0e3e2@linaro.org> From: Tadeusz Struk Subject: Re: [PATCH] net: ipv6: fix invalid alloclen in __ip6_append_data In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 3/10/22 06:39, Willem de Bruijn wrote: > On Wed, Mar 9, 2022 at 4:37 PM Tadeusz Struk wrote: >> >> On 3/8/22 21:01, David Ahern wrote: >>> On 3/8/22 12:46 PM, Tadeusz Struk wrote: >>>> That fails in the same way: >>>> >>>> skbuff: skb_over_panic: text:ffffffff83e7b48b len:65575 put:65575 >>>> head:ffff888101f8a000 data:ffff888101f8a088 tail:0x100af end:0x6c0 >>>> dev: >>>> ------------[ cut here ]------------ >>>> kernel BUG at net/core/skbuff.c:113! >>>> invalid opcode: 0000 [#1] PREEMPT SMP KASAN >>>> CPU: 0 PID: 1852 Comm: repro Not tainted >>>> 5.17.0-rc7-00020-gea4424be1688-dirty #19 >>>> Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1.fc35 >>>> RIP: 0010:skb_panic+0x173/0x175 >>>> >>>> I'm not sure how it supposed to help since it doesn't change the >>>> alloclen at all. >>> >>> alloclen is a function of fraglen and fraglen is a function of datalen. >> >> Ok, but in this case it doesn't affect the alloclen and it still fails. > > This is some kind of non-standard packet that is being constructed. Do > we understand how it is different? > > The .syz reproducer is generally a bit more readable than the .c > equivalent. Though not as much as an strace of the binary, if you > can share that. > > r0 = socket$inet6_icmp_raw(0xa, 0x3, 0x3a) > connect$inet6(r0, &(0x7f0000000040)={0xa, 0x0, 0x0, @dev, 0x6}, 0x1c) > setsockopt$inet6_IPV6_HOPOPTS(r0, 0x29, 0x36, > &(0x7f0000000100)=ANY=[@ANYBLOB="52b3"], 0x5a0) > sendmmsg$inet(r0, &(0x7f00000002c0)=[{{0x0, 0x0, > &(0x7f0000000000)=[{&(0x7f00000000c0)="1d2d", 0xfa5f}], 0x1}}], 0x1, > 0xfe80) Here it is: https://termbin.com/krtr It won't be of much help, I'm afraid, as the offending sendmmsg() call isn't fully printed. -- Thanks, Tadeusz