Skip to content

Fix size in forceZero#692

Merged
LinuxJedi merged 1 commit intowolfSSL:masterfrom
danielinux:fix-tpm-forcezero
Feb 24, 2026
Merged

Fix size in forceZero#692
LinuxJedi merged 1 commit intowolfSSL:masterfrom
danielinux:fix-tpm-forcezero

Conversation

@danielinux
Copy link
Member

fix wrong sizeof

Fenrir issue M-32

Copy link
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 PR fixes a critical security bug in the wolfBoot_unlock_disk function where sensitive cryptographic data was not being properly cleared from memory. The bug used sizeof(secretSz) (size of an int variable) instead of sizeof(secret) (size of the buffer array) in a call to TPM2_ForceZero, resulting in only 4 bytes being zeroed instead of the entire secret buffer.

Changes:

  • Fixed incorrect sizeof argument in TPM2_ForceZero call to properly zero the entire secret buffer instead of just the first 4 bytes

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

@LinuxJedi LinuxJedi merged commit f13dbc0 into wolfSSL:master Feb 24, 2026
315 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.

3 participants