Repository navigation
ML-DSA Smallmem Fixes - #11416
ML-DSA Smallmem Fixes#11416
Conversation
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #11416
Scan targets checked: wolfcrypt-src, wolfcrypt-bugs
Fenrir result: Approved ✅
No new issues found in the changed files.
Advisory only — this automated result does not count as a GitHub approval.
3476e10 to
3671eef
Compare
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #11416
Scan targets checked: wolfcrypt-src, wolfcrypt-bugs
Fenrir result: Approved ✅
No new issues found in the changed files.
Advisory only — this automated result does not count as a GitHub approval.
3671eef to
cfdc3d3
Compare
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #11416
Scan targets checked: wolfcrypt-src, wolfcrypt-bugs, wolfssl-src, wolfssl-bugs
Coverage: 2 of 3 in-scope changed file(s) opened by the reviewer; not opened: wolfssl/wolfcrypt/wc_mldsa.h
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
cfdc3d3 to
0317546
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Failed key regeneration can leave a partially overwritten key marked usable with stale caches.
Review effort: Balanced
Findings: 1
What changed in this PR
Fixes ML-DSA small-memory alignment, inverse-NTT overflow, error propagation, and stale-cache regressions.
Changes:
- Reorders scratch buffers and reduces coefficients before inverse NTT.
- Adds fault injection and key-regeneration tests.
- Expands small-memory CI/UBSan coverage.
| File | Description |
|---|---|
wolfssl/wolfcrypt/wc_mldsa.h |
Declares the rejection-sampling test hook. |
wolfcrypt/src/wc_mldsa.c |
Implements small-memory fixes and test instrumentation. |
tests/api/test_mldsa.h |
Registers new ML-DSA tests. |
tests/api/test_mldsa.c |
Tests regeneration, caches, and injected failures. |
.wolfssl_known_macro_extras |
Registers new test macros. |
.github/workflows/smallStackSize.yml |
Adds small-memory stack configurations. |
.github/configs/pq-all.json |
Adds UBSan configurations across memory layouts. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #11416
Scan targets checked: wolfcrypt-src, wolfcrypt-bugs, wolfssl-src, wolfssl-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: Lite
ad39838 to
7110ccd
Compare
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Cryptographic arithmetic and numerous compile-time memory configurations warrant final human validation despite strong regression coverage.
Review effort: Balanced
Findings: None
Resolved since last review (1)
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #11416
Scan targets checked: wolfcrypt-src, wolfcrypt-bugs, wolfssl-src, wolfssl-bugs
Coverage: 1 of 2 in-scope changed file(s) opened by the reviewer; not opened: tests/api/test_mldsa.c
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
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #11416
Scan targets checked: wolfcrypt-src, wolfcrypt-bugs, wolfssl-src, wolfssl-bugs
Coverage: 2 of 2 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: Lite
acb8c44 to
a616394
Compare
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #11416
Scan targets checked: wolfssl-src, wolfssl-bugs
Unchanged since last review (not re-run): wolfcrypt-src, wolfcrypt-bugs
Coverage: 1 of 1 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
Fenrir's latest completed scan found no issues; clearing the prior automated change request.
a616394 to
b2f7047
Compare
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #11416
Scan targets checked: wolfcrypt-src, wolfcrypt-bugs, wolfssl-src, wolfssl-bugs
Coverage: 1 of 3 in-scope changed file(s) opened by the reviewer; not opened: tests/api/test_mldsa.c, wolfssl/wolfcrypt/wc_mldsa.h
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
|
jenkins retest this please |



Description
Fixed runtime and math errors in ML-DSA when built with smallmem settings. Reordered scratch buffer allocations so that 32 and 64 bit integer arrays are aligned correctly and prevented 32 bit integer overflows before the NTT. Added a CI to prevent regressions.
Checklist