Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

20240512-pkcs12_test-leak #7524

Merged
merged 1 commit into from
May 12, 2024

Conversation

douzzer
Copy link
Contributor

@douzzer douzzer commented May 12, 2024

wolfcrypt/test/test.c:

  • fix unconditional memory leak in pkcs12_test().
  • refactor pkcs12_test() to fix error-conditional memory leaks.
  • fix various old-style return codes in sm4_ccm_test(), pkcs12_test(), prf_test(), tls12_kdf_test(), xmss_test(), xmss_test_verify_only(), lms_test(), and lms_test_verify_only().

tested with wolfssl-multi-test.sh ... super-quick-check linuxkm-aesni-insmod-kmemleak sp-all-asm-smallstack-valgrind-testsuite sanitizer-all-intelasm-c-fallback-fuzzer

note: weirdly, the memory leak in pkcs12_test() was only detected by the nightly kmemleak tests (linuxkm-noasm-insmod-kmemleak and linuxkm-aesni-insmod-kmemleak), not by any of the sanitizer or valgrind runs.

* fix unconditional memory leak in pkcs12_test().
* refactor pkcs12_test() to fix error-conditional memory leaks.
* fix various old-style return codes in sm4_ccm_test(), pkcs12_test(), prf_test(), tls12_kdf_test(), xmss_test(), xmss_test_verify_only(), lms_test(), and lms_test_verify_only().
@douzzer
Copy link
Contributor Author

douzzer commented May 12, 2024

retest this please

@SparkiDev SparkiDev removed the request for review from julek-wolfssl May 12, 2024 23:05
@SparkiDev SparkiDev merged commit 0d996f4 into wolfSSL:master May 12, 2024
115 checks passed
jefferyq2 pushed a commit to jefferyq2/wolfssl that referenced this pull request Jun 9, 2024
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.

3 participants