Public Security Advisories
Coordinated vulnerability disclosures from Argus. Findings, impact, and remediation, published in good faith.
In --enable-c89 builds the OpenSSL-compatibility X.509 printer formats a certificate's subjectAltName strings into an 80-byte stack buffer with a macro that discards the size, so a long alt name from a peer certificate overflows the stack when the certificate is printed.
wolfSSL_ASN1_STRING_print replaces control bytes with dots but leaves carriage return and line feed as they are. wolfSSL_GENERAL_NAME_print uses it for the email, DNS and URI names of a certificate, so a subject alternative name containing CR or LF adds lines of the certificate author's choosing to the printed output.
The text dump of an X.509 attribute certificate prints the directory names of the holder and the issuer by copying their attribute values to the output unchanged. An attribute certificate whose holder or issuer name contains CR or LF adds lines of its author's choosing to the dump. Only builds with attribute certificate support and applications that print untrusted attribute certificates are affected.
The certificate text dump in wolfSSL's OpenSSL compatibility layer writes subject and issuer name values to the output without escaping control characters. A certificate whose name contains CR or LF adds lines of the sender's choosing to the printed text. Applications that print peer certificates into logs or other line-based output are affected.
In WOLF_C89 builds the certificate printer formats each extension's OID text and criticality into an 80-byte stack buffer with an unbounded sprintf and checks the length afterwards. A critical extension with long numeric OID text writes up to six bytes past the buffer. The parser rejects unrecognised critical extensions, so only builds that accept certain critical extensions without naming them are exposed.
In WOLF_C89 builds the certificate printer appends each serial number byte to an 80-byte stack buffer with an unbounded sprintf and checks the remaining space afterwards. Printing a certificate whose serial number is 23 to 32 bytes long writes three bytes past the buffer before the function returns an error.
wolfSSL_ASN1_STRING_print replaces unprintable bytes with dots inside the string object it was asked to print, then writes that buffer out. Printing a certificate name therefore changes the name. Every later use of the same object, including comparisons and further prints, sees the altered bytes, and the certificate author chooses which positions change.
wolfSSL_ASN1_STRING_print_ex accepts the ASN1_STRFLGS_ESC_CTRL and ASN1_STRFLGS_ESC_MSB flags but never tests them. With any flag combination other than a hex dump, CR, LF and other control bytes of the string are written to the output unchanged, so an application that relies on these flags to print certificate strings safely gets no escaping.
// No embargoed advisories.