Skip to content

Free old peerSigSpec pointer before allocating. Add length checks for DSA Q buffer in EVP layer. - #11549

Open
kareem-wolfssl wants to merge 3 commits into
wolfSSL:masterfrom
kareem-wolfssl:zd22505
Open

kareem-wolfssl wants to merge 3 commits into
wolfSSL:masterfrom
kareem-wolfssl:zd22505

Conversation

@kareem-wolfssl

Copy link
Copy Markdown
Contributor

Description

Fixes zd#22505, zd#22508

Testing

Built in tests, added tests, provided reproducers

Checklist

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

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.

Copilot review overview

🟡 Changes recommended

The new tests contain unconditional missing-symbol references and an invalid DSA_LoadDer call that break supported builds.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 2 High severity

Open (2)
What changed in this PR

Fixes CKS reparsing leaks and DSA verification buffer overreads.

Changes:

  • Frees previous peer CKS data before replacement.
  • Validates DSA digest and signature lengths.
  • Adds regression tests for both fixes.
File Description
src/​tls.c Releases old peer CKS data safely.
wolfcrypt/​src/​evp.c Adds DSA verification length checks.
tests/​api/​test_tls13.c Tests CKS reparsing after HRR.
tests/​api/​test_tls13.h Registers the CKS regression test.
tests/​api/​test_evp_pkey.c Tests truncated DSA inputs.
tests/​api/​test_evp_pkey.h Registers the DSA regression test.

💡 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_evp_pkey.c Outdated
Comment thread tests/api/test_tls13.c Outdated
@kareem-wolfssl kareem-wolfssl removed the Not For This Release Not for release 5.9.4 label Sep 28, 2026
@kareem-wolfssl
kareem-wolfssl marked this pull request as ready for review September 28, 2026 22:41
@github-actions

Copy link
Copy Markdown

retest this please

@kareem-wolfssl

Copy link
Copy Markdown
Contributor Author

Retest this please

@kareem-wolfssl
kareem-wolfssl force-pushed the zd22505 branch 3 times, most recently from 9c4ae52 to 6ea37fa Compare October 1, 2026 18:13
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