Xilinx/AMD port fixes for sanity checks on return values and psoc6 sanity check on input arg#10467
Open
JacobBarthelmeh wants to merge 4 commits into
Open
Xilinx/AMD port fixes for sanity checks on return values and psoc6 sanity check on input arg#10467JacobBarthelmeh wants to merge 4 commits into
JacobBarthelmeh wants to merge 4 commits into
Conversation
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #10467
Scan targets checked: wolfcrypt-port-bugs
No new issues found in the changed files. ✅
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request tightens error handling and argument validation in hardware-accelerated crypto ports, ensuring Xilinx/AMD SHA3 and AES-GCM wrapper APIs fail fast when underlying XSecure calls report errors, and preventing a NULL dereference in the PSoC6 SHA-512 init path.
Changes:
- Add return-value checks for XSecure SHA3 update/final/readhash calls and map failures to
WC_HW_E. - Add return-value checks for XSecure AES-GCM initialization/encrypt operations (with cleanup on failure) and initialization in decrypt.
- Add a NULL check for
shain PSoC6wc_InitSha512_ex()beforeXMEMSET.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| wolfcrypt/src/port/xilinx/xil-sha3.c | Check XSecure SHA3 API return codes and return WC_HW_E on hardware failures. |
| wolfcrypt/src/port/xilinx/xil-aesgcm.c | Validate XSecure AES init/encrypt return values and ensure temporary buffer is freed on failure. |
| wolfcrypt/src/port/cypress/psoc6_crypto.c | Add sha == NULL guard in SHA-512 init to avoid NULL dereference. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Batch of Fenrir reports