Skip to content

additional sanity check on alert message size#10692

Merged
dgarske merged 1 commit into
wolfSSL:masterfrom
JacobBarthelmeh:fuzz
Jun 16, 2026
Merged

additional sanity check on alert message size#10692
dgarske merged 1 commit into
wolfSSL:masterfrom
JacobBarthelmeh:fuzz

Conversation

@JacobBarthelmeh

@JacobBarthelmeh JacobBarthelmeh commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

@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 #10692

Scan targets checked: wolfssl-bugs, wolfssl-src

No new issues found in the changed files. ✅

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

Note

Copilot was unable to run its full agentic suite in this review.

Adds an additional bounds/sanity check when parsing TLS alert messages to avoid reading past the end of the input buffer.

Changes:

  • Extends the alert-size validation in DoAlert with an input-buffer bounds check.
Comments suppressed due to low confidence (1)

src/internal.c:1

  • The new bounds check can be bypassed via integer overflow in *inOutIdx + ALERT_SIZE if *inOutIdx is near the max value of its type, potentially leading to an out-of-bounds read. Use an overflow-safe comparison (e.g., check *inOutIdx > length - ALERT_SIZE after confirming length >= ALERT_SIZE, or cast to a wider unsigned type and validate) to make the boundary check robust.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions

Copy link
Copy Markdown

MemBrowse Memory Report

gcc-arm-cortex-m3

  • FLASH: .text +4 B (+0.0%, 121,397 B / 262,144 B, total: 46% used)

gcc-arm-cortex-m4-pq

  • FLASH: .text +64 B (+0.0%, 277,944 B / 1,048,576 B, total: 27% used)

gcc-arm-cortex-m7-pq

@JacobBarthelmeh JacobBarthelmeh added the For This Release Release version 5.9.2 label Jun 15, 2026
@dgarske dgarske merged commit 70883a4 into wolfSSL:master Jun 16, 2026
305 of 307 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For This Release Release version 5.9.2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants