Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <573s840-9q6o-7q70-5n1o-p0134rro2p88@unkk.fr>
Date: Mon, 27 Jun 2022 08:20:10 +0200 (CEST)
From: Daniel Stenberg <daniel@...x.se>
To: curl security announcements -- curl users <curl-users@...ts.haxx.se>, 
    curl-announce@...ts.haxx.se, libcurl hacking <curl-library@...ts.haxx.se>, 
    oss-security@...ts.openwall.com
Subject: [SECURITY ADVISORY] curl: CVE-2022-32206: HTTP compression denial
 of service

CVE-2022-32206: HTTP compression denial of service
==================================================

Project curl Security Advisory, June 27th 2022 -
[Permalink](https://curl.se/docs/CVE-2022-32206.html)

VULNERABILITY
-------------

curl supports "chained" HTTP compression algorithms, meaning that a server
response can be compressed multiple times and potentially with different
algorithms. The number of acceptable "links" in this "decompression chain" was
unbounded, allowing a malicious server to insert a virtually unlimited number
of compression steps.

The use of such a decompression chain could result in a "malloc bomb", making
curl end up spending enormous amounts of allocated heap memory, or trying to
and returning out of memory errors.

We are not aware of any exploit of this flaw.

INFO
----

CVE-2022-32206 was introduced in [commit
dbcced8e32b50c06](https://github.com/curl/curl/commit/dbcced8e32b50c06),
shipped in curl 7.57.0.

Automatic decompression of content needs to be enabled per transfer. It is
disabled by default and then nothing bad happens.

This flaw exists with just one of the compression algorithms built-in (gzip,
brotli or zstd), but the individual algorithms has different "exploding"
powers.

Both `Content-Encoding:` and `Transfer-Encoding:` are affected. The
vulnerability is more emphasized over HTTP/1 than HTTP/2 due to different curl
internal header limits.

CWE-770: Allocation of Resources Without Limits or Throttling

Severity: Medium

AFFECTED VERSIONS
-----------------

- Affected versions: curl 7.57.0 to and including 7.83.1
- Not affected versions: curl < 7.57.0 and curl >= 7.84.0

libcurl is used by many applications, but not always advertised as such!

THE SOLUTION
------------

The amount of accepted "chained" algorithms is now capped to 5.

A [fix for CVE-2022-32206](https://github.com/curl/curl/commit/3a09fbb7f264c67c43)

RECOMMENDATIONS
--------------

  A - Upgrade curl to version 7.84.0

  B - Apply the patch to your local version

  C - Do not enable automatic decompression

TIMELINE
--------

This issue was reported to the curl project on May 15, 2022. We contacted
distros@...nwall on June 20.

libcurl 7.84.0 was released on June 27 2022, coordinated with the publication
of this advisory.

CREDITS
-------

This issue was reported by Harry Sintonen. Patched by Daniel Stenberg.

Thanks a lot!

-- 

  / daniel.haxx.se
  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
  | https://curl.se/support.html

Powered by blists - more mailing lists

Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.