Skip to content

Disallow KeyUpdate during early data transmission - #11169

Open
holtrop-wolfssl wants to merge 1 commit into
wolfSSL:masterfrom
holtrop-wolfssl:gh11130
Open

Disallow KeyUpdate during early data transmission#11169
holtrop-wolfssl wants to merge 1 commit into
wolfSSL:masterfrom
holtrop-wolfssl:gh11130

Conversation

@holtrop-wolfssl

Copy link
Copy Markdown
Contributor

Description

Disallow KeyUpdate during early data transmission

Resolves #11130.

Testing

How did you test?

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@holtrop-wolfssl holtrop-wolfssl self-assigned this Aug 13, 2026
Copilot AI lite review requested due to automatic review settings August 13, 2026 20:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Disallows emitting TLS 1.3 KeyUpdate messages before the endpoint has sent Finished (notably during 0-RTT early data), and adds regression coverage to ensure AEAD key usage limit handling fails the write rather than attempting a KeyUpdate.

Changes:

  • Add a TLS 1.3 helper to detect whether Finished has been sent and gate SendTls13KeyUpdate() accordingly.
  • Update API tests to expect OUT_OF_ORDER_E when KeyUpdate is attempted before Finished.
  • Add a new 0-RTT regression test that hits the AEAD usage limit and verifies no KeyUpdate is sent and the write fails.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
tests/api/test_tls13.h Registers the new test_tls13_0rtt_aead_limit test.
tests/api/test_tls13.c Updates expected KeyUpdate error pre-handshake and adds a new 0-RTT AEAD-limit regression test.
src/tls13.c Adds a “Finished sent” helper and blocks KeyUpdate before Finished to comply with spec and early-data constraints.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tests/api/test_tls13.c
Comment thread src/tls13.c
Comment thread tests/api/test_tls13.c
@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown

MemBrowse Memory Report

gcc-arm-cortex-m4-openssl-compat

  • FLASH: .rodata +24 B, .text +64 B (+0.0%, 775,700 B / 1,048,576 B, total: 74% used)

gcc-arm-cortex-m4-rsa-only

  • FLASH: .text +64 B (+0.0%, 328,176 B / 1,048,576 B, total: 31% used)

gcc-arm-cortex-m4-tls13

  • FLASH: .text +64 B (+0.0%, 238,433 B / 262,144 B, total: 91% used)

gcc-arm-cortex-m7-pq

  • FLASH: .text +64 B (+0.0%, 298,588 B / 1,048,576 B, total: 28% used)

gcc-arm-cortex-m7-tls13

@holtrop-wolfssl

Copy link
Copy Markdown
Contributor Author

retest this please (ERROR: Preflight failed (rc=1) - aborting PRB)

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.

Early-data AEAD limit incorrectly triggers KeyUpdate

3 participants