Skip to content

Bug Fixes: issues discovered during MC/DC coverage step 4 - #10973

Merged
SparkiDev merged 4 commits into
wolfSSL:masterfrom
danielinux:fixes-mcdc-step4
Jul 31, 2026
Merged

Bug Fixes: issues discovered during MC/DC coverage step 4#10973
SparkiDev merged 4 commits into
wolfSSL:masterfrom
danielinux:fixes-mcdc-step4

Conversation

@danielinux

Copy link
Copy Markdown
Member

Description

3x wolfcrypt bugfixes.

Testing

#10967

Checklist

  • added tests

@danielinux danielinux self-assigned this Jul 22, 2026
@philljj

philljj commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Retest this please.

(not clear what failed).

@philljj
philljj self-requested a review July 22, 2026 19:43
@philljj

philljj commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Retest this please.

windows test:

[0] Incorrect return -308
test_crl_monitor failed on iteration 0

@philljj philljj assigned wolfSSL-Bot and unassigned danielinux Jul 22, 2026
Frauschi
Frauschi previously approved these changes Jul 23, 2026

@Frauschi Frauschi 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.

LGTM

Comment thread wolfcrypt/src/rsa.c Outdated
Return early when inSz == 0, mirroring the other Ascon Update functions.
Initialize the mp_int temporaries as soon as they are allocated in
wc_CompareDiffPQ(), _CheckProbablePrime() and wc_CheckProbablePrime_ex(),
so the cleanup path handles them consistently in all cases.
Return 0 when all used digits are zero instead of scanning past them.
…stead

Restore the original short-circuit XMALLOC chains and leave the zeroing to
mp_init_multi(). On a partial allocation failure mp_init_multi() is skipped,
so nothing is initialized: free whatever was allocated right there and NULL
the pointers, so the shared cleanup at the end of the function never calls
mp_clear()/mp_forcezero() on an allocated-but-uninitialized mp_int.

No extra mp_init() calls, no XMEMSET, and the returned error codes are
unchanged.
@danielinux

Copy link
Copy Markdown
Member Author

jenkins retest this please

@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 #10973

Scan targets checked: wolfcrypt-bugs, wolfcrypt-src

No new issues found in the changed files. ✅

@SparkiDev
SparkiDev merged commit c99dafc into wolfSSL:master Jul 31, 2026
362 of 363 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For This Release Release version 5.9.2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants