Repository navigation
20261029-misc-fixes - #11934
20261029-misc-fixes#11934
Conversation
|
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved issues include out-of-bounds authentication-tag zeroization, broken kernel return-thunk mitigation handling, and compilation failures in supported configurations.
4 open issues
What changed in this PR
This PR addresses compatibility and cleanup issues in wolfSSL’s Linux kernel integration, AES-GCM shim, and cryptographic tests and benchmarks.
Changes:
- Correct kernel mitigation flag handling and adjust objtool controls.
- Add ciphertext and tag wiping on AES-GCM shim failures.
- Refactor FrodoKEM benchmark key lifetimes and exclude SLH-DSA certificate tests from no-malloc builds.
| File | Description |
|---|---|
wolfssl/wolfcrypt/wc_compat.h |
Wipe output and authentication tags after streaming-shim failures. |
wolfcrypt/test/test.c |
Disable SLH-DSA certificate tests with WOLFSSL_NO_MALLOC. |
wolfcrypt/benchmark/benchmark.c |
Adjust FrodoKEM key initialization, generation, and cleanup. |
linuxkm/Kbuild |
Update mitigation flags, legacy configuration aliases, and objtool handling. |
Review effort: Balanced
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #11934
Scan targets checked: wolfcrypt-src, wolfcrypt-bugs, wolfssl-src, wolfssl-bugs
Not reviewed (no scan target covers them): linuxkm/Kbuild, wolfcrypt/benchmark/benchmark.c
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: Lite
b5c5eb4 to
36f4ff4
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
The new inline shims call ForceZero without a prior declaration when FIPS AES-GCM and WOLFSSL_NO_FORCE_ZERO are enabled, causing compilation failures even when applications provide the zeroizer in another translation unit.
3 resolved since last review
Review effort: Balanced
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #11934
Scan targets checked: wolfcrypt-src, wolfcrypt-bugs, wolfssl-src, wolfssl-bugs
Not reviewed (no scan target covers them): linuxkm/Kbuild, wolfcrypt/benchmark/benchmark.c
Coverage: 1 of 2 in-scope changed file(s) opened by the reviewer; not opened: wolfssl/wolfcrypt/memory.h
Findings: 1
1 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Reported findings require changes before merge.
Review tier: Lite
|
retest this please |
|
retest this please ( |
36f4ff4 to
724c8d3
Compare
|
note: merge with |
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #11934
Scan targets checked: wolfcrypt-src, wolfcrypt-bugs, wolfssl-src, wolfssl-bugs
Not reviewed (no scan target covers them): .wolfssl_known_macro_extras, linuxkm/Kbuild, wolfcrypt/benchmark/benchmark.c
Coverage: 5 of 15 in-scope changed file(s) opened by the reviewer; not opened: src/pk.c, tests/api/test_aes.c, tests/api/test_kdf.c, tests/api/test_ossl_x509_str.c, tests/api/test_sha512.c, wolfcrypt/src/evp.c, wolfcrypt/src/hpke.c, wolfcrypt/src/pkcs7.c, wolfssl/internal.h, wolfssl/wolfcrypt/types.h
Findings: 3
3 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Reported findings require changes before merge.
Review tier: Lite
5f103d5 to
d76e0d1
Compare
There was a problem hiding this comment.
🟡 Changes recommended
With WOLFSSL_NO_FORCE_ZERO enabled in non-FIPS builds, memory.h aliases wc_ForceZero to an undeclared ForceZero, preventing callers that include only this header from compiling in C++ or strict C.
1 open issue
1 resolved since last review
Review effort: Balanced
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #11934
Scan targets checked: wolfcrypt-src, wolfcrypt-bugs, wolfssl-src, wolfssl-bugs
Not reviewed (no scan target covers them): .wolfssl_known_macro_extras, linuxkm/Kbuild, wolfcrypt/benchmark/benchmark.c
Coverage: 2 of 2 in-scope changed file(s) opened by the reviewer
Findings: 2
2 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Reported findings require changes before merge.
Review tier: Lite
…Level for the mismatched _PublicKeyDecode() refusal test.
PRIVATE_KEY_UNLOCK()/LOCK() pairs for FIPS-gated KDF/KEM calls whose output is consumed internally: in wc_PKCS7_GenerateKEK_PWRI() around the wc_PBKDF2() KEK derivation (reached from both wc_PKCS7_AddRecipient_PWRI() and PWRI decode), and in wc_HpkeInitSealContext() and wc_HpkeInitOpenContext() around wc_HpkeSetupBaseSender()/-Receiver(), matching the existing arrangement in wc_HpkeSealBase()/wc_HpkeOpenBase(). Both paths returned FIPS_PRIVATE_KEY_LOCKED_E in FIPS builds; untested previously because configure omits PKCS7 and HPKE from FIPS builds unless explicitly enabled.
…) wraps: * in dh_agree_ct_test(), add point-of-use PRIVATE_KEY_UNLOCK()/PRIVATE_KEY_LOCK() around the wc_DhAgree_ct() calls, and in dh_key_import_export_test(), around the wc_DhExportKeyPair() call. No current FIPS flavor gates these, but the wraps are harmless and future-proof the tests against a flavor that restores DH to inside-boundary status, or activates these subtests on FIPS <v7. * in mlkem512_kat(), mlkem768_kat(), and mlkem1024_kat(), add point-of-use PRIVATE_KEY_UNLOCK()/PRIVATE_KEY_LOCK() around the wc_MlKemKey_EncodePrivateKey() and wc_MlKemKey_Decapsulate() calls.
* in wc_rng_bank_init_nonce(), use wc_RNG_lock_put_unconditional() to unlock the root_rng if it was locked, and don't unlock it otherwise; * in wc_rng_bank_root_rng_init(), if RNG init fails and the caller didn't request _PRESERVE_LOCK, wipe the root_rng, restoring it to its condition after the whole-context wipe at the start of wc_rng_bank_init_nonce() -- with this fix, wc_rng_bank_root_rng_init() always leaves bank->root_rng in a known and sensible state that the caller can rely on, regardless of retval.
…orceZero(), matching the one in wc_compat.h, to assure warning-free availability regardless of include order.
…cess, call wolfSSL_RAND_Cleanup() before _exit() to avoid valgrind-detected leaks of globalRNG allocations.
…cc_export_x963_ex(); fix unused-store warning in ed448_kat_test(); add missing PRIVATE_KEY_UNLOCK()s in mlkem_asn1_test().
…l PRIVATE_KEY_UNLOCK() for wc_ecc_export_x963_ex().
…'t wipe buffers when WC_PENDING_E, and don't wipe output buffer when it's equal to the input buffer.
3c359b4 to
1b6fa87
Compare
There was a problem hiding this comment.
🟡 Changes recommended
RNG initialization failures can leak an allocated Nitrox context because resetting the RNG discards the device handle before cleanup, requiring partial-resource cleanup before zeroing.
1 open issue
1 resolved since last review
Review effort: Balanced
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #11934
Scan targets checked: wolfcrypt-src, wolfcrypt-bugs, wolfssl-src, wolfssl-bugs
Not reviewed (no scan target covers them): .wolfssl_known_macro_extras, linuxkm/Kbuild, wolfcrypt/benchmark/benchmark.c
Coverage: 6 of 16 in-scope changed file(s) opened by the reviewer; not opened: src/pk.c, tests/api/test_aes.c, tests/api/test_sha512.c, wolfcrypt/src/evp.c, wolfcrypt/src/hpke.c, wolfcrypt/src/pkcs7.c, wolfssl/internal.h, wolfssl/wolfcrypt/error-crypt.h, wolfssl/wolfcrypt/memory.h, wolfssl/wolfcrypt/types.h
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: Lite
Fenrir's latest completed scan found no issues; clearing the prior automated change request.
|
retest this please |
|
tests good with multi-test with |


linuxkm/Kbuild: fix+improve handling forCONFIG_MITIGATION_RETPOLINE,CONFIG_MITIGATION_RETHUNK, andCONFIG_OBJTOOL. Also tabify some whitespace.wolfssl/wolfcrypt/wc_compat.h: inwc_AesGcmEncrypt_compat_shim(), wipe tag and output to matchwc_AesGcmEncrypt().wolfcrypt/test/test.c: don't defineSLHDSA_TEST_CERTifWOLFSSL_NO_MALLOC(not compatible).wolfcrypt/benchmark/benchmark.c: refactor key init/free inbench_frodokem_keygen(),bench_frodokem_encap(), andbench_frodokem(), to fix uninited-key free ops.