Skip to content

harden error queue and GMULT cases, add force zero to ColdFire DES port - #12001

Open
JacobBarthelmeh wants to merge 5 commits into
wolfSSL:masterfrom
JacobBarthelmeh:fenrir_4
Open

JacobBarthelmeh wants to merge 5 commits into
wolfSSL:masterfrom
JacobBarthelmeh:fenrir_4

Conversation

@JacobBarthelmeh

Copy link
Copy Markdown
Contributor

No description provided.

@JacobBarthelmeh JacobBarthelmeh self-assigned this Nov 4, 2026
Copilot AI balanced review requested due to automatic review settings November 4, 2026 20:42
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

MemBrowse Memory Report · Explore what changed →

gcc-arm-cortex-m3

  • FLASH: .text +16 B (+0.0%, 132,289 B / 262,144 B, total: 50% used)

gcc-arm-cortex-m4-dtls13

  • FLASH: .text +64 B (+0.0%, 197,344 B / 1,048,576 B, total: 19% used)

gcc-arm-cortex-m4-tls12

  • FLASH: .text +64 B (+0.0%, 133,065 B / 262,144 B, total: 51% used)

zephyr-frdm_rw612

  • FLASH: datas +16 B, log_const_area -8 B, rodata +104 B, text +12,168 B (+4.3%, 294,744 B / 67,108,864 B, total: 0% used)
  • RAM: bss +49 B, datas +16 B (+0.1%, 58,423 B / 983,040 B, total: 6% used)

No memory changes detected for:


Catch memory regressions in CI with MemBrowse. Free for open source.

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

Process-global error snapshots still permit data races and mismatched diagnostics, while new test assertions fail in Windows debug/OpenSSL-extra builds with the error queue disabled.

2 open issues
What changed in this PR

This PR hardens wolfSSL’s error-queue handling and cryptographic internals by addressing stale pointers, removing data-dependent branches, and clearing temporary key material.

Changes:

  • Copy exported error strings, reset queue cursors during cleanup, and add regression tests.
  • Replace conditional XOR operations with masking in GCM and GCM-SIV multiplication paths.
  • Zero temporary key material after ColdFire DES operations.
File Description
wolfcrypt/​src/​logging.c Adds error-string snapshots and resets cursors when clearing queues.
wolfcrypt/​src/​des3.c Clears the ColdFire DES temporary key buffer.
wolfcrypt/​src/​aes.c Uses branchless masking in selected multiplication paths.
tests/​api.c Adds queue-reset and returned-string lifetime checks.

Review effort: Balanced

Comment thread tests/api.c Resolved
Comment thread wolfcrypt/src/logging.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 #12001

Scan targets checked: wolfcrypt-src, wolfcrypt-bugs, wolfssl-bugs
Coverage: 4 of 4 in-scope changed file(s) opened by the reviewer

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: Max

Comment thread wolfcrypt/src/logging.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 #12001

⚠️ An internal error occurred during the automated review. This error has been logged. Please contact the Fenrir team if you need assistance.

Error: TimeoutExpired

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.

3 participants