Skip to content

Commit b4e4cb8

Browse files
Merge pull request #131 from quicwg/enforce
Mandate validation of Version Information
2 parents de26cb3 + b1d0d27 commit b4e4cb8

File tree

1 file changed

+24
-4
lines changed

1 file changed

+24
-4
lines changed

draft-ietf-quic-version-negotiation.md

+24-4
Original file line numberDiff line numberDiff line change
@@ -387,18 +387,37 @@ based on information received from a Version Negotiation packet MUST ignore any
387387
Version Negotiation packets it receives in response to that connection attempt.
388388

389389
Both endpoints MUST parse their peer's Version Information during the handshake.
390-
If parsing the Version Information failed (for example, if it is too short or if
390+
If that leads to a parsing failure (for example, if it is too short or if
391391
its length is not divisible by four), then the endpoint MUST close the
392392
connection; if the connection was using QUIC version 1, that connection closure
393393
MUST use a transport error of type TRANSPORT_PARAMETER_ERROR. If an endpoint
394394
receives a Chosen Version equal to zero, or any Available Version equal to zero,
395-
it MUST treat it as a parsing failure.
395+
it MUST treat it as a parsing failure. If a server receives a Version
396+
Information where the Chosen Version is not included in Available Versions, it
397+
MUST treat it as a parsing failure.
396398

397399
Every QUIC version that supports version negotiation MUST define a method for
398400
closing the connection with a version negotiation error. For QUIC version 1,
399401
version negotiation errors are signaled using a transport error of type
400402
VERSION_NEGOTIATION_ERROR; see {{iana-error}}.
401403

404+
When a server receives a client's first flight, the server will first establish
405+
which QUIC version is in use for this connection in order to properly parse the
406+
first flight. For example, the server determines that QUIC version 1 is in use
407+
by observing that the Version field of the first Long Header packet it receives
408+
is set to 0x00000001. When the server then processes the client's Version
409+
Information, the server MUST validate that the client's Chosen Version matches
410+
the version in use for the connection. If the two differ, the server MUST close
411+
the connection with a version negotiation error. For example, if a server
412+
receives the client's Version Information over QUIC version 1 (as indicated by
413+
the Version field of the Long Header packets that carried the transport
414+
parameters) and the client's Chosen Version is not set to 0x00000001, the server
415+
will close the connection with a version negotiation error.
416+
417+
If a client receives a Version Information where the server's Chosen Version was
418+
not sent by the client as part of its Available Versions, the client MUST close
419+
the connection with a version negotiation error.
420+
402421
If the Version Information was missing, the endpoints MAY complete the
403422
handshake. However, if a client has reacted to a Version Negotiation packet and
404423
the Version Information was missing, the client MUST close the connection with a
@@ -697,5 +716,6 @@ codepoint in the 0-63 range to replace the provisional codepoint described above
697716
# Acknowledgments {#acknowledgments}
698717
{:numbered="false"}
699718

700-
The authors would like to thank Nick Banks, Mike Bishop, Ryan Hamilton, Roberto
701-
Peon, Anthony Rossi, and Martin Thomson for their input and contributions.
719+
The authors would like to thank Nick Banks, Mike Bishop, Martin Duke, Ryan
720+
Hamilton, Roberto Peon, Anthony Rossi, and Martin Thomson for their input and
721+
contributions.

0 commit comments

Comments
 (0)