Skip to content

hmac: add missing ForceZero for tmp, prk.#9890

Open
philljj wants to merge 1 commit intowolfSSL:masterfrom
philljj:fix_f_hmac
Open

hmac: add missing ForceZero for tmp, prk.#9890
philljj wants to merge 1 commit intowolfSSL:masterfrom
philljj:fix_f_hmac

Conversation

@philljj
Copy link
Contributor

@philljj philljj commented Mar 5, 2026

Description

hmac: add missing ForceZero for tmp, prk.

Fixes F-384, F-385.

@philljj philljj self-assigned this Mar 5, 2026
Copilot AI review requested due to automatic review settings March 5, 2026 20:29
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

Adds explicit zeroization for temporary HKDF/HMAC buffers to reduce the chance of sensitive material remaining in memory.

Changes:

  • Zeroize tmp before freeing HMAC state in wolfSSL_GetHmacMaxSize.
  • Refactor HKDF wrapper flow to call Expand only on successful Extract and always zeroize prk before returning.

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

@philljj philljj added the For This Release Release version 5.9.0 label Mar 6, 2026
@philljj
Copy link
Contributor Author

philljj commented Mar 6, 2026

Retest this please.

1 similar comment
@philljj
Copy link
Contributor Author

philljj commented Mar 7, 2026

Retest this please.

@philljj philljj assigned wolfSSL-Bot and unassigned philljj Mar 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For This Release Release version 5.9.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants