DTLS13: Fixes unnecessary client rtx and increase server robustness #10349
Open
rizlik wants to merge 4 commits intowolfSSL:masterfrom
Open
DTLS13: Fixes unnecessary client rtx and increase server robustness #10349rizlik wants to merge 4 commits intowolfSSL:masterfrom
rizlik wants to merge 4 commits intowolfSSL:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes DTLS 1.3 handshake retransmission/state tracking issues that could lead to cookie mismatches (HRR_COOKIE_ERROR) and handshake failure under packet loss/reordering (issue #10315).
Changes:
- Adjust DTLS 1.3 client behavior to flush the buffered ClientHello from the RTX queue after receiving a ServerHello/HRR, preventing unnecessary CH1 retransmissions.
- Improve DTLS 1.3 server robustness by avoiding resets of expected handshake sequencing once the server has become stateful.
- Add targeted memio-based DTLS 1.3 regression tests for CH retransmission and fragmentation/replay-window edge cases.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/api/test_dtls.h | Registers two new DTLS 1.3 regression tests in the API test list. |
| tests/api/test_dtls.c | Adds new DTLS 1.3 memio tests covering CH2 retransmission behavior and CH fragmentation with CH1 replay injection. |
| src/dtls13.c | Updates DTLS 1.3 RTX handling (flush/save ClientHello) and gates server sequence resets on stateless mode only. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
67ebe0d to
74570a2
Compare
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
After receiving HRR, client never resend CH1.
After being stateful, never reset the server expected next message sequence.
Fixes issue #10315