Ensure the ECDSA signature scheme is bound to the certificate curve. Always validate MFL for TLS 1.3, even when WOLFSSL_OLD_UNSUPPORTED_EXTENSION is defined. - #11494
Open
kareem-wolfssl wants to merge 3 commits into
Conversation
…PPORTED_EXTENSION defined. Fixes F-11837.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The ECDSA validation compares curve sizes rather than exact curve identities, allowing same-sized mismatched curves.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Strengthens TLS 1.3 validation for ECDSA signature schemes and Maximum Fragment Length responses.
Changes:
- Validates peer ECDSA certificate curves during
CertificateVerify. - Enforces TLS 1.3 MFL validation despite legacy extension handling.
- Adds regression tests for both behaviors.
File summaries
| File | Description |
|---|---|
wolfssl/internal.h |
Exposes the ECC strength comparison helper. |
src/internal.c |
Makes the ECC helper externally accessible. |
src/tls13.c |
Adds ECDSA curve validation. |
src/tls.c |
Enforces TLS 1.3 MFL response checks. |
tests/api/test_tls13.c |
Tests ECDSA scheme/curve mismatches. |
tests/api/test_tls13.h |
Registers the new TLS 1.3 test. |
tests/api/test_tls_parse.c |
Tests TLS 1.3 MFL validation. |
Review details
- Files reviewed: 7/7 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+12420
to
+12421
| return CmpEccStrength(ssl->options.peerHashAlgo, | ||
| ssl->peerEccDsaKey->dp->size) == 0; |
|
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#22471, F-11837
Thanks to Eva Crystal (0xiviel), XSource Security for the ECDSA report!
Testing
Built in/added tests, provided reproducer
Checklist