Skip to content

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
wolfSSL:masterfrom
JacobBarthelmeh:static_analysis_2
Open

Xilinx/AMD port fixes for sanity checks on return values and psoc6 sanity check on input arg#10467
JacobBarthelmeh wants to merge 4 commits into
wolfSSL:masterfrom
JacobBarthelmeh:static_analysis_2

Conversation

@JacobBarthelmeh
Copy link
Copy Markdown
Contributor

@JacobBarthelmeh JacobBarthelmeh commented May 12, 2026

Batch of Fenrir reports

@JacobBarthelmeh JacobBarthelmeh self-assigned this May 12, 2026
Copilot AI review requested due to automatic review settings May 12, 2026 16:35
Copy link
Copy Markdown

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #10467

Scan targets checked: wolfcrypt-port-bugs

No new issues found in the changed files. ✅

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 sha in PSoC6 wc_InitSha512_ex() before XMEMSET.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants