Skip to content

F-13114 adjustment to AES-CBC autosar output length - #11995

Open
JacobBarthelmeh wants to merge 3 commits into
wolfSSL:masterfrom
JacobBarthelmeh:autosar
Open

JacobBarthelmeh wants to merge 3 commits into
wolfSSL:masterfrom
JacobBarthelmeh:autosar

Conversation

@JacobBarthelmeh

Copy link
Copy Markdown
Contributor

F-13114

@JacobBarthelmeh JacobBarthelmeh self-assigned this Nov 4, 2026
Copilot AI balanced review requested due to automatic review settings November 4, 2026 17:45

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.

🟡 Changes recommended

Successful START/FINISH-only calls leave output lengths unchanged despite producing no bytes, risking stale-buffer consumption, and the README contradicts the new length-handling contract.

2 open issues
What changed in this PR

This PR updates wolfCrypt’s AUTOSAR AES-CBC services to treat output length as an input capacity and return the number of bytes produced.

Changes:

  • Validate output buffers and length pointers, rejecting insufficient capacity.
  • Report the output length after successful CBC processing.
  • Update tests to supply buffer capacities and check returned lengths and invalid inputs.
File Description
wolfcrypt/​src/​port/​autosar/​test.c Supplies output capacities and adds length and error assertions.
wolfcrypt/​src/​port/​autosar/​crypto.c Validates CBC output capacity, reports produced length, and updates a CMAC comment.

Review effort: Balanced

Comment thread wolfcrypt/src/port/autosar/crypto.c Resolved
Comment thread wolfcrypt/src/port/autosar/crypto.c Resolved
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fenrir Automated Review — PR #11995

Scan targets checked: wolfcrypt-port-bugs
Not reviewed (no scan target covers them): wolfcrypt/src/port/autosar/README.md
Coverage: 1 of 2 in-scope changed file(s) opened by the reviewer; not opened: wolfcrypt/src/port/autosar/test.c

Findings: 1
1 finding(s) posted as inline comments (see file-level comments below)

This review was generated automatically by Fenrir. Reported findings require changes before merge.

Review tier: Lite

Comment thread wolfcrypt/src/port/autosar/crypto.c Resolved

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fenrir Automated Review — PR #11995

Scan targets checked: wolfcrypt-port-bugs
Not reviewed (no scan target covers them): wolfcrypt/src/port/autosar/README.md
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: Lite

@wolfSSL-Fenrir-bot
wolfSSL-Fenrir-bot dismissed their stale review November 4, 2026 23:19

Fenrir's latest completed scan found no issues; clearing the prior automated change request.

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