Skip to content

Fix handling of keyupdate flood - #11884

Open
twcook86 wants to merge 2 commits into
wolfSSL:masterfrom
twcook86:f-16278-keyupdate-flood
Open

twcook86 wants to merge 2 commits into
wolfSSL:masterfrom
twcook86:f-16278-keyupdate-flood

Conversation

@twcook86

Copy link
Copy Markdown
Contributor

Description

Fixes F-16278 to handle keyupdate flood

Testing

new test

Checklist

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

Copilot AI balanced review requested due to automatic review settings October 23, 2026 21:31
@twcook86 twcook86 self-assigned this Oct 23, 2026
@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

MemBrowse Memory Report

gcc-arm-cortex-m4-dtls13

  • FLASH: .text +64 B (+0.0%, 194,392 B / 1,048,576 B, total: 19% used)

gcc-arm-cortex-m4-openssl-compat

  • FLASH: .text +128 B (+0.0%, 796,268 B / 1,048,576 B, total: 76% used)

gcc-arm-cortex-m4-pq

  • FLASH: .text +128 B (+0.0%, 311,844 B / 1,048,576 B, total: 30% used)

gcc-arm-cortex-m4-rsa-only

  • FLASH: .text +128 B (+0.0%, 343,256 B / 1,048,576 B, total: 33% used)

gcc-arm-cortex-m4-tls13

  • FLASH: .text +128 B (+0.1%, 249,358 B / 262,144 B, total: 95% used)

gcc-arm-cortex-m7-pq

  • FLASH: .text +128 B (+0.0%, 312,804 B / 1,048,576 B, total: 30% used)

gcc-arm-cortex-m7-tls13

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fenrir Automated Review — PR #11884

Scan targets checked: wolfssl-src, wolfssl-bugs
Not reviewed (no scan target covers them): tests/api/test_tls13.h
Coverage: 2 of 3 in-scope changed file(s) opened by the reviewer; not opened: tests/api/test_tls13.c

Fenrir result: Approved ✅

No new issues found in the changed files.

Advisory only — this automated result does not count as a GitHub approval.

Review tier: Lite

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.

🟡 Changes recommended

Deferred-response state remains inconsistent across mixed KeyUpdates, explicit updates, and shutdown.

3 open issues
What changed in this PR

This PR addresses KeyUpdate-flood denial of service in wolfSSL’s TLS 1.3 handling by coalescing responses while output is blocked.

Changes:

  • Defer repeated KeyUpdate responses until pending output drains.
  • Send deferred responses before new application data while respecting update limits.
  • Add regression coverage for blocked writes and deferred-response handling.
File Description
tests/​api/​test_tls13.h Declare and register the blocked-write regression test.
tests/​api/​test_tls13.c Exercise KeyUpdate floods, write retries, and explicit updates.
src/​tls13.c Defer responses when TLS output is already buffered.
src/​internal.c Allow reads with deferred responses and adjust write-side response ordering.

Review effort: Balanced

Comment thread src/internal.c Outdated
Comment thread src/internal.c
Comment thread src/tls13.c
@twcook86 twcook86 changed the title Fix dos due to keyupdate flood Fix handling of keyupdate flood Oct 25, 2026
@twcook86
twcook86 force-pushed the f-16278-keyupdate-flood branch from 4f42dfd to 6d024a3 Compare October 27, 2026 22:52
@twcook86
twcook86 requested review from wolfSSL-Fenrir-bot and a balanced review from Copilot October 27, 2026 22: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.

🔵 Needs a closer look

Security-sensitive key-update state and nonblocking record ordering require human validation across supported configurations.

No open issues 🎉

3 resolved since last review

Review effort: Balanced

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fenrir Automated Review — PR #11884

Scan targets checked: wolfssl-src, wolfssl-bugs
Not reviewed (no scan target covers them): tests/api/test_tls13.h
Coverage: 2 of 3 in-scope changed file(s) opened by the reviewer; not opened: tests/api/test_tls13.c

Fenrir result: Approved ✅

No new issues found in the changed files.

Advisory only — this automated result does not count as a GitHub approval.

Review tier: Lite

@twcook86
twcook86 requested review from wolfSSL-Fenrir-bot and a balanced review from Copilot October 28, 2026 19:58

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fenrir Automated Review — PR #11884

Fenrir already completed a review of this PR at commit 6d024a391d5e (run 3521); its findings are the review threads on the PR. Push a new commit to request another review.

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.

🟢 Approval recommended

There are no active review issues for the changes that defer TLS 1.3 KeyUpdate responses when writes are blocked.

No open issues 🎉

Review effort: Balanced

@twcook86 twcook86 assigned wolfSSL-Bot and unassigned twcook86 Oct 28, 2026
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.

4 participants