Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datagram 1200 #1548

Merged
merged 7 commits into from Jul 30, 2018
Merged

Datagram 1200 #1548

merged 7 commits into from Jul 30, 2018

Conversation

martinthomson
Copy link
Member

This fixes inconsistencies throughout in our treatment of the 1200 octet limit.

I also took another tilt at the ClientHello limitations section, which hadn't taken the addition of the token into account. I don't explicitly calculate a limit, but I do mention the size of the minimal overheads, and mention other ways in which the limit might be reduced.

Closes #1546.

@martinthomson martinthomson added editorial An issue that does not affect the design of the protocol; does not require consensus. -transport -tls labels Jul 11, 2018
Copy link
Contributor

@MikeBishop MikeBishop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Largely editorial nits.


QUIC packet and framing overheads add at least 36 octets of overheads to the
ClientHello message. That overhead increases if the client chooses connection
ID without zero length, nor does it include the token or a connection ID longer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a connection ID with non-zero length, perhaps?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A QUIC packet can hardly fit into more than a single UDP datagram, so perhaps be clear that the TLS message must fit within the first Initial QUIC packet. - if that is the intention.

QUIC packet and framing overheads add at least 36 octets of overheads to the
ClientHello message. That overhead increases if the client chooses connection
ID without zero length, nor does it include the token or a connection ID longer
than octets that might be required if a server sends a Retry packet.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

longer than octets?

With these overheads, a typical TLS ClientHello can fit into a 1200 octet packet
with ample space remaining. However, aside from the overheads added by QUIC,
there are several variables that could cause this limit to be exceeded. Large
session tickets or HelloRetryRequest cookies, multiple or large key shares, and
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You say below that HelloRetryRequest-triggered ClientHellos are exempt from this restriction, so it might be less confusing to omit that from your list of examples.

message to grow.

For servers, in addition to connection ID and tokens, the size of TLS session
tickets and HelloRetryRequest cookie extensions can have an effect on a client's
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same.

ID without zero length, nor does it include the token or a connection ID longer
than octets that might be required if a server sends a Retry packet.

With these overheads, a typical TLS ClientHello can fit into a 1200 octet packet
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that 1200 is a minimum, not a maximum, it might be worth calling out that the datagram can be larger than 1200 if needed.

values can be successfully used by a client.

A client is not required to fit a ClientHello that is sent in response to
HelloRetryRequest in a single UDP datagram.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consistency nits:

  • You use "a" before other TLS handshake messages, so "a HelloRetryRequest"
  • You use "fit into" elsewhere, but "fit ... in" here.


An Initial packet MAY exceed 1200 octets if the client knows that the Path
Maximum Transmission Unit (PMTU) supports the size that it chooses.
The datagram containing an Initial packet MAY exceed 1200 octets if the client
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we're still talking about "the first Initial packet [the client] sends," perhaps "the first" or "this" instead of "an"?

response to an Initial packet smaller than 1200 octets. It MUST NOT send any
other frame type in response, or otherwise behave as if any part of the
offending packet was processed as valid.
response to an Initial packet contained in a UDP datagram that is smaller than
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...but only if it's the first Initial packet on the connection, right?

@mikkelfj
Copy link
Contributor

mikkelfj commented Jul 11, 2018

EDIT: Never mind, fixed in latest commit that just landed.

@martinthomson not sure you saw my comment since you just made and update to that section that didn't address it, or perhaps you disagree, but:

QUIC requires that the first Initial packet from a client be sent in a single
UDP datagram.

This sentence doesn't make sense to me because all QUIC packets are necessarily placed in a UDP single datagram. The intention is of course the the initial client hello TLS message must fit within the QUIC initial packet.

@martinthomson
Copy link
Member Author

@mikkelfj, email got through, and I've pushed an update that should help.

Copy link
Member

@nibanks nibanks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. One minor nit.

network path supports a reasonably sized packet, and helps reduce the amplitude
of amplification attacks caused by server responses toward an unverified client
address.
Clients MUST pad ensure that the first Initial packet it sends is sent in a UDP
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MUST pad ensure that? Should pad be removed here?

the likelihood that a packet is accepted if it ensures that the first
ClientHello message is small enough to stay within this limit.

QUIC packet and framing overheads add at least 36 octets of overheads to the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the first "overheads" is unnecessary and the second can be "overhead"


QUIC packet and framing overheads add at least 36 octets of overheads to the
ClientHello message. That overhead increases if the client chooses a connection
ID without zero length, nor does it include the token or a connection ID longer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nor does it -> and does not

QUIC packet and framing overheads add at least 36 octets of overheads to the
ClientHello message. That overhead increases if the client chooses a connection
ID without zero length, nor does it include the token or a connection ID longer
than 8 octets that might be required if a server sends a Retry packet.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence is long, maybe a comma after "octets"

size of these values increases the probability that they can be successfully
used by a client.

A client is not required to fit the ClientHello that it sends in response to a
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this because HRR is assumed to be stateful?

network path supports a reasonably sized packet, and helps reduce the amplitude
of amplification attacks caused by server responses toward an unverified client
address.
Clients MUST pad ensure that the first Initial packet it sends is sent in a UDP
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MUST pad to ensure?

address.
Clients MUST pad ensure that the first Initial packet it sends is sent in a UDP
datagram that is at least 1200 octets. Padding the Initial packet is a good way
to ensure this, though including a 0-RTT packet in the same datagram is also a
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about: "Padding the Initial packet or including a 0-RTT packet in the same datagram are ways to meet this requirement." Feel free to add good if you want, but that seems unnecessary.

An Initial packet MAY exceed 1200 octets if the client knows that the Path
Maximum Transmission Unit (PMTU) supports the size that it chooses.
The datagram containing the first Initial packet from a client MAY exceed 1200
octets if the client knows that the Path Maximum Transmission Unit (PMTU)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

knows -> believes

toward an unproven remote address.
handshake packet is sent in a UDP datagram that contains at least 1200 octets of
payload. This allows a server to send a similar amount of data without risking
causing an amplification attack toward an unproven remote address.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1200 octets of UDP payload?

I know this is implicit, but we also use payload to refer to the part of a QUIC packet that follows the header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-tls -transport editorial An issue that does not affect the design of the protocol; does not require consensus.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Coalescing Packet including Initial Packet would be over the MTU
6 participants