Re: [tcpinc] TCP's treatment of data in SYN packets
Kyle Rose <krose@krose.org> Thu, 28 July 2016 22:01 UTC
Return-Path: <krose@krose.org>
X-Original-To: tcpinc@ietfa.amsl.com
Delivered-To: tcpinc@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 61E5112D7B8 for <tcpinc@ietfa.amsl.com>; Thu, 28 Jul 2016 15:01:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=krose.org
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Tv8XzYjXW2QD for <tcpinc@ietfa.amsl.com>; Thu, 28 Jul 2016 15:01:32 -0700 (PDT)
Received: from mail-qk0-x230.google.com (mail-qk0-x230.google.com [IPv6:2607:f8b0:400d:c09::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 22DE012D09F for <tcpinc@ietf.org>; Thu, 28 Jul 2016 15:01:32 -0700 (PDT)
Received: by mail-qk0-x230.google.com with SMTP id s63so75653482qkb.2 for <tcpinc@ietf.org>; Thu, 28 Jul 2016 15:01:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=krose.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=0yJKo44twyMpUr8AKFzz/jA37AvB9l9HVmJAuvTBcaE=; b=lVw5c63HxyF1ayok6F1sCyU5Tufk4x3L9zBqVWL/j1g37u2GBIUveqlEqBSC+xYdi2 OJ5YM2VqsUXd9SB+MqEaeaxS4o7yUh/iQ+1B3ieki62xPVxEHRY3MIb/2OC/iWRCCb58 8QY+L+NG87UURDm8lbejCFkbgIrJCRq2zYdVg=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=0yJKo44twyMpUr8AKFzz/jA37AvB9l9HVmJAuvTBcaE=; b=L9K+vndK2PWCpBR49MjCQ/aSnlXsWvW9oFjv2fONkfzV7IsMOeIuoJ/KZcTF1Z9E4t /a7xaDaH9WiMkbpvW3OQ+92VOuUgfEJG2scgiRPm2YtI0XSQbC4t9PEbajaTfVPdsx40 0Jwc/JOx4aLq2MJxtA6TCINj+MtgxcwnrhXN/srkq776UFh7BV8qOH5XAo0+KRcZRcd7 Kr8QlNht7mgGsAvY8QnBzHnuJuzWRx5eVDb4/pY7dmdRuthIAO1Bt1c1a7yJ0ztZXnPV GXCjdPc6Tgml0QDAZ79mXKwaAJC/uZB9LQNHiXJzgHV3IgogfUpXv65ivkamI36rVMpj Tn3A==
X-Gm-Message-State: AEkooutdm0VNogzcEetLqrJtiUNPIYTPypf1MMo3T/GsoNzHFtaL+6L5w+hVrJgEDAwMyALabJWyXy94fvsVNg==
X-Received: by 10.55.92.193 with SMTP id q184mr15299090qkb.187.1469743291248; Thu, 28 Jul 2016 15:01:31 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.55.94.70 with HTTP; Thu, 28 Jul 2016 15:01:30 -0700 (PDT)
X-Originating-IP: [2001:4878:8000:50:8177:dae3:6e7d:d228]
In-Reply-To: <87lh0lselg.fsf@ta.scs.stanford.edu>
References: <CAJU8_nU1WzQNFFUn_2o1cACutB01iyQ_hC29PHoutr8TRDKGnA@mail.gmail.com> <579A4669.7030600@isi.edu> <87lh0lselg.fsf@ta.scs.stanford.edu>
From: Kyle Rose <krose@krose.org>
Date: Thu, 28 Jul 2016 18:01:30 -0400
Message-ID: <CAJU8_nUPrm9JJMrrMbL5+FpP-9CKC6EkidCry9UuZA5ZfyJtoA@mail.gmail.com>
To: David Mazieres expires 2016-10-26 PDT <mazieres-p7v7bih3ykqpkxv5e74y9er6ts@temporary-address.scs.stanford.edu>
Content-Type: multipart/alternative; boundary="001a114e6328c94e250538b94628"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tcpinc/cHxvb3WVys1gZ6RB_eRyMEoi2XA>
Cc: tcpinc <tcpinc@ietf.org>, "Mirja Kuehlewind (IETF)" <ietf@kuehlewind.net>, Joe Touch <touch@isi.edu>
Subject: Re: [tcpinc] TCP's treatment of data in SYN packets
X-BeenThere: tcpinc@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: "Discussion list for adding encryption to TCP." <tcpinc.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tcpinc>, <mailto:tcpinc-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tcpinc/>
List-Post: <mailto:tcpinc@ietf.org>
List-Help: <mailto:tcpinc-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tcpinc>, <mailto:tcpinc-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 28 Jul 2016 22:01:34 -0000
On Thu, Jul 28, 2016 at 4:16 PM, David Mazieres < dm-list-tcpcrypt@scs.stanford.edu> wrote: > Thanks for this explanation. This matches my understanding, and raises > a subtle point because of the elimination of the application-aware > mandatory bit on the wire. Suppose you are in the following situation: > > * Host A and host B have previously established a bunch of TCP-ENO > sessions successfully, so believe the network path is clear and so > forth. > > * The application on host A suddenly sets the mandatory > application-aware mode, and host B is not application aware. > > * Host A uses a TEP that allows for SYN data, and in fact tries to use > SYN data on the next connection. > > * Host B acks the SYN data, because the SYN TEP is also the negotiated > TEP. > > * Host A disables TCP-ENO because host B was not application aware, so > the third leg of the handshake does not include an ENO option. > > At this point host B would have to discard the data, since it includes > ciphertext. If the data were a Diffie-Hellman parameter this might be > okay, though a redefinition of TCP's behavior since the data was ACKed. > I'm hesitant to redefine TCP's behavior in a way that does not closely > hue to other studied modifications such as TFO. > > In particular, TFO suggests required buffering is not the best behavior. > In fact, I would imagine in the short term SYN data is most useful for > cases like session resumption, where you really want the data directly > delivered to the application (since it's cryptographically authenticated > anyway) and not buffered. This is a modification of TCP I feel > comfortable with because TFO has essentially already vetted this model. > > One possible solution is to say that you cannot send data in the SYN > segment if you set the application-aware mandatory bit. Another > possible solution is to convey the application-aware mandatory bit by > going back to two a bits, the way we had a few drafts ago. > If box B sends back an ENO option, we know it's ENO aware, so we can choose the behavior here; we just need to make sure it's consistent and knowable by both endpoints. Why can't the semantics here be that B throws away the SYN data if it disagrees with A on app awareness? Are there situations where the two endpoints could disagree on this determination? If this works, then in the steady state (both endpoints are either app-aware or not) clients will be able to send SYN data to known ENO-aware servers, while in the rollout case (A and B don't agree on app awareness) SYN data will be thrown away by B and known by A to have been thrown away. I still don't have a good feel for what folks like Joe are recommending re: dealing with a B that doesn't understand ENO. If B is suddenly not ENO-aware, by the spec it could deliver garbage data to the application upon completion of the 3WHS; is this okay under an assumption that B should *not* suddenly be unable to understand ENO, or do we need explicit signaling from a prior connection to the same IP saying "SYN data is okay upon resumption", or is even that not good enough? A lot of this would be resolved if we updated TCP to say that a server MUST not ACK, buffer, or deliver SYN data unless this behavior is overridden by some negotiated extension (like TFO or ENO), in which case the treatment of such data is extension-specific. The ship has probably sailed on that one, but it's interesting that this is essentially what 4987 states, as I posted at the top of the thread: q( If data accompanies the SYN segment, then this data is not acknowledged or stored by the receiver, and will require retransmission. ) Kyle
- Re: [tcpinc] TCP's treatment of data in SYN packe… Black, David
- Re: [tcpinc] TCP's treatment of data in SYN packe… Joe Touch
- Re: [tcpinc] TCP's treatment of data in SYN packe… David Mazieres
- Re: [tcpinc] TCP's treatment of data in SYN packe… Joe Touch
- Re: [tcpinc] TCP's treatment of data in SYN packe… David Mazieres
- Re: [tcpinc] TCP's treatment of data in SYN packe… Joe Touch
- Re: [tcpinc] TCP's treatment of data in SYN packe… Kyle Rose
- Re: [tcpinc] TCP's treatment of data in SYN packe… Joe Touch
- Re: [tcpinc] TCP's treatment of data in SYN packe… David Mazieres
- Re: [tcpinc] TCP's treatment of data in SYN packe… Joe Touch
- Re: [tcpinc] TCP's treatment of data in SYN packe… Black, David
- Re: [tcpinc] TCP's treatment of data in SYN packe… Joe Touch
- Re: [tcpinc] TCP's treatment of data in SYN packe… David Mazieres
- Re: [tcpinc] TCP's treatment of data in SYN packe… Black, David
- Re: [tcpinc] TCP's treatment of data in SYN packe… Joe Touch
- Re: [tcpinc] TCP's treatment of data in SYN packe… Black, David
- Re: [tcpinc] TCP's treatment of data in SYN packe… David Mazieres
- Re: [tcpinc] TCP's treatment of data in SYN packe… Derek Fawcus
- Re: [tcpinc] TCP's treatment of data in SYN packe… Joe Touch
- Re: [tcpinc] TCP's treatment of data in SYN packe… Kyle Rose
- Re: [tcpinc] TCP's treatment of data in SYN packe… Joe Touch
- Re: [tcpinc] TCP's treatment of data in SYN packe… Jeremy Harris
- Re: [tcpinc] TCP's treatment of data in SYN packe… David Mazieres
- Re: [tcpinc] TCP's treatment of data in SYN packe… Joe Touch
- Re: [tcpinc] [tcpm] TCP's treatment of data in SY… Derek Fawcus
- [tcpinc] TCP's treatment of data in SYN packets Kyle Rose
- Re: [tcpinc] [tcpm] TCP's treatment of data in SY… Joe Touch
- Re: [tcpinc] [tcpm] TCP's treatment of data in SY… Gavin McCullagh
- Re: [tcpinc] TCP's treatment of data in SYN packe… Joe Touch
- Re: [tcpinc] TCP's treatment of data in SYN packe… Jeremy Harris
- Re: [tcpinc] TCP's treatment of data in SYN packe… David Mazieres
- Re: [tcpinc] TCP's treatment of data in SYN packe… Joe Touch
- Re: [tcpinc] TCP's treatment of data in SYN packe… Derek Fawcus
- Re: [tcpinc] TCP's treatment of data in SYN packe… Kyle Rose
- Re: [tcpinc] TCP's treatment of data in SYN packe… Joe Touch
- Re: [tcpinc] TCP's treatment of data in SYN packe… Jeremy Harris
- Re: [tcpinc] TCP's treatment of data in SYN packe… David Mazieres
- Re: [tcpinc] TCP's treatment of data in SYN packe… Joe Touch
- Re: [tcpinc] TCP's treatment of data in SYN packe… David Mazieres
- Re: [tcpinc] TCP's treatment of data in SYN packe… Joe Touch
- Re: [tcpinc] TCP's treatment of data in SYN packe… Joe Touch
- Re: [tcpinc] TCP's treatment of data in SYN packe… Kyle Rose
- Re: [tcpinc] TCP's treatment of data in SYN packe… Joe Touch
- Re: [tcpinc] TCP's treatment of data in SYN packe… David Mazieres
- Re: [tcpinc] TCP's treatment of data in SYN packe… Wesley Eddy
- Re: [tcpinc] TCP's treatment of data in SYN packe… Joe Touch
- Re: [tcpinc] TCP's treatment of data in SYN packe… David Mazieres
- Re: [tcpinc] TCP's treatment of data in SYN packe… Kyle Rose
- Re: [tcpinc] TCP's treatment of data in SYN packe… Joe Touch
- Re: [tcpinc] TCP's treatment of data in SYN packe… David Mazieres
- Re: [tcpinc] TCP's treatment of data in SYN packe… Joe Touch
- Re: [tcpinc] TCP's treatment of data in SYN packe… Derek Fawcus
- Re: [tcpinc] TCP's treatment of data in SYN packe… David Mazieres
- Re: [tcpinc] TCP's treatment of data in SYN packe… Kyle Rose
- Re: [tcpinc] TCP's treatment of data in SYN packe… Kyle Rose
- Re: [tcpinc] TCP's treatment of data in SYN packe… Yuchung Cheng