From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: David Howells <dhowells@redhat.com>,
Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: dhowells@redhat.com, netdev@vger.kernel.org,
syzbot+f527b971b4bdc8e79f9e@syzkaller.appspotmail.com,
bpf@vger.kernel.org, brauner@kernel.org, davem@davemloft.net,
dsahern@kernel.org, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, axboe@kernel.dk, viro@zeniv.linux.org.uk,
linux-fsdevel@vger.kernel.org, syzkaller-bugs@googlegroups.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] udp: Fix __ip_append_data()'s handling of MSG_SPLICE_PAGES
Date: Tue, 01 Aug 2023 17:11:49 -0400 [thread overview]
Message-ID: <64c975155d6f3_1d4d6f2941e@willemb.c.googlers.com.notmuch> (raw)
In-Reply-To: <1501753.1690920713@warthog.procyon.org.uk>
David Howells wrote:
> Willem de Bruijn <willemdebruijn.kernel@gmail.com> wrote:
>
> > __ip6_append_data probably needs the same.
>
> Now that's interesting. __ip6_append_data() has a check for this and returns
> -EINVAL in this case:
>
> copy = datalen - transhdrlen - fraggap - pagedlen;
> if (copy < 0) {
> err = -EINVAL;
> goto error;
> }
>
> but should I bypass that check for MSG_SPLICE_PAGES? It hits the check when
> it should be able to get past it. The code seems to go back to prehistoric
> times, so I'm not sure why it's there.
Argh, saved by inconsistency between the two stacks.
I don't immediately understand the race that caused this code to move,
in commit 232cd35d0804 ("ipv6: fix out of bound writes in __ip6_append_data()").
Maybe a race with a mtu update?
Technically there is no Fixes tag to apply, so this would not be a fix
for net.
If we want equivalent behavior, a patch removing this branch is probably
best sent to net-next, in a way that works from the start.
next prev parent reply other threads:[~2023-08-01 21:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-01 15:48 [PATCH net] udp: Fix __ip_append_data()'s handling of MSG_SPLICE_PAGES David Howells
2023-08-01 16:21 ` Willem de Bruijn
2023-08-01 16:57 ` David Howells
2023-08-01 20:11 ` David Howells
2023-08-01 21:11 ` Willem de Bruijn [this message]
2023-08-02 14:27 ` Willem de Bruijn
2023-08-03 2:30 ` patchwork-bot+netdevbpf
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=64c975155d6f3_1d4d6f2941e@willemb.c.googlers.com.notmuch \
--to=willemdebruijn.kernel@gmail.com \
--cc=axboe@kernel.dk \
--cc=bpf@vger.kernel.org \
--cc=brauner@kernel.org \
--cc=davem@davemloft.net \
--cc=dhowells@redhat.com \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=syzbot+f527b971b4bdc8e79f9e@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=viro@zeniv.linux.org.uk \
/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).