netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Eric Dumazet <edumazet@google.com>
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 18:05:07 +0800	[thread overview]
Message-ID: <Y7vm00H/+oVXqsya@gondor.apana.org.au> (raw)
In-Reply-To: <CANn89iJTtmdT0HsUtVMBdWeuj8pNY-FN6hkv0Z3QYr8_Yt_3Rg@mail.gmail.com>

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?

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

  reply	other threads:[~2023-01-09 10:07 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 [this message]
2023-01-09 10:08         ` Eric Dumazet
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=Y7vm00H/+oVXqsya@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --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).