Skip to content

evp: check ivLen in wolfSSL_EVP_CIPHER_CTX_set_iv_length.#9943

Merged
JacobBarthelmeh merged 1 commit intowolfSSL:masterfrom
philljj:fix_evp_set_iv_length
Mar 12, 2026
Merged

evp: check ivLen in wolfSSL_EVP_CIPHER_CTX_set_iv_length.#9943
JacobBarthelmeh merged 1 commit intowolfSSL:masterfrom
philljj:fix_evp_set_iv_length

Conversation

@philljj
Copy link
Copy Markdown
Contributor

@philljj philljj commented Mar 10, 2026

Description

Check input ivLen in wolfSSL_EVP_CIPHER_CTX_set_iv_length.

Fixes zd#21326.

@philljj philljj self-assigned this Mar 10, 2026
Copilot AI review requested due to automatic review settings March 10, 2026 20:30
Copy link
Copy Markdown
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 validation for ivLen in wolfSSL_EVP_CIPHER_CTX_set_iv_length to prevent invalid IV size assignments (Fixes zd#21326).

Changes:

  • Return WOLFSSL_FAILURE when ctx is NULL
  • Reject negative ivLen values
  • Reject ivLen values larger than the ctx->iv buffer

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

@philljj
Copy link
Copy Markdown
Contributor Author

philljj commented Mar 11, 2026

Retest this please

@philljj philljj assigned wolfSSL-Bot and unassigned philljj Mar 11, 2026
@JacobBarthelmeh JacobBarthelmeh merged commit 80ba723 into wolfSSL:master Mar 12, 2026
456 checks passed
@philljj philljj deleted the fix_evp_set_iv_length branch March 15, 2026 09:32
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.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants