[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20170919.161742.1970686060555960047.davem@davemloft.net>
Date: Tue, 19 Sep 2017 16:17:42 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: eric.dumazet@...il.com
Cc: ycheng@...gle.com, ncardwell@...gle.com, netdev@...r.kernel.org
Subject: Re: [PATCH net] tcp: fastopen: fix on syn-data transmit failure
From: Eric Dumazet <eric.dumazet@...il.com>
Date: Tue, 19 Sep 2017 10:05:57 -0700
> From: Eric Dumazet <edumazet@...gle.com>
>
> Our recent change exposed a bug in TCP Fastopen Client that syzkaller
> found right away [1]
>
> When we prepare skb with SYN+DATA, we attempt to transmit it,
> and we update socket state as if the transmit was a success.
>
> In socket RTX queue we have two skbs, one with the SYN alone,
> and a second one containing the DATA.
>
> When (malicious) ACK comes in, we now complain that second one had no
> skb_mstamp.
>
> The proper fix is to make sure that if the transmit failed, we do not
> pretend we sent the DATA skb, and make it our send_head.
>
> When 3WHS completes, we can now send the DATA right away, without having
> to wait for a timeout.
>
> [1]
...
> Fixes: 8c72c65b426b ("tcp: update skb->skb_mstamp more carefully")
> Fixes: 783237e8daf1 ("net-tcp: Fast Open client - sending SYN-data")
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Reported-by: Dmitry Vyukov <dvyukov@...gle.com>
Applied, thanks Eric.
Powered by blists - more mailing lists