Skip to content
Heist/ feed
Back to feed
High

freeing stack buffer in utf8asn1str

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2024-6197
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 02:56 UTC · Revision 1

Source evidence

freeing stack buffer in utf8asn1str

core-osv · Original source

Published 24 Jul 2024, 07:29 UTC

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.

osv:CVE-2024-6197
Complete source record
{
  "id": "de070be8641615bd909020545849d7cb87a75ba2af2c82587a4a69fefc16cd33",
  "url": "https://osv.dev/vulnerability/CVE-2024-6197",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "freeing stack buffer in utf8asn1str",
    "summary": "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.",
    "evidence": "osv:CVE-2024-6197",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2024-6197",
      "aliases": [
        "CURL-CVE-2024-6197",
        "CVE-2024-6197"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/curl/curl",
              "type": "GIT",
              "events": [
                {
                  "introduced": "5ce164e0e9290c96eb7d502173426c0a135ec008"
                },
                {
                  "fixed": "5040f7e94cd01decbe7ba8fdacbf489182d503dc"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:haxx:libcurl:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "8.6.0"
                      },
                      {
                        "fixed": "8.9.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "curl-8_8_0",
            "curl-8_7_1",
            "curl-8_7_0",
            "curl-8_6_0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-6197.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:25.169067162Z",
      "provider": "osv",
      "references": [
        "https://curl.se/docs/CVE-2024-6197.html",
        "https://curl.se/docs/CVE-2024-6197.json",
        "https://hackerone.com/reports/2559516",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/6xxx/CVE-2024-6197.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-6197",
        "https://security.netapp.com/advisory/ntap-20241129-0008/"
      ],
      "provider_metadata": {
        "cna_assigner": "curl",
        "unresolved_ranges": [
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "8.8.0"
                  },
                  {
                    "last_affected": "8.8.0"
                  },
                  {
                    "introduced": "8.7.1"
                  },
                  {
                    "last_affected": "8.7.1"
                  },
                  {
                    "introduced": "8.7.0"
                  },
                  {
                    "last_affected": "8.7.0"
                  },
                  {
                    "introduced": "8.6.0"
                  },
                  {
                    "last_affected": "8.6.0"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandaloneSingleVersion"
              }
            ]
          }
        ],
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/6xxx/CVE-2024-6197.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-6197",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 492044,
  "published_at": "2024-07-24T07:29:50.003+00:00"
}