verify ciphersuite in CH2 matches HRR#10034
Draft
sebastian-carpenter wants to merge 1 commit intowolfSSL:masterfrom
Draft
verify ciphersuite in CH2 matches HRR#10034sebastian-carpenter wants to merge 1 commit intowolfSSL:masterfrom
sebastian-carpenter wants to merge 1 commit intowolfSSL:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Tightens TLS 1.3 HelloRetryRequest (HRR) handling by ensuring the cipher suite used after HRR cannot change between ClientHello(1) and ClientHello(2), and adds a regression test to cover the scenario from #10016.
Changes:
- Track/restore the cipher suite selected for HRR and reject CH2 if it differs.
- Add a TLS 1.3 API test where CH2 offers a different cipher suite than the one selected in HRR.
- Register the new test in the TLS 1.3 test group list.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| tests/api/test_tls13.h | Registers the new TLS 1.3 regression test. |
| tests/api/test_tls13.c | Adds a memio-based server-side test for CH2 cipher suite mismatch after HRR. |
| src/tls13.c | Stores HRR’s selected cipher suite and enforces CH2 consistency. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
607183a to
406f503
Compare
Contributor
Author
|
Jenkins retest this please. |
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.
Description
When a client sends a ClientHello which prompts a HelloRetryRequest the client is able to send a second ClientHello where the ciphersuite does not match what was chosen in the HelloRetryRequest. Our server would accept this and continue with the connection.
Extended what was done in PR #9340. Now the server will also check the ciphersuite and make sure it matches what was established for the HelloRetryRequest.
Fixes #10016
Testing
Used the reproducer described in #10016.
Also made an equivalent test in the tls13 tests so this is tested in the future.
Checklist