Skip to content

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
fenrir-fixes-20260601from
fenrir-fixes-20260601-dtls13-recv-epoch
Closed

F-5606: don't enforce DTLS 1.3 2^48-1 epoch cap on the receive side#2
julek-wolfssl wants to merge 1 commit into
fenrir-fixes-20260601from
fenrir-fixes-20260601-dtls13-recv-epoch

Conversation

@julek-wolfssl
Copy link
Copy Markdown
Owner

Summary

Follow-up to F-5606 (wolfSSL#10575). RFC 9147 Section 8's 2^48-1 epoch 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 DoTls13KeyUpdate was rejecting a peer epoch that crossed 2^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 past 2^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-dtls and rebuild — compiles cleanly under -Wall -Wextra.

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.
@julek-wolfssl julek-wolfssl self-assigned this Jun 5, 2026
@julek-wolfssl
Copy link
Copy Markdown
Owner Author

Superseded by wolfSSL#10627 (opened against wolfSSL master).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant