Various fixes reported from analyzer#26
Merged
dgarske merged 20 commits intowolfSSL:mainfrom Mar 19, 2026
Merged
Conversation
slice indexing to prevent that. also the second copy_from_slice could overwritee the fist one.
are already supported.
…engths differ, slice indexing to prevent that. also the second copy_from_slice could overwritee the fist one.
rsa-pkcs1 and rsa-pss
so it outlives hmac_init so that it remains valid for the lifetime of the hmac operation
potentiall resource leaking; - custom deallocation method for rsa to reclaim the Box allocation; - implemented Send and Sync to send the new rsa object safely between threads;
and sha384, instead of doing bit by bit copies.
the peer public key length before slicing (skipping 0x04 first byyte) and return Result instead of panicking.
for all the cryptoo modules)
holtrop-wolfssl
approved these changes
Mar 19, 2026
dgarske
approved these changes
Mar 19, 2026
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.
f-904 - 3d50bbc check stat instead of only checking ret when verifying signatures (ed25519)
f-905 - 1a3db7b remove panic when signatures are invalid (verify/ecdsa.rs)
f-907 - ef80b36 copy_from_slice could panic when source and destination lengths differ, slice
indexing to prevent that. also the second copy_from_slice could overwrite the first one.
f-908 - 1cd5139 add missing RSA_PSS_SHA512 and RSA_PKCS1_SHA512 to the all array, which are already
supported.
f-917 - 5b2f5cb (aes256gcm) copy_from_slice could panic when source and destination lengths differ,
slice indexing to prevent that. also the second copy_from_slice could overwrite the first one.
f-909 - 5c0eb94 minor error in including ed448 as signature scheme in eddsa.rs
f-911 - 81d18aa match on any Err variant not just WCError when checking signatures in rsa-pkcs1 and
rsa-pss
f-918 - 3654c59 proper error mapping and return in sign/eddsa.rs instead of panic
f-914 - e7d5059 minor typo of the digest size in hmac_final (changed from sha3_384 to sha384)
f-906/915/916 - 9476a30 remove hmacobject dangling pointer, heap allocate hmac struct via box, so it outlives
hmac_init so that it remains valid for the lifetime of the hmac operation
f-910 - a91c8f1 check returned value of wc_HKDF_Expand with proper error propagation
f-912 - 9dc39df added drop implementations for the missing foreign types to prevent potential
resource leaking; custom deallocation method for rsa to reclaim the Box allocation; implemented Send and Sync to send the new rsa object safely between
threads
f-919 - d0f6ed0 use the appropriate copy function in the clone implementations of sha256 and sha384,
instead of doing bit by bit copies.
f-920 - b154c1f add lengths checks when deriving the secret in the p-* apis, to validate the peer
public key length before slicing (skipping 0x04 first byte) and return Result instead of panicking.
f-913 - 3d83b34 removing redundant check_if_zero, this was re-checking the wc_hmacfinal returned
value
f-921 - 254ec63 add zeroize crate to wipe key material from memory on drop (this applies for all the
crypto modules)