F-5606: don't enforce DTLS 1.3 2^48-1 epoch cap on the receive side#2
Closed
julek-wolfssl wants to merge 1 commit into
Closed
F-5606: don't enforce DTLS 1.3 2^48-1 epoch cap on the receive side#2julek-wolfssl wants to merge 1 commit into
julek-wolfssl wants to merge 1 commit into
Conversation
RFC 9147 Section 8's 2^48-1 epoch ceiling is a sender-only rule; the same paragraph says receiving implementations MUST NOT enforce it. The KeyUpdate receive path was rejecting a peer epoch that crossed 2^48-1, violating that. Guard only the genuine wrap-to-zero (Section 4.2.1) and let the receiving epoch advance past 2^48-1. The sender-side gates are unchanged.
Owner
Author
|
Superseded by wolfSSL#10627 (opened against wolfSSL master). |
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.
Summary
Follow-up to F-5606 (wolfSSL#10575). RFC 9147 Section 8's
2^48-1epoch ceiling is a sender-only rule; the same paragraph states that receiving implementations MUST NOT enforce it ("In order to allow this value to be changed later").The KeyUpdate receive path in
DoTls13KeyUpdatewas rejecting a peer epoch that crossed2^48-1, which violates that requirement. This changes the receive-side guard to catch only the genuine wrap-to-zero (RFC 9147 Section 4.2.1) — which would alias epoch 0 and reuse keys — and otherwise lets the receiving (peer) epoch advance past2^48-1.The sender-side gates that keep our own epoch at or below
2^48-1(SendTls13KeyUpdate,Dtls13KeyUpdateAckReceived) are unchanged.Testing
./configure --enable-dtls13 --enable-dtlsand rebuild — compiles cleanly under-Wall -Wextra.