Fenrir-fixes#439
Open
jackctj117 wants to merge 10 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR strengthens wolfHSM’s security posture across authentication and key/NVM handling by introducing constant-time credential checks, stricter sensitive-memory scrubbing, and more explicit enforcement/testing of NVM access/usage policies.
Changes:
- Add constant-time credential comparison helper and update authentication checks to enforce exact-length matches.
- Enforce fail-closed behavior for
WH_NVM_ACCESS_NONEobjects and standardize default access for several SHE-related keys/objects. - Expand tests for SHE LOAD KEY integrity, NVM access policy enforcement, and Curve25519 usage-flag enforcement.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
src/wh_auth_base.c |
Introduces constant-time credential comparison helper and updates credential checks. |
test/wh_test_auth.c |
Adds regression tests ensuring wrong-length credentials are rejected. |
src/wh_nvm.c |
Adds fail-closed policy enforcement for WH_NVM_ACCESS_NONE. |
test/wh_test_nvmflags.c |
Adds tests verifying WH_NVM_ACCESS_NONE denies read/overwrite/destroy. |
src/wh_server_she.c |
Standardizes SHE object metadata defaults (notably meta->access). |
src/wh_client_she.c |
Aligns SHE pre-program key creation with new NVM access policy expectations. |
test/wh_test_she.c |
Adds test ensuring corrupted M3 is rejected without mutating slot state. |
test/wh_test_crypto.c |
Adds Curve25519/X25519 test verifying DERIVE usage enforcement. |
port/posix/posix_transport_shm.c |
Adds explicit scrubbing of temporary DMA buffers before free. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #439
Scan targets checked: wolfhsm-core-bugs, wolfhsm-crypto-bugs, wolfhsm-src
No new issues found in the changed 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.
https://fenrir.wolfssl.com/finding/2704
https://fenrir.wolfssl.com/finding/5476
https://fenrir.wolfssl.com/finding/5458
https://fenrir.wolfssl.com/finding/5464
https://fenrir.wolfssl.com/finding/3110
https://fenrir.wolfssl.com/finding/2705
https://fenrir.wolfssl.com/finding/2001
https://fenrir.wolfssl.com/finding/2709
https://fenrir.wolfssl.com/finding/2298
https://fenrir.wolfssl.com/finding/4219