Skip to content

Added more argument check in wc_PBKDF1_ex() - #12059

Merged
JacobBarthelmeh merged 1 commit into
wolfSSL:masterfrom
ohki-saito:fix/F11150
Nov 9, 2026
Merged

JacobBarthelmeh merged 1 commit into
wolfSSL:masterfrom
ohki-saito:fix/F11150

Conversation

@ohki-saito

Copy link
Copy Markdown
Contributor

Description

Fix F-11150. wc_PBKDF1_ex() now rejects a NULL salt with a non-zero saltLen, matching wc_PBKDF2_ex().

Testing

Added NULL salt cases to test_wc_PBKDF1DecisionCoverage.

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

Copilot AI balanced review requested due to automatic review settings November 9, 2026 02:54
@ohki-saito
ohki-saito marked this pull request as ready for review November 9, 2026 02:55
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

retest this please

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.

🟢 Approval recommended

No active review issues remain for the PBKDF1 salt-validation update.

No open issues 🎉

What changed in this PR

This PR addresses F-11150 by aligning wc_PBKDF1_ex() salt argument validation with wc_PBKDF2_ex().

Changes:

  • Return BAD_FUNC_ARG when salt is NULL and saltLen is positive.
  • Add tests for rejecting a NULL salt with a positive length and accepting it with zero length.
File Description
wolfcrypt/​src/​pwdbased.c Adds the NULL salt and positive-length argument check.
tests/​api/​test_pwdbased.c Tests rejected and permitted NULL salt inputs.

Review effort: Balanced

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

@JacobBarthelmeh
JacobBarthelmeh merged commit 07bfa05 into wolfSSL:master Nov 9, 2026
631 of 643 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.

5 participants