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
Open
Free old peerSigSpec pointer before allocating. Add length checks for DSA Q buffer in EVP layer.#11549kareem-wolfssl wants to merge 3 commits into
kareem-wolfssl wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
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
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.
kareem-wolfssl
marked this pull request as ready for review
September 28, 2026 22:41
kareem-wolfssl
force-pushed
the
zd22505
branch
from
September 28, 2026 22:42
d73e708 to
155cc22
Compare
|
retest this please |
Contributor
Author
|
Retest this please |
kareem-wolfssl
force-pushed
the
zd22505
branch
3 times, most recently
from
October 1, 2026 18:13
9c4ae52 to
6ea37fa
Compare
… it. Thanks to Bright Zhu for the report.
Thanks to Bright Zhu for the report.
kareem-wolfssl
force-pushed
the
zd22505
branch
from
October 1, 2026 19:36
6ea37fa to
61b9cb4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Fixes zd#22505, zd#22508
Testing
Built in tests, added tests, provided reproducers
Checklist