Subject: [quicwg/base-drafts] Handshake deadlock (#1824)

From: ianswett <[email-masked]>
Date: Tue, 02 Oct 2018 11:22:15 -0700

Fixes #1764
You can view, comment on, or merge this pull request online at:

  https://github.com/quicwg/base-drafts/pull/1824

-- Commit Summary --

  * Handshake deadlock

-- File Changes --

    M draft-ietf-quic-transport.md (16)

-- Patch Links --

https://github.com/quicwg/base-drafts/pull/1824.patch
https://github.com/quicwg/base-drafts/pull/1824.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/1824

---

From: ianswett <[email-masked]>
Date: Tue, 02 Oct 2018 11:24:00 -0700

@ianswett pushed 1 commit.

3c2c305  Update draft-ietf-quic-transport.md

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/1824/files/af5c4152a46b1a0de3654a31e9f0c5a18d0ab6b3..3c2c305fed8900ff0e6d1079a2f24d0461620571

---

From: Mike Bishop <[email-masked]>
Date: Tue, 02 Oct 2018 14:21:04 -0700

MikeBishop commented on this pull request.

I'd like to see the "when to send" mentioned before nebulously saying what should be sent, personally.

> @@ -875,11 +875,18 @@ The first Handshake packet sent by a server contains a packet number of 0.
 Handshake packets are their own packet number space.  Packet numbers are
 incremented normally for other Handshake packets.
 
-Servers MUST NOT send more than three datagrams including Initial and Handshake
-packets without receiving a packet from a verified source address.  Source
-addresses can be verified through an address validation token
-(delivered via a Retry packet or a NEW_TOKEN frame) or by receiving
-any message from the client encrypted using the Handshake keys.
+Servers MUST NOT send more than three times as many bytes as the number of bytes
+received prior to verifying the client's address.  Source addresses can be
+verified through an address validation token (delivered via a Retry packet or
+a NEW_TOKEN frame) or by receiving any message from the client encrypted using

s/receiving/processing/ -- it has to be valid; if you can unprotect it, then you're okay.

> @@ -875,11 +875,18 @@ The first Handshake packet sent by a server contains a packet number of 0.
 Handshake packets are their own packet number space.  Packet numbers are
 incremented normally for other Handshake packets.
 
-Servers MUST NOT send more than three datagrams including Initial and Handshake
-packets without receiving a packet from a verified source address.  Source
-addresses can be verified through an address validation token
-(delivered via a Retry packet or a NEW_TOKEN frame) or by receiving
-any message from the client encrypted using the Handshake keys.
+Servers MUST NOT send more than three times as many bytes as the number of bytes
+received prior to verifying the client's address.  Source addresses can be
+verified through an address validation token (delivered via a Retry packet or
+a NEW_TOKEN frame) or by receiving any message from the client encrypted using
+the Handshake keys.  This limit exists to mitigate amplification attacks.
+
+In order to prevent this limit causing a handshake deadlock, the client SHOULD
+send a packet as large as the Initial containing only PADDING if it has no
+other data to send and does not yet have the Handshake keys.  If the client
+has no data to send and the Hanshake keys are available, it SHOULD send a

Han**d**shake

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/1824#pullrequestreview-160928037

---

From: ianswett <[email-masked]>
Date: Tue, 02 Oct 2018 15:10:56 -0700

6251bcf  Update draft-ietf-quic-transport.md

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/1824/files/3c2c305fed8900ff0e6d1079a2f24d0461620571..6251bcf210325a3b0c3084ee16bf90f55825f30e

---

From: ianswett <[email-masked]>
Date: Tue, 02 Oct 2018 15:11:24 -0700

3ccf315  Update draft-ietf-quic-transport.md

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/1824/files/6251bcf210325a3b0c3084ee16bf90f55825f30e..3ccf31538d9d2bff91d38981cc37f4adad5a8bb6

---

From: ianswett <[email-masked]>
Date: Tue, 02 Oct 2018 15:18:14 -0700

ea331de  Update draft-ietf-quic-transport.md

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/1824/files/3ccf31538d9d2bff91d38981cc37f4adad5a8bb6..ea331de08754682d835b2245920f647a81a0be67

---

From: ianswett <[email-masked]>
Date: Tue, 02 Oct 2018 15:24:49 -0700

165e36d  Update draft-ietf-quic-transport.md

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/1824/files/ea331de08754682d835b2245920f647a81a0be67..165e36dc43f42fb2f3f449e978d08d4a25c77f29

---

From: ianswett <[email-masked]>
Date: Tue, 02 Oct 2018 15:29:51 -0700

fba810b  Update draft-ietf-quic-transport.md

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/1824/files/165e36dc43f42fb2f3f449e978d08d4a25c77f29..fba810b6e4d312051501f6d140f1167d002ec930

---

From: ianswett <[email-masked]>
Date: Tue, 02 Oct 2018 15:31:34 -0700

a3a2299  Update draft-ietf-quic-transport.md

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/1824/files/fba810b6e4d312051501f6d140f1167d002ec930..a3a2299fbbb655cdac342e1ae4e31924f6004113

---

From: Mike Bishop <[email-masked]>
Date: Tue, 02 Oct 2018 15:53:40 -0700

MikeBishop approved this pull request.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/1824#pullrequestreview-160954466

---

From: janaiyengar <[email-masked]>
Date: Tue, 02 Oct 2018 15:56:34 -0700

Merged #1824 into master.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/1824#event-1880622325

---

From: martinduke <[email-masked]>
Date: Wed, 03 Oct 2018 12:44:40 -0700

martinduke commented on this pull request.

If it's too late and you're cool with the changes, I can drop a PR.

... send a Handshake packet ...

+packet with a single byte of padding.  Details on when to send these PADDING
+packets are in {{QUIC-RECOVERY}}.

I couldn't find these details after a quick skim.

I think valid resumption keys should also be sufficient.

Is SHOULD sufficient? I feel like this a MUST, or compliant implementations will never complete under certain otherwise recoverable loss scenarios. Perhaps the recovery draft is more strict?

I suggest a rephrase: 

Prior to verifying the client's address, servers MUST NOT send more than three times as many bytes as the number of bytes received.

+a NEW_TOKEN frame) or by processing any message from the client encrypted using

Why not valid resumption keys?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/1824#pullrequestreview-161327536

---

From: ianswett <[email-masked]>
Date: Wed, 03 Oct 2018 14:46:30 -0700

ianswett commented on this pull request.

SG

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/1824#discussion_r222477901

---

From: ianswett <[email-masked]>
Date: Wed, 03 Oct 2018 14:46:48 -0700

@martinduke I was meaning to follow up with a PR to fix recovery, but if you have time, that would be very helpful.  If not, I'll try to send out one tomorrow.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/1824#issuecomment-426814397