[TLS 1.3] FIX: Record Layer must handle multiple records in compatibility mode#3064
Merged
[TLS 1.3] FIX: Record Layer must handle multiple records in compatibility mode#3064
Conversation
lieser
reviewed
Nov 7, 2022
RFC 8446 5.1
legacy_record_version: MUST be set to 0x0303 for all records
generated by a TLS 1.3 implementation other than an initial
ClientHello [...] where it MAY also be 0x0301 for compatibility
purposes.
If said Client Hello spans multiple records the above rule applies
to all of them. Hence, `Record_Layer` cannot handle this state
internally but must depend on its upstream user.
If the client responds with an Alert to the Server Hello, it must not send a compatibility-mode dummy CCS. The respective BoGo test was inadvertantly disabled.
c1dca92 to
4090574
Compare
Codecov ReportBase: 92.59% // Head: 92.56% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #3064 +/- ##
==========================================
- Coverage 92.59% 92.56% -0.04%
==========================================
Files 602 602
Lines 70623 70650 +27
Branches 6666 6662 -4
==========================================
+ Hits 65396 65398 +2
- Misses 5197 5222 +25
Partials 30 30
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
lieser
approved these changes
Nov 10, 2022
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.
If said Client Hello spans multiple records the above rule applies to all of them. Hence,
Record_Layercannot handle this state internally but must depend on its upstream user.This introduces
m_first_message_sentandm_first_message_receivedat the TLS 1.3 channel level and disables the compatibility mode in theRecord_Layeraccordingly.Furthermore, another "compatibility mode" issue is fixed. Clients must not send a dummy Change Cipher Spec message prior to their second flight if this record is an unprotected Alert. The BoGo test that would have revealed that was disabled by accident.
I found these issues when starting to run BoGo server tests against the upcoming TLS 1.3 server implementation.