Open
Conversation
…649, F-657, F-658, F-659, F-660, F-732, F-733, F-734, F-735, F-736, F-740, F-741, F-742, F-1108, F-1109, F-1484, F-1485, F-1486, F-1487, F-1488, F-1489
0180c8d to
2e39b45
Compare
2e39b45 to
b8f8a10
Compare
b8f8a10 to
21a746c
Compare
- Copilot: privkey double-free — Fixed: added privkey = NULL after mid-function free at line 454 - Copilot: ForceZero NULL guard in OCSP — Fixed: added if (signerKeyDer != NULL && signerKeyDerSz > 0) guard - Copilot: ForceZero on key buffers in GenChimeraCertSign — Fixed: added ForceZero on caKeyBuf, altCaKeyBuf, serverKeyBuf before XFREE - Fenrir: pkey vs privkey — No change needed: pkey is a borrowed ref from X509_get0_pubkey, not owned by caller. Removing the free was correct. - Fenrir: Missing ForceZero on heap key buffers — Same as Copilot wolfSSL#3, addressed above - CI: switch-enum errors — Fixed: removed inner #ifdef guards on enum cases that always exist, added SM3 under #ifdef WOLFSSL_SM3, removed WC_HASH_TYPE_MAX (duplicate value) - CI: heap-buffer-overflow in strstr — Fixed: allocate inBufSz + 1 and null-terminate for XSTRSTR safety - CI: heap-use-after-free — Fixed by the privkey NULL fix above
21a746c to
6590906
Compare
- Copilot: BN_bn2hex NULL guard — Added NULL check on num before calling wolfSSL_BN_bn2hex - Copilot: return 0 on missing args — Changed return ret to return USER_INPUT_ERROR at lines 118 and 194 - Copilot: SHA-224 test assertion — Test now fails if sha224 is NOT found (not just if sha256 is) - Copilot: dilithium_init return value — Capture into ret for proper error logging - Security review: Missing ForceZero on keyBuf — Added ForceZero before XFREE on all keyBuf free paths in both certgen files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
F-570Allocate +1 for null terminator in IV and key string copiesF-572Move XMEMSET before wc_dilithium_init in sign pathF-573Free data and hash buffers on all return paths in verifyF-574Add ForceZero on password buffer in PKCS12F-575Add ForceZero on password and keyBuffer in PKCS8F-645Use wolfCLU_checkOutform for RSA -outform optionF-646Add #else error handling for disabled hash algorithms in switchF-647Return WOLFCLU_SUCCESS from wolfCLU_setAttributesF-648Check wc_RsaPrivateKeyDecode return value directlyF-649Check wc_EccPrivateKeyDecode return value directlyF-657Map sha224 to WC_HASH_TYPE_SHA224, use else-if chainF-658Move XMEMSET before wc_dilithium_init in verify pathF-659Heap-allocate large temp buffers in GenChimeraCertSignF-660Use XSTRCMP for exact match in config parsingF-732Map dgst -out to WOLFCLU_OUTFILEF-733Write actual signature length in ED25519 sign outputF-734Write actual DER size in ECC private key outputF-735Change || to && in XMSS/XMSSMT argv bounds checkF-736Guard base64 allocation with success check in randF-740Use wolfCLU_checkOutform for CRL -outform optionF-741Remove free of borrowed EVP_PKEY from X509_get0_pubkeyF-742Add ret+1 < argc guard before argv access (3 files)F-1108Return error code on file open failure in dilithium signF-1109Break on BN_rand failure, guard serial number setF-1484Free data buffer on read failure in signF-1485Add NULL check on X509_NAME_oneline returnF-1486Refactor RSA certgen to goto cleanup for resource managementF-1487Free keyBuf on read failure in RSA certgenF-1488Free keyBuf on read failure in ED25519 certgenF-1489Add ForceZero before freeing signer key in OCSP responderTest coverage
Tests updated and what they cover
tests/pkey/rsa-test.sh
F-645- verify -outform error message references "outform"tests/x509/CRL-verify-test.sh
F-740- verify -outform error message references "outform"tests/encrypt/enc-test.sh
F-570- encrypt with explicit hex key/IV succeedstests/genkey_sign_ver/genkey-sign-ver-test.sh
F-733- ED25519 sig file is exactly 64 bytesF-734- ECC DER key file size is reasonable, not buffer-sizedF-742- missing -inkey value fails gracefully, not segfaultF-735- missing -height value fails gracefully (if XMSS compiled in)F-648/F-649— sign with empty key file returns errortests/hash/hash-test.sh
F-742- missing -in value fails gracefully, not segfaulttests/bench/bench-test.sh
F-742- missing -time value fails gracefully, not segfaulttests/dgst/dgst-test.sh
F-732- dgst -out creates output file and round-trips with -signaturetests/x509/x509-process-test.sh
F-741- x509 -modulus -noout does not crashtests/x509/x509-req-test.sh
F-657- SHA-224 cert signature algorithm checkF-660- abbreviated keyUsage "d" does not match digitalSignatureF-647- req with challengePassword attribute succeedsFixed fsan leak for x509 that was being leaked and suppressed by command line tests
SHA-224 test assertion fails if not found now
properly error on dillithium return
Add missing force zeros for keybuf
fix ed25519 certgen cleanup on error paths
Other tests not covered by test validated by internal testing suite + code review since test paths where not hit with simple command line code tests in make check