Skip to content

CVE-2024-6197 freeing stack buffer in utf8asn1str

HighCVSS 7.5 EPSS 4.3%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: yes · technical impact: partial
Technology
Debian

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.

Upgrade path

12 packages: 12 fixed.

PackageAffectedFixed inStatus
alpine/curl(Alpine v3.17) < 8.9.0-r0 8.9.0-r0 Fixed
alpine/curl(Alpine v3.18) < 8.9.0-r0 8.9.0-r0 Fixed
alpine/curl(Alpine v3.19) < 8.9.0-r0 8.9.0-r0 Fixed
alpine/curl(Alpine v3.20) < 8.9.0-r0 8.9.0-r0 Fixed
alpine/curl(Alpine v3.21) < 8.9.0-r0 8.9.0-r0 Fixed
alpine/curl(Alpine v3.22) < 8.9.0-r0 8.9.0-r0 Fixed
alpine/curl(Alpine v3.23) < 8.9.0-r0 8.9.0-r0 Fixed
alpine/curl(Alpine v3.24) < 8.9.0-r0 8.9.0-r0 Fixed
curl >= 8.6.0, <= 8.6.0; >= 8.6.0, <= 8.8.0; >= 8.7.0, <= 8.7.0; >= 8.7.1, <= 8.7.1 +1 more after 8.6.0, 8.7.0, 8.7.1, 8.8.0 Fixed
debian/curl(Debian 13) < 8.9.0-1 8.9.0-1 Fixed
debian/curl(Debian 14) < 8.9.0-1 8.9.0-1 Fixed
haxx libcurl >= 8.6.0, < 8.9.0 8.9.0 Fixed

Affected products

ProductAffected versionsFixed in
debian/curl(Debian:13) < 8.9.0-1 8.9.0-1
debian/curl(Debian:14) < 8.9.0-1 8.9.0-1
curl >= 8.8.0, <= 8.8.0 No fix listed
curl >= 8.7.1, <= 8.7.1 No fix listed
curl >= 8.7.0, <= 8.7.0 No fix listed
curl >= 8.6.0, <= 8.6.0 No fix listed
curl >= 8.6.0, <= 8.8.0 No fix listed
alpine/curl(Alpine:v3.17) < 8.9.0-r0 8.9.0-r0
alpine/curl(Alpine:v3.18) < 8.9.0-r0 8.9.0-r0
alpine/curl(Alpine:v3.19) < 8.9.0-r0 8.9.0-r0
alpine/curl(Alpine:v3.20) < 8.9.0-r0 8.9.0-r0
alpine/curl(Alpine:v3.21) < 8.9.0-r0 8.9.0-r0
alpine/curl(Alpine:v3.22) < 8.9.0-r0 8.9.0-r0
alpine/curl(Alpine:v3.23) < 8.9.0-r0 8.9.0-r0
alpine/curl(Alpine:v3.24) < 8.9.0-r0 8.9.0-r0
haxx libcurl >= 8.6.0, < 8.9.0 8.9.0

References