Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp60480rdb; Mon, 18 Sep 2023 08:16:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHubZPB0EmaqwnfeIJ+gDNkho31JpJxUz/sT/wcAJkeKaVzVlMI9fX4IjC2EDmgEP79WADI X-Received: by 2002:a17:902:d4c9:b0:1c5:6f4d:d6cc with SMTP id o9-20020a170902d4c900b001c56f4dd6ccmr3272096plg.22.1695050176692; Mon, 18 Sep 2023 08:16:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695050176; cv=none; d=google.com; s=arc-20160816; b=DME8j+Op9zxla5/HCE50v8GWBXq+16gyyYGzdIPrNUyL10VInynVlSKtCNa5omS9A9 9ngXLldTWaJZGsuFUrkYvWX9PfatRuiP+n+U+jMLCT8/sdsImOpdvTmEwLWoyrgexMuM c9EQ7i8Tx+y/7AAIeMw9+vu24oirY+P8f+KYH561hvAkKiRqCGVmOEyN1qAwG3XzYMeq ZT/52KB+088m+7z4HVRDVH4G00BExcU32OmVGvR5ZWJYfD5nFjwPn6ZVjzzhoPcPJJPm w7m6mRIu6Y/2ey5Uoca0RTn0jnBsTsOy35/FyghnwL61jihr3qmlwuYmNA+X/1DcQke7 YeUA== 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=KHQ1/UuyBZLpfUL6czplgqv9YFzz7xn0PsYaq4PItgo=; fh=ynSMyPFtcDCsrqY8ZT9n/XHAtieBbZi8AMcHpdQ+ZYQ=; b=NPNZAyAFdmtHCV3XxUCkFsqZMsPschCua9ETwTladrDF9AvStZ82o+JsDi8WgYUa39 +jz+RhH5OvqSkP5HqHfSwOqXz9H01h+Xo5ilsLsfk0Cv/YWsLQhFAuLDiDbyCul8VGl+ GFrtSGaBBjVhgi2Sy0a4qfrNtJqozIZjapu1Ce9WlstE2OQ8m+5TjtXlo0rpAuXnJBPq pbVfP+y9YdCyBNZrp+EGFibP/nNDpvyn1lLD6DFe50tJRO2Vb1thXdUgnE4vYsB2GcmI 7cZCkaXKeKJgwbPM8GB7LmQG4gon50gQS23OwmdLU/SH6uSKIwuyC2cL38tyK4msOQVo fzBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ba1yaAca; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id e5-20020a636905000000b00573f8a53378si8185402pgc.58.2023.09.18.08.16.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 08:16:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ba1yaAca; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id B8C23801BFE8; Mon, 18 Sep 2023 03:05:14 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234537AbjIRKEs (ORCPT + 99 others); Mon, 18 Sep 2023 06:04:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241122AbjIRKEZ (ORCPT ); Mon, 18 Sep 2023 06:04:25 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CB7F12D for ; Mon, 18 Sep 2023 03:03:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695031386; 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=KHQ1/UuyBZLpfUL6czplgqv9YFzz7xn0PsYaq4PItgo=; b=Ba1yaAcaroRpJDJYaGfg9tXRcpohLqvasWH451/8/vOdbtqkERGPDX1QJRvFeQa3PFPr8I gZPfvUB32un3ROsE50rKRbN0zIad0WtOGG93Y5h8geGt56B3pz/CeIbBp/vg4ElI7DKWhU j+55PsgKeaBrOg1M6JWx8V3QLVuqRis= 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-458-7I-FY3CRN5Wqikm7tOozwQ-1; Mon, 18 Sep 2023 06:03:04 -0400 X-MC-Unique: 7I-FY3CRN5Wqikm7tOozwQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (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 EC910101A550; Mon, 18 Sep 2023 10:03:03 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.216]) by smtp.corp.redhat.com (Postfix) with ESMTP id A8044C15BB8; Mon, 18 Sep 2023 10:03:02 +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: <3793723.1694795079@warthog.procyon.org.uk> References: <3793723.1694795079@warthog.procyon.org.uk> <0000000000001c12b30605378ce8@google.com> To: Eric Dumazet Cc: dhowells@redhat.com, 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: <3905045.1695031382.1@warthog.procyon.org.uk> Date: Mon, 18 Sep 2023 11:03:02 +0100 Message-ID: <3905046.1695031382@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 18 Sep 2023 03:05:15 -0700 (PDT) David Howells wrote: > I think the attached is probably an equivalent cleaned up reproducer. Note > that if the length given to sendfile() is less than 65536, it fails with > EINVAL before it gets into __ip6_append_data(). Actually, it only fails with EINVAL if the size is not a multiple of the block size of the source file because it's open O_DIRECT so, say, 65536-512 is fine (and works). But thinking more on this further, is this even a bug in my code, I wonder? The length passed is 65536 - but a UDP packet can't carry that, so it shouldn't it have errored out before getting that far? (which is what it seems to do when I try it). I don't see how we get past the length check in ip6_append_data() with the reproducer we're given unless the MTU is somewhat bigger than 65536 (is that even possible?) David