From: Eric Dumazet <edumazet@google.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Kyle Zeng <zengyhkyle@gmail.com>,
Jakub Kicinski <kuba@kernel.org>,
davem@davemloft.net, yoshfuji@linux-ipv6.org, dsahern@kernel.org,
pabeni@redhat.com, netdev@vger.kernel.org
Subject: Re: net: ipv6: raw: fixes null pointer deference in rawv6_push_pending_frames
Date: Mon, 9 Jan 2023 11:08:08 +0100 [thread overview]
Message-ID: <CANn89i+B6ZWJpHEPBS=cQxpa=R8LU=fO+CisdbM9bA9aCwE3_Q@mail.gmail.com> (raw)
In-Reply-To: <Y7vm00H/+oVXqsya@gondor.apana.org.au>
On Mon, Jan 9, 2023 at 11:05 AM Herbert Xu <herbert@gondor.apana.org.au> wrote:
>
> On Mon, Jan 09, 2023 at 09:45:14AM +0100, Eric Dumazet wrote:
> >
> > OK, but it seems we would be in an error condition, and would need to
> > purge sk_write_queue ?
>
> No the bug is elsewhere. We already checked whether the offset
> is valid at the top of the function:
>
> total_len = inet_sk(sk)->cork.base.length;
> if (offset >= total_len - 1) {
> err = -EINVAL;
> ip6_flush_pending_frames(sk);
> goto out;
> }
>
> So we should figure out why the socket cork queue contains less
> data than it claims.
>
> Do we have a reproducer?
Kyle posted one in https://lore.kernel.org/netdev/Y7s%2FFofVXLwoVgWt@westworld/
Thanks.
>
> Thanks,
> --
> Email: Herbert Xu <herbert@gondor.apana.org.au>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
next prev parent reply other threads:[~2023-01-09 10:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-06 21:19 net: ipv6: raw: fixes null pointer deference in rawv6_push_pending_frames Kyle Zeng
2023-01-06 22:55 ` Jakub Kicinski
2023-01-06 23:12 ` Kyle Zeng
2023-01-06 23:57 ` Jakub Kicinski
2023-01-08 22:09 ` Kyle Zeng
2023-01-09 8:45 ` Eric Dumazet
2023-01-09 10:05 ` Herbert Xu
2023-01-09 10:08 ` Eric Dumazet [this message]
2023-01-10 0:59 ` [PATCH] ipv6: raw: Deduct extension header length " Herbert Xu
2023-01-11 12:50 ` 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='CANn89i+B6ZWJpHEPBS=cQxpa=R8LU=fO+CisdbM9bA9aCwE3_Q@mail.gmail.com' \
--to=edumazet@google.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=herbert@gondor.apana.org.au \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=yoshfuji@linux-ipv6.org \
--cc=zengyhkyle@gmail.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).