Repository navigation
Fix out-of-bounds read printing CRL authority key id - #12175
Conversation
|
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #12175
Scan targets checked: wolfcrypt-src, wolfcrypt-bugs, wolfssl-src, wolfssl-bugs
Not reviewed (no scan target covers them): certs/crl/gencrls.sh, certs/crl/include.am
Coverage: 6 of 6 in-scope changed file(s) opened by the reviewer
Findings: 4
4 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
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #12175
Scan targets checked: wolfcrypt-src, wolfcrypt-bugs, wolfssl-src, wolfssl-bugs
Not reviewed (no scan target covers them): certs/crl/gencrls.sh, certs/crl/include.am
Coverage: 3 of 3 in-scope changed file(s) opened by the reviewer
No new issues found in the changed files.
💬 3 finding(s) from an earlier review are still open and were not re-posted:
- New 4-argument ParseCRL_AuthKeyIdExt declaration conflicts with the 3-argument definition in asn_orig.c, breaking the WOLFSSL_ASN_ORIGINAL build —
wolfcrypt/src/asn.c:4740 - Raw AKID fields only populated by template parser; legacy ASN build no longer compiles —
wolfssl/wolfcrypt/asn.h:3358 - Test fixture akid_zero_octets.pem referenced but not present in the tree —
tests/api.c:35103
This review was generated automatically by Fenrir. Reported findings require changes before merge.
Review tier: Lite
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #12175
Scan targets checked: none
Unchanged since last review (not re-run): wolfcrypt-src, wolfcrypt-bugs, wolfssl-src, wolfssl-bugs
Not reviewed (no scan target covers them): certs/crl/extra-crls/akid_zero_octets.pem, certs/crl/gencrls.sh, certs/crl/include.am
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.
Description
X509CRLPrintExtensions() bounded the authority key identifier hex dump with XSTRLEN() on the binary extAuthKeyId array. When none of the KEYID_SIZE octets were zero, the loop read past the end of the array. A zero octet truncated the output, and a zero first octet dropped the extension from the output entirely.
extAuthKeyId is also a normalized CA lookup key. It is hashed, or zero padded in SM2/SM3 builds, when the encoded id is not KEYID_SIZE octets, so it does not match the identifier in the CRL either way.
Fixes zd22862
Credit
Thanks to @parthod0x for reporting this issue and confirming the fix.
Testing
Checklist