Fenrir fixes#10601
Open
kareem-wolfssl wants to merge 7 commits into
Open
Conversation
…_ex. Fixes F-3979.
…e error cases. Fixes F-4005.
…tPubLen. Fixes F-3980.
… path. This matches AES-EAX decrypt behavior as well as other AES modes. Fixes F-3759.
…24Final. Fixes F-4002.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR applies a set of defensive fixes across wolfCrypt and the TLS handshake layer to address multiple Fenrir issues, primarily by tightening argument/state validation, improving error propagation, and preventing resource leaks in hardware-backed code paths.
Changes:
- Hardened parameter validation in XMSS public-length retrieval and RNG allocation helpers.
- Improved Renesas TSIP RSA key generation and usage flow by returning meaningful error codes and freeing allocated buffers on failure.
- Aligned/strengthened AEAD tag-size validation (AES-EAX) and corrected an alert severity used when rejecting renegotiation.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
wolfcrypt/src/wc_xmss.c |
Adds key->params NULL validation to prevent invalid dereference when computing XMSS public key length. |
wolfcrypt/src/random.c |
Adds early rng == NULL guard in wc_rng_new_ex before writing through the pointer. |
wolfcrypt/src/port/Renesas/renesas_tsip_rsa.c |
Returns real status from TSIP RSA keygen, logs failures, frees allocated key-pair buffers on error, and avoids unnecessary key import attempts. |
wolfcrypt/src/port/cypress/psoc6_crypto.c |
Ensures SHA512/224 finalization failure is returned before attempting to re-init state. |
wolfcrypt/src/aes.c |
Enforces WOLFSSL_MIN_AUTH_TAG_SZ minimum tag size for AES-EAX encrypt finalization (matching decrypt-side constraints). |
src/internal.c |
Changes the renegotiation-rejection alert level from fatal to warning for no_renegotiation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
17558
to
17560
| if (eax == NULL || authTag == NULL || authTagSz == 0 || | ||
| authTagSz > WC_AES_BLOCK_SIZE) { | ||
| authTagSz > WC_AES_BLOCK_SIZE || authTagSz < WOLFSSL_MIN_AUTH_TAG_SZ) { | ||
| return BAD_FUNC_ARG; |
|
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
Fixes F-3772, F-3979, F-4005, F-3980, F-3759, F-4002, F-4113.
Testing
Built in tests.
Checklist