[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20080603.094400.267474563.davem@davemloft.net>
Date: Tue, 03 Jun 2008 09:44:00 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: agl@...erialviolet.org
Cc: jmorris@...ei.org, netdev@...r.kernel.org
Subject: Re: [PATCH] Fix corrupt TCP packets when options space overflows
with MD5SIG enabled
From: "Adam Langley" <agl@...erialviolet.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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists