Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C6D0630CFE for ; Fri, 15 Sep 2023 15:32:33 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8F057E6A for ; Fri, 15 Sep 2023 08:32:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694791951; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7RVB1hOIPfQpHaOi4Yk7qJuVpzOQ7elLy/nnGKg1a4U=; b=HMhl1Tt9KPMA8eTvo/V/XvgZSt6SPVqZk/6MW2rQlbrs8XSUoiUMxZwmufBiMgJmb0xC47 Si8fJIjIk0gZLCa+SiWXolUF440OHuc3XN/OxGiD7UnK26nM0bkeRqN2dUGxcQQzzo1XgA M05iLCILZ2bshLVV7Y0B8KcUmW7px0Y= 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-91-G74hyFSSMxyKHRVlRWqTQA-1; Fri, 15 Sep 2023 11:32:23 -0400 X-MC-Unique: G74hyFSSMxyKHRVlRWqTQA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (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 B2CEC94593E; Fri, 15 Sep 2023 15:32:22 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.216]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6F91C40C6EA8; Fri, 15 Sep 2023 15:32:21 +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: References: <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 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3792061.1694791940.1@warthog.procyon.org.uk> Content-Transfer-Encoding: quoted-printable Date: Fri, 15 Sep 2023 16:32:20 +0100 Message-ID: <3792062.1694791940@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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_BLOCKED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Hi Eric, > > WARNING: CPU: 1 PID: 5042 at net/ipv6/ip6_output.c:1800 __ip6_append_d= ata.isra.0+0x1be8/0x47f0 net/ipv6/ip6_output.c:1800 That would appear to be this: if (WARN_ON_ONCE(copy > msg->msg_iter.count)) goto error; However, I have a problem that the repro program errors out at this point before it gets that far: if (cork->length + length > maxnonfragsize - headersize) { emsgsize: pmtu =3D max_t(int, mtu - headersize + sizeof(struct ipv6hdr), 0); ipv6_local_error(sk, EMSGSIZE, fl6, pmtu); return -EMSGSIZE; } Are you able to reproduce the issue? The values in and around that point are: cork->length 0 length 65540 maxnonfragsize 65575 headersize 40 transhdrlen 4 mtu 65536 ip6_sk_ignore_df(sk) true with maxnonfragsize coming from 'sizeof(struct ipv6hdr) + IPV6_MAXPLEN'. = Is that even viable for the size of a packet? David