Repository navigation
Fix EVP Cipher AES-CFB1 byte length - #12275
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the AES-CFB1 length-handling fix.
No open issues 🎉
What changed in this PR
Fixes AES-CFB1 length handling in wolfSSL_EVP_Cipher() by converting byte counts to the bit counts required by wolfCrypt.
Changes:
- Converts input lengths to bits for AES-CFB1 encryption and decryption, rejecting lengths that would overflow.
- Adds known-answer tests for separate and in-place buffers, plus an oversized-input rejection test.
| File | Description |
|---|---|
wolfcrypt/test/test.c |
Adds one-shot AES-CFB1 regression and oversized-input tests. |
wolfcrypt/src/evp.c |
Corrects AES-CFB1 length conversion and guards against overflow. |
Review effort: Balanced
ageprocpp
marked this pull request as ready for review
November 25, 2026 23:45
|
retest this please |
ageprocpp
force-pushed
the
fix/fenrir-19105
branch
from
November 25, 2026 23:48
a4d0f61 to
c80d327
Compare
ageprocpp
marked this pull request as draft
November 25, 2026 23:48
ageprocpp
marked this pull request as ready for review
November 25, 2026 23:48
|
retest this please |
|
ageprocpp
force-pushed
the
fix/fenrir-19105
branch
from
November 26, 2026 01:00
c80d327 to
94c3646
Compare
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #12275
Scan targets checked: wolfcrypt-src, wolfcrypt-bugs
Coverage: 2 of 2 in-scope changed file(s) opened by the reviewer
Fenrir result: Approved ✅
No new issues found in the changed files.
Advisory only — this automated result does not count as a GitHub approval.
Review tier: Max
SparkiDev
approved these changes
Nov 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes Fenrir#19105 and zd#22879
Convert the byte length passed to the AES-CFB1 arm of
wolfSSL_EVP_Cipher()to the bit length expected bywc_AesCfb1Encrypt()andwc_AesCfb1Decrypt(). Reject lengths above the safeword32multiplication limit before processing.Add known-answer coverage for one-shot AES-CFB1 encryption and decryption with separate and in-place buffers, plus the oversized-input boundary.
Testing
Configured a CMake build with
WOLFSSL_OPENSSLEXTRA=yesandWOLFSSL_AESCFB=yes, then ran:All wolfCrypt tests passed.
Checklist