[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANn89i+bomkxUcUMghsS9wA5MfTwbVL9vNCzKCidAG8nxNZQ0Q@mail.gmail.com>
Date: Wed, 1 Jul 2020 10:24:17 -0700
From: Eric Dumazet <edumazet@...gle.com>
To: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
netdev <netdev@...r.kernel.org>,
Yuchung Cheng <ycheng@...gle.com>,
Jonathan Rajotte-Julien <joraj@...icios.com>
Subject: Re: [regression] TCP_MD5SIG on established sockets
On Tue, Jun 30, 2020 at 3:07 PM Eric Dumazet <edumazet@...gle.com> wrote:
> Oh well, tcp_syn_options() is supposed to have the same logic.
>
> Maybe we have an issue with SYNCOOKIES (with MD5 + TS + SACK)
>
> Nice can of worms.
Yes, MD5 does not like SYNCOOKIES in some cases.
In this trace, S is a linux host, the SYNACK is a syncookie.
C host is attempting a SYN with MD5+TS+SACK, which a standard linux
host would not attempt.
But we could expect another stack to attempt this combination.
TCP stack believes it can encode selected TCP options (in the TSVAL value),
but since MD5 option is set, TS option is not sent in the SYNACK.
However we still send other options that MUST not be sent if TS option
could not fit the TCP option space.
10:12:15.464591 IP C > S: Flags [S], seq 4202415601, win 65535,
options [nop,nop,md5 valid,mss 65495,sackOK,TS val 456965269 ecr
0,nop,wscale 8], length 0
10:12:15.464602 IP S > C: Flags [S.], seq 253516766, ack 4202415602,
win 65535, options [nop,nop,md5 valid,mss
65495,nop,nop,sackOK,nop,wscale 8], length 0
<When ACK packets comes back from client, the server has no state and
no TS ecr value, so must assume no option was negotiated>
10:12:15.464611 IP C > S: Flags [.], ack 1, win 256, options
[nop,nop,md5 valid], length 0
10:12:15.464678 IP C > S: Flags [P.], seq 1:13, ack 1, win 256,
options [nop,nop,md5 valid], length 12
10:12:15.464685 IP S > C: Flags [.], ack 13, win 65535, options
[nop,nop,md5 valid], length 0
We can see for instance the windows are wrong by a 256 factor (wscale 8)
Powered by blists - more mailing lists