Skip to content

Fix AES and OAEP parameter checks and output lengths - #238

Open
aidangarske wants to merge 127 commits into
wolfSSL:masterfrom
aidangarske:fenrir-fixes-10377-10393
Open

aidangarske wants to merge 127 commits into
wolfSSL:masterfrom
aidangarske:fenrir-fixes-10377-10393

Conversation

@aidangarske

@aidangarske aidangarske commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

F-10377 - ec18cbe - C_EncryptFinal for AES-CBC-PAD now sets *pulLastEncryptedPartLen after a successful final block.

F-10393 - 65ebde2 - WP11_Session_SetOaepParams now returns CKR_MECHANISM_PARAM_INVALID for a NULL label with a non-zero length.

F-11513 - 7cd84ca - The AES-CCM nonce length is now limited to 7 through 13 bytes.

F-3143 - 17adc77 - The AES-CTR arm of C_Decrypt now checks the output buffer pointer for the size query instead of the input pointer.

F-2378 - 153270c - Single-part C_Encrypt and C_Decrypt for AES-CBC and AES-ECB now return CKR_DATA_LEN_RANGE or CKR_ENCRYPTED_DATA_LEN_RANGE for data that is not block aligned, and end the operation.

F-12459 - 3e37277 - GetEcbCheckValue now encrypts a single stack zero block instead of key-length heap bytes, and zeroizes the result.

F-4963 - ffeca7c - AES-GCM encrypt and decrypt init now reject an IV or AAD length above INT_MAX and a tag size above 128 bits, and WP11_Session_SetGcmParams rejects negative values.

F-4959 - 6a72c9e - AES-CCM encrypt and decrypt init now reject any length field above INT_MAX, and WP11_Session_SetCcmParams requires an even MAC size from 4 to 16 and non-negative data and AAD sizes.

F-4735 - 222c6dc - OAEP encrypt and decrypt init now reject a source data length above INT_MAX, and the setter rejects a negative label size.

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

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-10377-10393 branch 2 times, most recently from 3bec609 to 222c6dc Compare October 9, 2026 02:00
@aidangarske
aidangarske force-pushed the fenrir-fixes-10377-10393 branch from 222c6dc to 51df5b3 Compare October 10, 2026 03:20
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.

2 participants