Skip to content

Minor fixes for nightly multi-test tool#9977

Merged
dgarske merged 6 commits intowolfSSL:masterfrom
JacobBarthelmeh:multi-test
Mar 16, 2026
Merged

Minor fixes for nightly multi-test tool#9977
dgarske merged 6 commits intowolfSSL:masterfrom
JacobBarthelmeh:multi-test

Conversation

@JacobBarthelmeh
Copy link
Contributor

Most fixes are from the nightly multi-test tool. The mp_clear on error with integer.c is from a fuzzing report.

@JacobBarthelmeh JacobBarthelmeh self-assigned this Mar 16, 2026
Copilot AI review requested due to automatic review settings March 16, 2026 06:16
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR applies small robustness fixes from nightly multi-test runs and a fuzzing report, focusing on safer cleanup/error-handling and preventing NULL dereferences.

Changes:

  • Prevent potential leaks by clearing temporary bignum state on early error return in mp_div_3.
  • Avoid NULL dereferences by using a safe heap pointer in ASN decode functions and guarding SNI parsing against sni == NULL.
  • Improve test helper robustness by checking fwrite() success before returning.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
wolfcrypt/src/integer.c Clears temporary mp_int before returning on invalid input to avoid leaks.
wolfcrypt/src/asn.c Uses a local heap variable to safely allocate/free ASN template data even when key is NULL.
tests/api.c Adds fwrite() error handling when persisting LMS private key material in a test helper.
src/tls.c Adds NULL checks around sni and host_name accesses in SNI parsing logic.
configure.ac Auto-disables OCSP responder when SHA-1 is disabled under enable-all modes; errors otherwise.
Comments suppressed due to low confidence (1)

tests/api.c:1

  • fwrite() returns size_t, while privSz is a word32. Comparing different-width unsigned types can trigger compiler warnings and, on some platforms, subtle issues. Consider casting privSz to size_t for the comparison (and/or storing the expected size in a size_t) so the check is type-consistent.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

…nable_sha = no, remove enable_ocsp_responder from enable-all-crypto setup, and remove superseded fixup clause for ENABLED_OCSP_RESPONDER with ENABLED_SHA = no.

.wolfssl_known_macro_extras: remove unneeded WOLFSSL_PYTHON.
@JacobBarthelmeh
Copy link
Contributor Author

Retest this please Jenkins PRB-FIPS-windows-test-ACVP

@dgarske dgarske merged commit 96661a5 into wolfSSL:master Mar 16, 2026
465 of 466 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.

5 participants