Skip to content
OpenAdvisories
High · 7.5 CVE-2024-6197 EUVD-2024-47336GHSA-x3h8-3mf2-v794

freeing stack buffer in utf8asn1str

Published Jul 24, 2024 · Updated Feb 13, 2025 · Assigned by curl

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.

Affected products

VendorProductAffectedFixed
curl curl 8.8.0 – ≤ 8.8.0, 8.7.1 – ≤ 8.7.1, 8.7.0 – ≤ 8.7.0, 8.6.0 – ≤ 8.6.0 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 curl 8.9.0-1 —
Debian 13 curl 8.9.0-1 —
ReleasePackageFixed inAdvisory
SLES 15 SP6 curl 8.6.0-150600.4.3.1 SUSE-SU-2024:2784-1
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLE Micro 6.0 curl 8.6.0-3.1 SUSE-SU-2025:20029-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed curl 8.9.0-1.1 openSUSE-SU-2024:14225-1
openSUSE Leap 15.6 curl 8.6.0-150600.4.3.1 SUSE-SU-2024:2784-1
ReleasePackageFixed inAdvisory
Alpine v3.24 curl 8.9.0-r0 —
Alpine v3.23 curl 8.9.0-r0 —
Alpine v3.22 curl 8.9.0-r0 —
Alpine v3.21 curl 8.9.0-r0 —
Alpine v3.20 curl 8.9.0-r0 —
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Alpine v3.19 curl 8.9.0-r0 —
Alpine v3.18 curl 8.9.0-r0 —
Alpine v3.17 curl 8.9.0-r0 —

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 cmake 3.30.3-2 —
Azure Linux 3 curl 8.8.0-2 —
Azure Linux 2 (CBL-Mariner) curl 8.8.0-2 —

Advisories 10

References