ML-DSA Composite Signature Support - #1109
Conversation
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #1109
Scan targets checked: wolfssh-bugs, wolfssh-src
Findings: 2
2 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Findings are non-blocking.
9753775 to
b1fec5b
Compare
b1fec5b to
5af710c
Compare
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #1109
Scan targets checked: wolfssh-bugs, wolfssh-src
Findings: 2
2 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Findings are non-blocking.
5af710c to
1050ef1
Compare
1050ef1 to
a1fddf0
Compare
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #1109
Scan targets checked: wolfssh-bugs, wolfssh-src
Findings: 1
1 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Findings are non-blocking.
a1fddf0 to
2137136
Compare
2137136 to
145e2cf
Compare
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #1109
Scan targets checked: wolfssh-bugs, wolfssh-src
Findings: 1
1 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Findings are non-blocking.
145e2cf to
7228798
Compare
7228798 to
47dd078
Compare
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #1109
Scan targets checked: wolfssh-bugs, wolfssh-src
Findings: 2
2 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Findings are non-blocking.
60f2103 to
2f738f0
Compare
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #1109
Scan targets checked: wolfssh-src
Failed targets: wolfssh-bugs
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #1109
Scan targets checked: wolfssh-bugs, wolfssh-src
Findings: 7
7 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Findings are non-blocking.
2f738f0 to
2daad5d
Compare
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #1109
Scan targets checked: wolfssh-bugs, wolfssh-src
Findings: 2
2 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Findings are non-blocking.
2daad5d to
51225eb
Compare
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #1109
Scan targets checked: wolfssh-bugs, wolfssh-src
Findings: 3
3 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Findings are non-blocking.
51225eb to
ec83417
Compare
ec83417 to
c820ef1
Compare
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #1109
Scan targets checked: wolfssh-bugs, wolfssh-src
Findings: 2
2 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Findings are non-blocking.
| word32 idx = 0; | ||
|
|
||
| /* OpenSSH-format only. */ | ||
| ret = GetOpenSshKey(keySig, |
There was a problem hiding this comment.
🔵 [Low] PrepareUserAuthRequestMlDsaComposite leaves keyId set when GetOpenSshKey fails early · Incorrect error handling
When GetOpenSshKey() fails before reaching its composite decoder (bad openssh-key-v1 magic, bad keycount, checkint mismatch), keySig->keyId keeps the composite ID and no sub-key was initialized, so SendUserAuthRequest()'s unconditional wolfSSH_KEY_clean(keySig_ptr) at internal.c:19215 runs wc_MlDsaKey_Free() and ops->free() on never-initialized structs. The sibling PrepareUserAuthRequestMlDsa() sets keySig->keyId = ID_NONE first to avoid exactly this.
Fix: Set keySig->keyId = ID_NONE when GetOpenSshKey() returns an error, matching PrepareUserAuthRequestMlDsa().
| WMEMCPY(out + off, footer, WSTRLEN(footer)); | ||
| off += (word32)WSTRLEN(footer); | ||
| /* NUL-terminate PEM text. */ | ||
| if (outSz > off) { |
There was a problem hiding this comment.
⚪ [Info] NUL-termination guard in wolfSSH_MakeMlDsaCompositeKey can never fail · Dead error handling
The earlier check at keygen.c:581 already rejects outSz < b64Sz + header + footer + 1, so outSz > off is always true here and the buffer can never be left un-terminated; the guard gives a false impression that a short-buffer case is handled at this point.
Fix: Drop the redundant condition and terminate unconditionally, or assert the invariant instead.
Introduced support for ML-DSA composite signatures for hybrid post-quantum authentication.
Added all sig types as auth options into the test echoservers, new CI tests, and interop tested mldsa44-ed25519 wtih openssh-portable.