CVE-2024-5991
JSON

10.0critical

Buffer overread in domain name matching

Severity
10.0critical CVSS:4.0 by wolfSSL
Exploit likelihood
0.56% (higher than 48% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
wolfSSL

Description

In function MatchDomainName(), input param str is treated as a NULL terminated string despite being user provided and unchecked. Specifically, the function X509_check_host() takes in a pointer and length to check against, with no requirements that it be NULL terminated. If a caller was attempting to do a name check on a non-NULL terminated buffer, the code would read beyond the bounds of the input array until it found a NULL terminator.This issue affects wolfSSL: through 5.7.0.

Affected

Product or packageVersionsReported by
wolfSSL wolfSSLup to 5.7.0CVE List, NVD

All scores

wolfSSL10.0critical CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-125

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total.

What each source says

CVE List

In function MatchDomainName(), input param str is treated as a NULL terminated string despite being user provided and unchecked. Specifically, the function X509_check_host() takes in a pointer and length to check against, with no requirements that it be NULL terminated. If a caller was attempting to do a name check on a non-NULL terminated buffer, the code would read beyond the bounds of the input array until it found a NULL terminator.This issue affects wolfSSL: through 5.7.0.

NVD (es)

En la función MatchDomainName(), el parámetro de entrada str se trata como una cadena terminada en NULL a pesar de haber sido proporcionado por el usuario y no estar marcado. Específicamente, la función X509_check_host() toma un puntero y una longitud para verificar, sin requisitos de que termine en NULL. Si una persona que llama intentaba realizar una verificación de nombre en un búfer terminado en NULL, el código se leía más allá de los límites de la matriz de entrada hasta encontrar un terminador NULL. Este problema afecta a wolfSSL: hasta 5.7.0.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-5991 changed 2024-08-27CVE Terms of Use
NVDCVE-2024-5991 changed 2026-06-17Public domain