Skip to content

Zeroize transient MAC, AES and RNG buffers - #242

Merged
Frauschi merged 201 commits into
wolfSSL:masterfrom
aidangarske:fenrir-fixes-2391-2392
Oct 15, 2026
Merged

Frauschi merged 201 commits into
wolfSSL:masterfrom
aidangarske:fenrir-fixes-2391-2392

Conversation

@aidangarske

@aidangarske aidangarske commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

F-8661 - 9690551 - Rng_New now zeroizes its DRBG seed buffer with wc_ForceZero on both return paths.

F-2393 - 8c54315 - The buffered AES-CBC partial block is now zeroized in the CBC and CBC-PAD finals and in wp11_Session_Final.

F-6494 - f5804d5 - WP11_AesGcm_EncryptFinal now zeroizes the buffered plaintext before freeing it, and wp11_AesGcm_BufferAppend grows by allocate, copy, zeroize, free instead of realloc.

F-2391 - 304a290 - WP11_Hmac_Verify and WP11_Hmac_VerifyFinal now zeroize the computed HMAC with wc_ForceZero after comparing.

F-2392 - 2e86a1f - WP11_Aes_Cmac_Verify and WP11_Aes_Cmac_Verify_Final now zeroize the computed CMAC tag with wc_ForceZero after comparing.

F-2394 - 355c5ef - WP11_TLS_MAC_verify now zeroizes the computed TLS MAC with wc_ForceZero before freeing it.

@aidangarske aidangarske self-assigned this Oct 8, 2026
Copilot AI balanced review requested due to automatic review settings October 8, 2026 22:11

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@aidangarske
aidangarske force-pushed the fenrir-fixes-2391-2392 branch 2 times, most recently from c3bee70 to 355c5ef Compare October 9, 2026 02:00
@aidangarske aidangarske changed the title Zeroize transient MAC, AES, and RNG buffers Zeroize transient MAC, AES and RNG buffers Oct 9, 2026
@aidangarske
aidangarske force-pushed the fenrir-fixes-2391-2392 branch from 355c5ef to 39ffb0d Compare October 10, 2026 03:20

@Frauschi Frauschi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Two comments, inline.

Comment thread src/internal.c
Comment thread tests/secret_scrub_test.c
@aidangarske
aidangarske force-pushed the fenrir-fixes-2391-2392 branch from 39ffb0d to 620bb0c Compare October 13, 2026 22:19
@aidangarske
aidangarske requested a review from Frauschi October 13, 2026 22:24
@aidangarske
aidangarske force-pushed the fenrir-fixes-2391-2392 branch 4 times, most recently from 44afd57 to 8268dc3 Compare October 13, 2026 23:46
Frauschi
Frauschi previously approved these changes Oct 14, 2026

@Frauschi Frauschi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks. You're right about cbc.final, it's inline in session->params and wp11_Session_FreeOp zeroes that, so my comment was wrong. The allocator guard fix looks good.

Frauschi
Frauschi previously approved these changes Oct 15, 2026
@aidangarske
aidangarske dismissed Frauschi’s stale review October 15, 2026 20:36

The merge-base changed after approval.

@aidangarske
aidangarske force-pushed the fenrir-fixes-2391-2392 branch from 2e3227e to a54ffaa Compare October 15, 2026 21:03
Frauschi added a commit that referenced this pull request Oct 15, 2026
Tighten unwrap, key pair generation and encapsulation checks.

This also contains the commits of #228 to #242.
@Frauschi
Frauschi merged commit a54ffaa into wolfSSL:master Oct 15, 2026
91 checks passed
@aidangarske
aidangarske deleted the fenrir-fixes-2391-2392 branch October 15, 2026 21:40
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