Skip to content

Harden wolfCrypt input validation and zeroization #10264

Open
JeremiahM37 wants to merge 5 commits intowolfSSL:masterfrom
JeremiahM37:fenrir-issues-5
Open

Harden wolfCrypt input validation and zeroization #10264
JeremiahM37 wants to merge 5 commits intowolfSSL:masterfrom
JeremiahM37:fenrir-issues-5

Conversation

@JeremiahM37
Copy link
Copy Markdown
Contributor

Addresses F-3055, F-3056, F-1506, F-1373, F-2206, F-2655, F-1910, F-1912, F-2212, F-3059, F-3060

  • Add NULL parameter validation to wc_HmacInit_Id, wc_LmsKey_ExportPubRaw, wc_CamelliaSetKey, and wc_Compress_ex/wc_DeCompress_ex.
  • wc_AesGcmEncrypt: add NULL checks for iv, in/out (when sz>0), and authTag to match wc_AesGcmDecrypt.
  • wc_AesEaxEncryptFinal/DecryptFinal: reject zero-length auth tag — previously bypassed authentication via ConstantCompare(.., 0).
  • wc_Arc4Free and wc_Des3Free: ForceZero the key schedule before return.
  • wc_hss_next_subtree_inc: ForceZero the stack-resident LMS derived seed before return.
  • wc_rng_bank_init: fall through to cleanup on size error so wolfSSL_RefInit state is released.
  • wc_MakeDsaKey: align tmpQ alloc/free heap hint and dynamic type to prevent static-memory free-list corruption.

@JeremiahM37 JeremiahM37 self-assigned this Apr 20, 2026
Copy link
Copy Markdown

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

Choose a reason for hiding this comment

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

Fenrir Automated Review — PR #10264

Scan targets checked: wolfcrypt-bugs, wolfcrypt-src

No new issues found in the changed files. ✅

@github-actions
Copy link
Copy Markdown

MemBrowse Memory Report

gcc-arm-cortex-m4-baremetal

@JeremiahM37
Copy link
Copy Markdown
Contributor Author

Jenkins retest this please

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