[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 5 May 2017 02:24:56 +0200
From: Florian Westphal <fw@...len.de>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: David Miller <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>, Florian Westphal <fw@...len.de>,
Yuchung Cheng <ycheng@...gle.com>
Subject: Re: [PATCH net] tcp: randomize timestamps on syncookies
Eric Dumazet <eric.dumazet@...il.com> wrote:
> From: Eric Dumazet <edumazet@...gle.com>
>
> Whole point of randomization was to hide server uptime, but an attacker
> can simply start a syn flood and TCP generates 'old style' timestamps,
> directly revealing server jiffies value.
>
> Also, TSval sent by the server to a particular remote address vary depending
> on syncookies being sent or not, potentially triggering PAWS drops for
> innocent clients.
>
> Lets implement proper randomization, including for SYNcookies.
>
> Also we do not need to export sysctl_tcp_timestamps, it is not used from
> a module.
I like the direction, but this is incomplete.
> if (want_cookie) {
> isn = cookie_init_sequence(af_ops, sk, skb, &req->mss);
> - tcp_rsk(req)->ts_off = 0;
This breaks syncookies w. timestamps; cookie_timestamp_decode() lacks a tsoff
for readjustment.
We also need to pass the (recomputed) tsoff to tcp_get_cookie_sock().
Other than this, this patch looks good to me, thanks!
Powered by blists - more mailing lists