CVE-2024-6197

freeing stack buffer in utf8asn1str

Published Jul 24, 2024 CVSS 3.1 · 7.5 High EPSS 4.3% KEV · Not listed
Description
libcurl's ASN1 parser has this utf8asn1str() function used for parsing an ASN.1 UTF-8 string. Itcan detect an invalid field and return error. Unfortunately, when doing so it also invokes `free()` on a 4 byte localstack buffer. Most modern malloc implementations detect this error and immediately abort. Some however accept the input pointer and add that memory to its list of available chunks. This leads to the overwriting of nearby stack memory. The content of the overwrite is decided by the `free()` implementation; likely to be memory pointers and a set of flags. The most likely outcome of exploting this flaw is a crash, although it cannot be ruled out that more serious results can be had in special circumstances.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2024-47336 libcurl's ASN1 parser has this utf8asn1str() function used for parsing an ASN.1 UTF-8 string. Itcan detect an invalid field and return error. Unfortunately, when doing so it also invokes `free()` on a 4 byte localstack buffer. Most modern malloc implementations detect this error and immediately abort. Some however accept the input pointer and add that memory to its list of available chunks. This leads to the overwriting of nearby stack memory. The content of the overwrite is decided by the `free()` implementation; likely to be memory pointers and a set of flags. The most likely outcome of exploting this flaw is a crash, although it cannot be ruled out that more serious results can be had in special circumstances.
History
Type Values Removed Values Added
Metrics epss

{'score': 0.03371}

epss

{'score': 0.0301}

Type Values Removed Values Added
First Time appeared Curl
Curl curl
CPEs cpe:2.3:a:curl:curl:*:*:*:*:*:*:*:*
Vendors & Products Curl
Curl curl
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Haxx
Haxx libcurl
Weaknesses NVD-CWE-Other
CPEs cpe:2.3:a:haxx:libcurl:*:*:*:*:*:*:*:*
Vendors & Products Haxx
Haxx libcurl
Weaknesses

Sources

Status
PUBLISHED
Assigner
curl
Published
Updated
Feb 13, 2025, 5:54 PM
Reserved
Jun 20, 2024, 7:20 AM
Status
Modified
Published
Jul 24, 2024, 8:15 AM
Modified
Jun 17, 2026, 8:17 AM
Severity
Moderate
Public date
Jul 24, 2024, 12:00 AM