Skip to content

Fenrir-fixes#439

Open
jackctj117 wants to merge 7 commits into
mainfrom
Fenrir
Open

Fenrir-fixes#439
jackctj117 wants to merge 7 commits into
mainfrom
Fenrir

Conversation

@jackctj117

@jackctj117 jackctj117 commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

@jackctj117 jackctj117 self-assigned this Jul 9, 2026
Copilot AI review requested due to automatic review settings July 9, 2026 19:29
@jackctj117
jackctj117 marked this pull request as draft July 9, 2026 19:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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_NONE objects 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.

Comment thread port/posix/posix_transport_shm.c
Comment thread port/posix/posix_transport_shm.c Outdated
Comment thread test/wh_test_auth.c Outdated
Comment thread test/wh_test_auth.c Outdated
Comment thread src/wh_auth_base.c Outdated
@jackctj117
jackctj117 marked this pull request as ready for review July 9, 2026 19:44
@jackctj117
jackctj117 force-pushed the Fenrir branch 2 times, most recently from 716ddb2 to 986282c Compare July 9, 2026 20:52
@jackctj117
jackctj117 requested review from bigbrett and billphipps July 9, 2026 21:40
@jackctj117 jackctj117 changed the title Fenrir Fenrir-fixes Jul 15, 2026

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fenrir Automated Review — PR #439

Scan targets checked: wolfhsm-core-bugs, wolfhsm-crypto-bugs, wolfhsm-src

No new issues found in the changed files. ✅

(cherry picked from commit de8fb0c)
(cherry picked from commit 3c9423a)
(cherry picked from commit 94d53b1)
(cherry picked from commit 2350298)
(cherry picked from commit 986282c)
(cherry picked from commit 1b9249e)
(cherry picked from commit c5331c1)
(cherry picked from commit 28d129c)
(cherry picked from commit 2437b46)
(cherry picked from commit 009da49)
(cherry picked from commit 4d53ecc)
(cherry picked from commit 3c60f58)
(cherry picked from commit 85fcde5)
(cherry picked from commit 72a44a6)
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