Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: ycheng@google.com, ncardwell@google.com, netdev@vger.kernel.org
Subject: Re: [PATCH net] tcp: fastopen: fix on syn-data transmit failure
Date: Tue, 19 Sep 2017 16:17:42 -0700 (PDT)	[thread overview]
Message-ID: <20170919.161742.1970686060555960047.davem@davemloft.net> (raw)
In-Reply-To: <1505840757.29839.77.camel@edumazet-glaptop3.roam.corp.google.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 19 Sep 2017 10:05:57 -0700

> From: Eric Dumazet <edumazet@google.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@google.com>
> Reported-by: Dmitry Vyukov <dvyukov@google.com>

Applied, thanks Eric.

      parent reply	other threads:[~2017-09-19 23:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-19 17:05 [PATCH net] tcp: fastopen: fix on syn-data transmit failure Eric Dumazet
2017-09-19 22:26 ` Yuchung Cheng
2017-09-19 23:17 ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170919.161742.1970686060555960047.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=ycheng@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox