Skip to content

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
wolfSSL:masterfrom
kareem-wolfssl:zd22471

Conversation

@kareem-wolfssl

Copy link
Copy Markdown
Contributor

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

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

🟡 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 thread src/tls13.c Outdated
Comment on lines +12420 to +12421
return CmpEccStrength(ssl->options.peerHashAlgo,
ssl->peerEccDsaKey->dp->size) == 0;
@github-actions

github-actions Bot commented Sep 18, 2026

Copy link
Copy Markdown

MemBrowse Memory Report

gcc-arm-cortex-m4-dtls13

  • FLASH: .text +64 B (+0.0%, 188,668 B / 1,048,576 B, total: 18% used)

gcc-arm-cortex-m4-openssl-compat

  • FLASH: .rodata +8 B, .text +64 B (+0.0%, 786,284 B / 1,048,576 B, total: 75% used)

gcc-arm-cortex-m4-pq

  • FLASH: .text +128 B (+0.0%, 303,696 B / 1,048,576 B, total: 29% used)

gcc-arm-cortex-m4-tls13

  • FLASH: .text +128 B (+0.1%, 244,119 B / 262,144 B, total: 93% used)

gcc-arm-cortex-m7-pq

  • FLASH: .text +128 B (+0.0%, 304,592 B / 1,048,576 B, total: 29% used)

gcc-arm-cortex-m7-tls13

  • FLASH: .text +64 B (+0.0%, 244,119 B / 262,144 B, total: 93% used)

linuxkm-standard

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.

2 participants