Clarify that TLS1.2 cannot be negotiated after HRR - #3267
Merged
Merged
Conversation
Benchmark resultsInstruction countsSignificant differencesClick to expand
Other differencesClick to expand
Wall-timeSignificant differencesThere are no significant wall-time differences Other differencesClick to expand
Memory usageKey:
Significant differencesThere are no significant memory usage differences Additional informationCheckout details:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3267 +/- ##
=======================================
Coverage 95.37% 95.37%
=======================================
Files 99 99
Lines 23653 23658 +5
Branches 681 683 +2
=======================================
+ Hits 22558 22563 +5
Misses 939 939
Partials 156 156 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
djc
approved these changes
Sep 14, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR responds to a private disclosure, included below. This was actually already addressed by #3260 and the fact that TLS1.2 and 1.3 ciphersuites are disjoint. This PR does a belt-and-braces change.
Summary
A rustls 0.23.44 TLS 1.3 server, after receiving an incomplete TLS 1.3 ClientHello and sending a HelloRetryRequest, will accept a TLS 1.2 ClientHello and complete a 1.2 handshake.
All other tested implementations reject this as a protocol downgrade.
Details
I have not tbh looked at the code to try to root cause this. Daybreak Blue's take: "In rustls 0.23.44, HRR returns to the generic
ExpectClientHellostate, which incorrectly re-runs version negotiation."Impact
This does not as far as I can tell allow a client to violate a requirement by the server to negotiate only TLS 1.3 - in tests, a 1.3-only rustls server will reject the 1.2 ClientHello as soon as it sees it. It's definitely a violation of the RFC state machine rules (at the least RFC 8446's "Servers MUST ensure that they negotiate the same cipher suite when receiving a conformant updated ClientHello" - though arguably this is not a "conformant" ClientHello!)
Anyway no objection on my part if you wanted to treat it just as a bug with no security implications, but figured you would want to know.