netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Eric Dumazet <edumazet@google.com>
Cc: dhowells@redhat.com,
	syzbot <syzbot+62cbf263225ae13ff153@syzkaller.appspotmail.com>,
	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
Date: Mon, 18 Sep 2023 11:03:02 +0100	[thread overview]
Message-ID: <3905046.1695031382@warthog.procyon.org.uk> (raw)
In-Reply-To: <3793723.1694795079@warthog.procyon.org.uk>

David Howells <dhowells@redhat.com> 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


  reply	other threads:[~2023-09-18 10:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-13  6:19 [syzbot] [net?] WARNING in __ip6_append_data syzbot
2023-09-13  8:41 ` Eric Dumazet
2023-09-15 15:32   ` David Howells
2023-09-15 16:24   ` David Howells
2023-09-18 10:03     ` David Howells [this message]
2023-09-18 13:58       ` Willem de Bruijn
2023-09-18 14:04         ` Eric Dumazet
2023-09-19  8:27           ` Tom Parkin
2023-09-19  9:04             ` Eric Dumazet
2023-09-18 14:46         ` David Howells
2023-09-18 10:11   ` David Howells
2023-09-18 10:33     ` syzbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3905046.1695031382@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=bpf@vger.kernel.org \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=syzbot+62cbf263225ae13ff153@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).