Skip to content

Fix a couple of issues in DTLS ClientHello parsing. - #11007

Open
kareem-wolfssl wants to merge 2 commits into
wolfSSL:masterfrom
kareem-wolfssl:zd22219
Open

Fix a couple of issues in DTLS ClientHello parsing.#11007
kareem-wolfssl wants to merge 2 commits into
wolfSSL:masterfrom
kareem-wolfssl:zd22219

Conversation

@kareem-wolfssl

Copy link
Copy Markdown
Contributor

Thanks to the Fuzz0x team for the report.

Description

Fixes zd#22219

Testing

Provided reproducers + built in tests

Checklist

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

@kareem-wolfssl kareem-wolfssl self-assigned this Jul 29, 2026
Copilot AI review requested due to automatic review settings July 29, 2026 22:22

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 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.

Tightens DTLS/TLS 1.3 ClientHello parsing to prevent out-of-bounds reads when consuming length-prefixed legacy fields (session_id and legacy_cookie), aligning error handling with fuzz-discovered edge cases.

Changes:

  • Added explicit bounds checks before reading opaque-8 length fields in DoTls13SupportedVersions.
  • Added bounds check and refactored cookieLen handling in DTLS DoTls13ClientHello parsing.

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

Comment thread src/tls13.c Outdated
Comment thread src/tls13.c Outdated
Comment thread src/tls13.c
@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown

@Fuzz0X

Fuzz0X commented Jul 31, 2026

Copy link
Copy Markdown

I tested PR #11007 locally with my ASAN repro. Before the patch it hit the heap-buffer-overflow in
DoTls13SupportedVersions, and after applying the PR it just returns malformed buffer input error (-328) with no ASAN
crash.

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.

3 participants