• Eric Dumazet's avatar
    tcp: tcp_replace_ts_recent() should not be called from tcp_validate_incoming() · 9ae46af9
    Eric Dumazet authored
    [ Upstream commit bd090dfc ]
    
    We added support for RFC 5961 in latest kernels but TCP fails
    to perform exhaustive check of ACK sequence.
    
    We can update our view of peer tsval from a frame that is
    later discarded by tcp_ack()
    
    This makes timestamps enabled sessions vulnerable to injection of
    a high tsval : peers start an ACK storm, since the victim
    sends a dupack each time it receives an ACK from the other peer.
    
    As tcp_validate_incoming() is called before tcp_ack(), we should
    not peform tcp_replace_ts_recent() from it, and let callers do it
    at the right time.
    Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
    Cc: Neal Cardwell <ncardwell@google.com>
    Cc: Yuchung Cheng <ycheng@google.com>
    Cc: Nandita Dukkipati <nanditad@google.com>
    Cc: H.K. Jerry Chu <hkchu@google.com>
    Cc: Romain Francoise <romain@orebokech.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
    9ae46af9
tcp_input.c 172 KB