netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Ttttabcd <ttttabcd@protonmail.com>
Cc: Netdev <netdev@vger.kernel.org>,
	David Miller <davem@davemloft.net>,
	"kuznet@ms2.inr.ac.ru" <kuznet@ms2.inr.ac.ru>,
	"yoshfuji@linux-ipv6.org" <yoshfuji@linux-ipv6.org>
Subject: Re: [PATCH] fragment: Improved handling of incorrect IP fragments
Date: Thu, 2 Jan 2020 11:27:31 -0800	[thread overview]
Message-ID: <20200102112731.299b5fe4@hermes.lan> (raw)
In-Reply-To: <u0QFePiYSfxBeUsNVFRhPjsGViwg-pXLIApJaVLdUICuvLTQg5y5-rdNhh9lPcDsyO24c7wXxy5m6b6dK0aB6kqR0ypk8X9ekiLe3NQ3ICY=@protonmail.com>

On Tue, 31 Dec 2019 01:19:27 +0000
Ttttabcd <ttttabcd@protonmail.com> wrote:

> @@ -267,8 +278,6 @@ static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff *skb,
>  	payload_len = ((skb->data - skb_network_header(skb)) -
>  		       sizeof(struct ipv6hdr) + fq->q.len -
>  		       sizeof(struct frag_hdr));
> -	if (payload_len > IPV6_MAXPLEN)
> -		goto out_oversize;

You can not safely drop this check.
With recursive fragmentation it is possible that the initial payload ends
up exceeding the maximum packet length.

  reply	other threads:[~2020-01-02 19:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-31  1:19 [PATCH] fragment: Improved handling of incorrect IP fragments Ttttabcd
2020-01-02 19:27 ` Stephen Hemminger [this message]
2020-01-03  0:44   ` Ttttabcd
2020-01-07  0:06     ` Stephen Hemminger
2020-01-07  0:37       ` Ttttabcd
2020-01-12 15:14       ` Ttttabcd

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=20200102112731.299b5fe4@hermes.lan \
    --to=stephen@networkplumber.org \
    --cc=davem@davemloft.net \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=netdev@vger.kernel.org \
    --cc=ttttabcd@protonmail.com \
    --cc=yoshfuji@linux-ipv6.org \
    /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).