Skip to content

Commit

Permalink
Merge pull request #88 from bigbrett/quickfix-SHE-leak
Browse files Browse the repository at this point in the history
Fix memory leak in SHE tests
  • Loading branch information
billphipps authored Jan 23, 2025
2 parents ba12f79 + 45669e9 commit 4c93155
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ jobs:
- name: Build and test ASAN DEBUG
run: cd test && make clean && make DEBUG=1 ASAN=1 WOLFSSL_DIR=../wolfssl run

# Build and test debug build with SHE
- name: Build and test SHE
run: cd test && make clean && make SHE=1 WOLFSSL_DIR=../wolfssl run
# Build and test with SHE and ASAN
- name: Build and test ASAN SHE
run: cd test && make clean && make SHE=1 ASAN=1 WOLFSSL_DIR=../wolfssl run
3 changes: 2 additions & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# wolfHSM Release v1.1.0 (January 22, 2025)
# wolfHSM Release v1.1.0 (January 23, 2025)
Due to NDA restrictions, access to the Infineon and ST Micro ports is limited. Please contact support@wolfssl.com for access.

## New Feature Additions
Expand All @@ -8,6 +8,7 @@ Due to NDA restrictions, access to the Infineon and ST Micro ports is limited. P
## Bug Fixes
* Fixes memory error in ECC verify (PR#81)
* Removes unused argument warnings on 32 bit targets (PR#82)
* Fixes memory leak in SHE test (PR#88)

## Enhancements and Optimizations
* Improved handling of Curve25519 DER encoded keys using new wolfCrypt APIs (PR#83)
Expand Down
2 changes: 2 additions & 0 deletions test/wh_test_she.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ int whTest_SheClientConfig(whClientConfig* config)
WH_ERROR_PRINT("Failed to wc_RNG_GenerateBlock %d\n", ret);
goto exit;
}
/* Done generating test data, free RNG */
wc_FreeRng(rng);
/* cmac 0..0 | size | bootloader */
if ((ret = wc_InitCmac(cmac, key, sizeof(key), WC_CMAC_AES, NULL)) != 0) {
WH_ERROR_PRINT("Failed to wc_InitCmac %d\n", ret);
Expand Down

0 comments on commit 4c93155

Please sign in to comment.