Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp82572rdb; Mon, 18 Sep 2023 08:47:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHotP7iRFjGNuzRW3U9vbzG/HvxkB5CzZ2nnwZn3xYZX0kGQggGocouhhfiVMDqoLDjbGW6 X-Received: by 2002:a05:6a21:3e0b:b0:153:8983:d8bf with SMTP id bk11-20020a056a213e0b00b001538983d8bfmr6869089pzc.16.1695052022704; Mon, 18 Sep 2023 08:47:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695052022; cv=none; d=google.com; s=arc-20160816; b=XNfgPij0D+d9e1LId5qlH6BljrZIMpPoqmhp4DEVBVGTDCHX/yTu8au47nZBvJisxw PBKadu0P03CQ4Hn/9I6sBACTifA1Zhz/GWjnkO242dPbzGE8Rq40laWnq1+z8Fj5oM+4 QilB0reueIAAuYs1HRtupmTLje8o19byhkGTXOvLmliyW1bHToISMwPfGBKlIyLHgEqP Qzll6qGKikEGpBXw36jFXWAo3BN3f9UOit7flKHLOiGrYt6/4a1B8Dxu6wk+KA/eWhib 5oMedJvoKC+q0Uwhj34T2i5rwuz724zWLALAr/BeeDmX7WrSPZqsX5uu3UTTPxs2vhMY SAvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-id:mime-version:subject :cc:to:references:in-reply-to:from:organization:dkim-signature; bh=sJqX1sGDZxCaO6XqvDak7bVSlywdTalhVTk58OTxlhc=; fh=VuFViJ2DDEEN+ayHQddMyqgg8d8Ufeub4kj8H8wSxPM=; b=IU5YcER1hcdrpLxDV5ND2mEtoCcl3nkmgRFxcpmPN1mbPGIGQlKmAsVme+B1Jt4cdn Jx8UNuHdKK7ItR5syNhlGBeQd5XhnuxJNE7GaKcFqixE6sfG/JeT9G61FXCetYT2XAO4 5uIJrmn2MubQfzffGLnBDJQIZfBI3RbDqhFiWLlCtz0ORtiP8by66pjWDWMlNk64IAL4 Q5Zgnj6eHlna3m3dA0wDjJ0YGtWQ5Ce2S17mS1W8aDow72JhOsvz0C5rkxhdgDvRKqe7 hV4hPZAMGAq0P1kJko/XyGg0c8fVVBlH9LOjelgFCjHYHIELaXgq3rq7wGd4hJX5M5Mp wCKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JtSI5Wpm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id ff11-20020a056a002f4b00b0068fb6e2859dsi8077442pfb.45.2023.09.18.08.47.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 08:47:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JtSI5Wpm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 20F76819AD89; Mon, 18 Sep 2023 08:18:10 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229485AbjIRPSK (ORCPT + 99 others); Mon, 18 Sep 2023 11:18:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231694AbjIRPSJ (ORCPT ); Mon, 18 Sep 2023 11:18:09 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 416CF138 for ; Mon, 18 Sep 2023 08:17:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695050221; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=sJqX1sGDZxCaO6XqvDak7bVSlywdTalhVTk58OTxlhc=; b=JtSI5WpmKF997NCEDeW9A8Yalptm6G6x371g8oELnCh9yFALOsLTlZN4NVLJ5WcFnwkgT+ A3IEQ1lYfpp+fgdzX9yFHM1/8yy/6ag36Qao1JbZ/0kChHTGpBkV+X1h9v4cCFUQqW56TH YM1H68t+YLVhi8P2WXuqfm1cYQbv+gk= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-351-fx8Km0DFOuGpnqu3F2U_Iw-1; Mon, 18 Sep 2023 10:46:18 -0400 X-MC-Unique: fx8Km0DFOuGpnqu3F2U_Iw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B24FA802E5A; Mon, 18 Sep 2023 14:46:15 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.216]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4BCBF1005E27; Mon, 18 Sep 2023 14:46:14 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <65085768c17da_898cd294ae@willemb.c.googlers.com.notmuch> References: <65085768c17da_898cd294ae@willemb.c.googlers.com.notmuch> <3793723.1694795079@warthog.procyon.org.uk> <0000000000001c12b30605378ce8@google.com> <3905046.1695031382@warthog.procyon.org.uk> To: Willem de Bruijn Cc: dhowells@redhat.com, Eric Dumazet , syzbot , bpf@vger.kernel.org, davem@davemloft.net, dsahern@kernel.org, kuba@kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, pabeni@redhat.com, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [net?] WARNING in __ip6_append_data MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4138873.1695048373.1@warthog.procyon.org.uk> Date: Mon, 18 Sep 2023 15:46:13 +0100 Message-ID: <4138874.1695048373@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 18 Sep 2023 08:18:10 -0700 (PDT) Willem de Bruijn wrote: > > An ipv6 packet can carry 64KB of payload, so maxnonfragsize of 65535 + 40 > sounds correct. But payload length passed of 65536 is not (ignoring ipv6 > jumbograms). So that should probably trigger an EINVAL -- if that is indeed > what the repro does. The problem is that on entry to __ip6_append_data(), the length includes transhdrlen. However, this is a problem if we already have something in the packet. At that point, this fails: if (WARN_ON_ONCE(copy > msg->msg_iter.count)) goto error; because copy includes transhdrlen. David