netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: agl@imperialviolet.org
Cc: jmorris@namei.org, netdev@vger.kernel.org
Subject: Re: [PATCH] Fix corrupt TCP packets when options space overflows with MD5SIG enabled
Date: Tue, 03 Jun 2008 09:44:00 -0700 (PDT)	[thread overview]
Message-ID: <20080603.094400.267474563.davem@davemloft.net> (raw)
In-Reply-To: <396556a20806030931s9e8ec42hba9e39d9fe3514f1@mail.gmail.com>

From: "Adam Langley" <agl@imperialviolet.org>
Date: Tue, 3 Jun 2008 09:31:02 -0700

> It looks, on second glance, that this code in
> tcp_build_and_update_options will include the options even though we
> calculated the size without:
> 
> if (tp->rx_opt.eff_sacks) {
> 	struct tcp_sack_block *sp = tp->rx_opt.dsack ? tp->duplicate_sack :
> tp->selective_acks;
> 	int this_sack;
> 
> 	*ptr++ = htonl((TCPOPT_NOP  << 24) |
> 		       (TCPOPT_NOP  << 16) |
> 		       (TCPOPT_SACK <<  8) |
> 		       (TCPOLEN_SACK_BASE + (tp->rx_opt.eff_sacks *
> 			     TCPOLEN_SACK_PERBLOCK)));
> ...
> 
> Unless I'm missing something, that patch was incomplete and we're
> still sending invalid packets on in the MD5SIG + SACK case.

That's right, the code assumes there is always enough space for
the SACK blocks.

      reply	other threads:[~2008-06-03 16:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-30 18:40 [PATCH] Fix corrupt TCP packets when options space overflows with MD5SIG enabled Adam Langley
2008-05-30 19:02 ` Ben Hutchings
2008-05-30 19:11   ` Adam Langley
2008-05-30 19:17     ` Adam Langley
2008-05-30 20:32       ` Stephen Hemminger
2008-05-31 22:01         ` Adam Langley
2008-05-31 21:57 ` Adam Langley
2008-06-01 23:40   ` James Morris
2008-06-02  6:56     ` David Miller
2008-06-03 16:31     ` Adam Langley
2008-06-03 16:44       ` David Miller [this message]

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=20080603.094400.267474563.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=agl@imperialviolet.org \
    --cc=jmorris@namei.org \
    --cc=netdev@vger.kernel.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).