libcurl's URL API function curlurlget() offers punycode conversions, to and from IDN. Asking to convert a name that is exactly 256 bytes, libcurl ends up reading outside of a stack based buffer when built to use the macidn IDN backend. The conversion function then fills up the provided buffer exactly - but does not null terminate the string.
This flaw can lead to stack contents accidentally getting returned as part of the converted string.
{
"last_affected": "8.8.0",
"severity": "Low",
"package": "curl",
"award": {
"amount": "540",
"currency": "USD"
},
"CWE": {
"desc": "Buffer Over-read",
"id": "CWE-126"
},
"URL": "https://curl.se/docs/CVE-2024-6874.json",
"affects": "lib",
"www": "https://curl.se/docs/CVE-2024-6874.html",
"issue": "https://hackerone.com/reports/2604391"
}[
{
"signature_version": "v1",
"signature_type": "Function",
"digest": {
"length": 575.0,
"function_hash": "216640968448479456553636563154165417207"
},
"deprecated": false,
"source": "https://github.com/curl/curl.git/commit/686d54baf1df6e0775898f484d1670742898b3b2",
"target": {
"function": "mac_idn_to_ascii",
"file": "lib/idn.c"
},
"id": "CURL-CVE-2024-6874-6c58f535"
},
{
"signature_version": "v1",
"signature_type": "Function",
"digest": {
"length": 577.0,
"function_hash": "172764687688659853305595737277601779273"
},
"deprecated": false,
"source": "https://github.com/curl/curl.git/commit/686d54baf1df6e0775898f484d1670742898b3b2",
"target": {
"function": "mac_ascii_to_idn",
"file": "lib/idn.c"
},
"id": "CURL-CVE-2024-6874-dfa7777d"
},
{
"signature_version": "v1",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"98002545464681941635236377462148785051",
"232850703124931391163673421933204740841",
"112771001505927567012460810966684188462",
"248033720349314409798132084819429479132",
"113651119734714053058587916180594786732",
"232306955307703962923429757053563269400",
"101837938303599049161117334065762530211",
"248033720349314409798132084819429479132"
]
},
"deprecated": false,
"source": "https://github.com/curl/curl.git/commit/686d54baf1df6e0775898f484d1670742898b3b2",
"target": {
"file": "lib/idn.c"
},
"id": "CURL-CVE-2024-6874-e762d376"
}
]