Skip to content

20260610-ssl_api_ext-revert-ret-cascades#10654

Open
douzzer wants to merge 3 commits into
wolfSSL:masterfrom
douzzer:20260610-ssl_api_ext-revert-ret-cascades
Open

20260610-ssl_api_ext-revert-ret-cascades#10654
douzzer wants to merge 3 commits into
wolfSSL:masterfrom
douzzer:20260610-ssl_api_ext-revert-ret-cascades

Conversation

@douzzer

@douzzer douzzer commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

The first commit in this PR just reverts semantically unchanged functions refactored by 359e688, reverting them to their exact pre-refactor form as of the prior commit, 4f09916. Several whitespace changes in these functions are also reverted. All substantive changes in 359e688 are carried forward.

--

src/ssl_api_ext.c and src/ssl_api_pk.c: restore early BAD_FUNC_ARG returns that were refactored away in 359e688, fixing null pointer deref regression in wolfSSL_UseALPN() (possibly others too).

wolfssl/ssl.h: add !NO_TLS gate around prototypes for wolf*_{client,server}_method*() to induce compile-time failures for TLS/SSL usage in NO_TLS configurations.

tests/api/test_ssl_cert.c, tests/api/test_ssl_ext.c, tests/api/test_ssl_pk.c: add missing gates on !NO_TLS.

--

fixes failures on all-no-tls, lms-xmss-wolfssl-all-clang-sanitizer, sanitizer-clang-all-noasm, and sanitizer-clang-all-intelasm.

--

tested with

wolfssl-multi-test.sh ...
pr-check

douzzer added 3 commits June 10, 2026 12:05
…turns that were refactored away in 359e688, fixing null pointer deref regression in wolfSSL_UseALPN() (possibly others too).
…erver}_method*() to induce compile-time failures for TLS/SSL usage in NO_TLS configurations.

@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 #10654

Scan targets checked: wolfcrypt-rs-bugs, wolfssl-bugs, wolfssl-src

No new issues found in the changed files. ✅

@douzzer

douzzer commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

retest this please
("fips harness failed" for unclear reasons, no possible connection to PR)

@dgarske dgarske left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Allowing this revert even though I am not a fan, but it does de-risk so close to the release.

@douzzer

douzzer commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

Linking related PR #10569

The defect detected by clang UB sanitizer:

359e688dc3 (<sean@wolfssl.com> 2026-06-04 10:40:51 +1000 706)     XFREE(token, ssl->heap, DYNAMIC_TYPE_ALPN);
src/ssl_api_ext.c:706:5: runtime error: member access within null pointer of type 'WOLFSSL' (aka 'struct WOLFSSL')
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/ssl_api_ext.c:706:5 

@douzzer

douzzer commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

Don't merge -- pending followup/replacement PR.

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