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.
On WOLF_C89 builds, XSNPRINTF expands to sprintf and ignores its size argument. X509PrintReqAttributes formats each CSR attribute value into an 80-byte stack buffer through that macro, so printing a request with a long attribute value writes past the buffer.
On WOLF_C89 builds, XSNPRINTF expands to sprintf and ignores its size argument. wolfSSL_X509V3_EXT_print formats the hex form of an Authority or Subject Key Identifier extension into a 129-byte stack buffer through that macro, so printing a certificate with a long key identifier writes past the buffer.
In WOLF_C89 builds the XSNPRINTF macro expands to sprintf and discards its size argument. Callers across the library format untrusted data into fixed buffers and rely on that size, or on a length check made after the write, so certificate fields can overflow stack and structure buffers. Master has bounded the known call sites but keeps the mapping.
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.
wolfSSL_GENERAL_NAME_print prints a directoryName alternative name with the XN_FLAG_ONELINE flag set, which in wolfSSL did not include control-character escaping. Attribute values of the directory name are written to the output byte for byte, so a value containing CR or LF adds lines chosen by the certificate author to the printed text.
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.
wolfSSL_X509_CRL_print writes the CRL issuer name to the output without escaping control characters. A CRL whose issuer contains CR or LF adds lines of its author's choosing to the printed text. The CRL does not need a valid signature to be loaded and printed. Applications that print CRLs from untrusted sources into line-based output are affected.
The certificate text dump in wolfSSL's OpenSSL compatibility layer prints dNSName, rfc822Name and URI subject alternative names with a plain string format and no escaping. An entry that contains CR or LF adds lines of the certificate author's choosing to the printed text. Each entry is limited to under 80 bytes. Applications that print peer certificates into line-based output are affected.
When the certificate text dump in wolfSSL's OpenSSL compatibility layer prints a directoryName subject alternative name, it copies the country, organization, unit and common name values into the output byte for byte. A value that contains CR or LF adds lines of the certificate author's choosing to the printed text. The whole entry is limited to under 80 bytes.
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.
wolfSSL_X509_VERIFY_PARAM_inherit copies the host-matching flags only inside the branch that copies the host name. When the source parameter carries flags such as the no-wildcards flag but no host name, the flags are dropped without an error, and store-side host name verification then accepts wildcard certificate names the application asked to reject.
In WOLF_C89 builds DecodePolicyOID converts each OID arc to text with an unbounded sprintf and checks the length afterwards. A certificate whose certificatePolicies OID is longer than the 200-byte destination writes up to 11 bytes past it inside the decoded certificate structure while the certificate is parsed, before the certificate is rejected.
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_X509_NAME_oneline returns the one-line form of a certificate subject or issuer exactly as the parser assembled it, with attribute values copied in byte for byte. A value containing CR or LF puts line breaks into the returned string, and a NUL byte in a value cuts the string short. Applications that log the string can be made to write forged or misleading entries.
wolfSSL_X509_get_name_oneline renders a certificate name as "type=value" pairs joined with ", " and copies each value unescaped. A certificate whose field value contains a comma, an equals sign, a NUL or CR/LF produces output with fields, a truncation point or lines that the certificate's author chose.
wolfSSL builds the one-line form of a certificate name by joining fields with "/" and "=" and copies each value from the certificate unescaped. wolfSSL_X509_NAME_oneline returns that string as it is, so a value containing "/", "=" or a NUL makes the name show fields that are not in the certificate or end early.
The wolfSSL certificate print functions render subjectAltName entries as one list separated by ", " and copy each value unescaped. A certificate with a SAN value that contains ", DNS:" or CR/LF is printed with entries or lines that are not in the certificate.
// No embargoed advisories.