Skip to content

Fix fenrir wolfTPM findings (3)#470

Merged
dgarske merged 3 commits intowolfSSL:masterfrom
aidangarske:fix-fenrir-wolftpm-3
Mar 17, 2026
Merged

Fix fenrir wolfTPM findings (3)#470
dgarske merged 3 commits intowolfSSL:masterfrom
aidangarske:fix-fenrir-wolftpm-3

Conversation

@aidangarske
Copy link
Copy Markdown
Member

Description

Fix Fenrir findings #342, #536, #537, #538, #541, #542, #543, #544, #545, #546, #547, #878, #879, #880, #883, #884, #885, #886

…#544, #545, #546, #547, #878, #879, #880, #883, #884, #885, #886
@aidangarske aidangarske self-assigned this Mar 16, 2026
Copilot AI review requested due to automatic review settings March 16, 2026 19:59
Copy link
Copy Markdown

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

Addresses multiple Fenrir wolfTPM findings by tightening bounds checks, improving input validation, and zeroizing sensitive structures after use.

Changes:

  • Add size/NULL validation to prevent buffer overreads/overwrites (key blob parsing, session index checks, NVReadCert, RNG output size validation).
  • Add explicit zeroization of sensitive intermediates (RSA/ECC private material, sensitive structs, command inputs).
  • Adjust SwTPM send-command return-code initialization.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.

File Description
src/tpm2_wrap.c Adds bounds checks, session index validation, and sensitive memory zeroization in multiple key/crypto paths.
src/tpm2_swtpm.c Changes default return code initialization in SWTPM command send path.
src/tpm2.c Tightens RNG nonce-output size validation to prevent invalid lengths.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/tpm2_wrap.c Outdated
Comment thread src/tpm2_wrap.c
Comment thread src/tpm2_wrap.c
Comment thread src/tpm2_wrap.c
Comment thread src/tpm2_wrap.c
Comment thread src/tpm2.c Outdated
Comment thread src/tpm2_swtpm.c
@aidangarske aidangarske marked this pull request as ready for review March 16, 2026 22:17
@aidangarske aidangarske requested a review from dgarske March 16, 2026 22:17
Comment thread src/tpm2_wrap.c Outdated
Comment thread src/tpm2_wrap.c Outdated
Comment thread src/tpm2_wrap.c Outdated
@dgarske dgarske assigned aidangarske and unassigned dgarske Mar 16, 2026
@aidangarske aidangarske requested a review from dgarske March 16, 2026 22:35
@dgarske dgarske merged commit 4ac37ce into wolfSSL:master Mar 17, 2026
71 checks passed
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.

4 participants