Eric Dumazet <eric.duma...@gmail.com> wrote: > From: Eric Dumazet <eduma...@google.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!