Skip to content

certs: warn when wolfSSL is older than 5.9.4 - #1399

Merged
philljj merged 1 commit into
wolfSSL:masterfrom
ejohnstown:certs-nc-warn
Nov 22, 2026
Merged

philljj merged 1 commit into
wolfSSL:masterfrom
ejohnstown:certs-nc-warn

Conversation

@ejohnstown

Copy link
Copy Markdown
Contributor

wolfSSL before 5.9.4 does not apply the name constraints of CAs above a
cert's issuer (CVE-2026-89133), which leaves certificate authentication
open to an out-of-namespace leaf from a peer-supplied CA.

  • configure warns after the summary when certs are on with older wolfSSL
  • builds without configure get a #warning (#pragma message on MSVC) from
    certman.c, via a version check in internal.h

Issue: F-13950

wolfSSL before 5.9.4 applies only the issuing CA's name constraints to
a cert (CVE-2026-89133). Peer chains verify one cert at a time, so a
peer-supplied CA can then issue a leaf outside a trusted CA's namespace.

- configure warns after the summary when certs are on
- internal.h defines WOLFSSH_CERTS_OLD_NAME_CONSTRAINTS for that case
- certman.c raises a #warning from it, or #pragma message under MSVC,
  in builds without config.h

Issue: F-13950
@ejohnstown

Copy link
Copy Markdown
Contributor Author

@claude review

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides the inline finding, I checked the order of definitions and includes, and it holds up. WOLFSSL_V5_9_4 is already defined at wolfssh/internal.h:129 and <wolfssl/version.h> is included at line 34, so both exist before the new check at line 146. In src/certman.c, wolfssh/internal.h is included above the new #warning block, so WOLFSSH_CERTS_OLD_NAME_CONSTRAINTS is already defined (or not) when that block is reached.

Extended reasoning...

I checked whether the new version check in wolfssh/internal.h and the warning in src/certman.c could see WOLFSSL_V5_9_4 and LIBWOLFSSL_VERSION_HEX at the point they're used. Both macros are defined earlier in internal.h, which certman.c includes above the new block, so the check works as intended.

Comment thread src/certman.c Resolved

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #1399

Scan targets checked: wolfssh-src, wolfssh-bugs
Not reviewed (no scan target covers them): configure.ac
Coverage: 2 of 2 in-scope changed file(s) opened by the reviewer

Fenrir result: Approved ✅

No new issues found in the changed files.

Advisory only — this automated result does not count as a GitHub approval.

Review tier: Max

@philljj
philljj merged commit ee0961b into wolfSSL:master Nov 22, 2026
223 checks passed
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.

4 participants