Buy commercial curl support from
WolfSSL. We help you work out your issues, debug your libcurl
applications, use the API, port to new platforms, add new features and more.
With a team lead by the curl founder himself.
[SECURITY ADVISORY] curl: CVE-2024-2398: HTTP/2 push headers memory-leak
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Daniel Stenberg via curl-library <curl-library_at_lists.haxx.se>
Date: Wed, 27 Mar 2024 07:58:09 +0100 (CET)
HTTP/2 push headers memory-leak
===============================
Project curl Security Advisory, March 27 2024 -
[Permalink](https://curl.se/docs/CVE-2024-2398.html)
VULNERABILITY
-------------
When an application tells libcurl it wants to allow HTTP/2 server push, and
the amount of received headers for the push surpasses the maximum allowed
limit (1000), libcurl aborts the server push. When aborting, libcurl
inadvertently does not free all the previously allocated headers and instead
leaks the memory.
Further, this error condition fails silently and is therefore not easily
detected by an application.
INFO
Date: Wed, 27 Mar 2024 07:58:09 +0100 (CET)
HTTP/2 push headers memory-leak
===============================
Project curl Security Advisory, March 27 2024 -
[Permalink](https://curl.se/docs/CVE-2024-2398.html)
VULNERABILITY
-------------
When an application tells libcurl it wants to allow HTTP/2 server push, and
the amount of received headers for the push surpasses the maximum allowed
limit (1000), libcurl aborts the server push. When aborting, libcurl
inadvertently does not free all the previously allocated headers and instead
leaks the memory.
Further, this error condition fails silently and is therefore not easily
detected by an application.
INFO
---- If a server sends many `PUSH_PROMISE` frames with an excessive amount of headers, this can lead to multiple megabytes of memory leaked *per response*. HTTP/2 server push is a relatively rarely used feature. The Common Vulnerabilities and Exposures (CVE) project has assigned the name CVE-2024-2398 to this issue. CWE-772: Missing Release of Resource after Effective Lifetime Severity: Medium AFFECTED VERSIONS ----------------- - Affected versions: curl 7.44.0 to and including 8.6.0 - Not affected versions: curl < 7.44.0 and >= 8.7.0 - Introduced-in: https://github.com/curl/curl/commit/ea7134ac874a66107e54ff9 libcurl is used by many applications, but not always advertised as such! This flaw is also accessible using the curl command line tool. SOLUTION ------------ Starting in curl 8.7.0, the entire set of headers is freed appropriately on errors. - Fixed-in: https://github.com/curl/curl/commit/deca8039991886a559b67bcd6 RECOMMENDATIONS -------------- A - Upgrade curl to version 8.7.0 B - Apply the patch to your local version C - Make sure HTTP/2 push is not used TIMELINE -------- This issue was reported to the curl project on March 5, 2024. We contacted distros_at_openwall on March 19, 2024. curl 8.7.0 was released on March 27 2024 around 07:00 UTC, coordinated with the publication of this advisory. The curl security team is not aware of any active exploits using this vulnerability. CREDITS ------- - Reported-by: w0x42 on hackerone - Patched-by: Stefan Eissing Thanks a lot! -- / daniel.haxx.se -- Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.htmlReceived on 2024-03-27