Bug 1200734 - (CVE-2022-32205) VUL-0: CVE-2022-32205: curl: Set-Cookie denial of service
(CVE-2022-32205)
VUL-0: CVE-2022-32205: curl: Set-Cookie denial of service
Status: RESOLVED FIXED
Classification: Novell Products
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents
unspecified
Other Other
: P3 - Medium : Normal
: ---
Assigned To: Security Team bot
Security Team bot
https://smash.suse.de/issue/335197/
CVSSv3.1:SUSE:CVE-2022-32205:4.9:(AV:...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2022-06-21 07:34 UTC by Marcus Meissner
Modified: 2022-08-21 07:00 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Comment 2 Marcus Meissner 2022-06-21 07:49:06 UTC
only SUSE:SLE-15-SP4:Update curl matches the version
Comment 3 Marcus Meissner 2022-06-27 07:50:19 UTC
public via oss-sec

CVE-2022-32205: Set-Cookie denial of service
============================================

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

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

A malicious server can serve excessive amounts of `Set-Cookie:` headers in a
HTTP response to curl and curl stores all of them. A sufficiently large amount
of (big) cookies make subsequent HTTP requests to this, or other servers to
which the cookies match, create requests that become larger than the threshold
that curl uses internally to avoid sending crazy large requests (1048576
bytes) and instead returns an error.

This denial state might remain for as long as the same cookies are kept, match
and haven't expired. Due to cookie matching rules, a server on
`foo.example.com` can set cookies that also would match for `bar.example.com`,
making it it possible for a "sister server" to effectively cause a denial of
service for a sibling site on the same second level domain using this method.

We are not aware of any exploit of this flaw.

INFO
----

CVE-2022-32205 was introduced in [commit
ed35d6590e72c23c](https://github.com/curl/curl/commit/ed35d6590e72c23c),
shipped in curl 7.71.0 with the introduction of the "dynbuf"
internally. Before this change, curl had no limit in how large HTTP request it
could generate.

CWE-770: Allocation of Resources Without Limits or Throttling

Severity: Low

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

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

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

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

We introduce several new limits and thresholds for cookies:

- Send no more than 150 cookies per request
- Cap the max length used for an outgoing `Cookie:` header to 8K
- Cap the max number of accepted `Set-Cookie:` header fields to 50

A [fix for CVE-2022-32205](https://github.com/curl/curl/commit/48d7064a49148f0394)

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

  A - Upgrade curl to version 7.84.0

  B - Apply the patch to your local version

  C - Do not use cookies

TIMELINE
--------

This issue was reported to the curl project on May 13, 2022. We contacted
distros@openwall 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.
Comment 5 Swamp Workflow Management 2022-07-06 16:26:52 UTC
SUSE-SU-2022:2305-1: An update that fixes four vulnerabilities is now available.

Category: security (important)
Bug References: 1200734,1200735,1200736,1200737
CVE References: CVE-2022-32205,CVE-2022-32206,CVE-2022-32207,CVE-2022-32208
JIRA References: 
Sources used:
openSUSE Leap 15.4 (src):    curl-7.79.1-150400.5.3.1
SUSE Linux Enterprise Module for Basesystem 15-SP4 (src):    curl-7.79.1-150400.5.3.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 6 David Anes 2022-07-14 10:22:16 UTC
All was done. Sending back to security.
Comment 7 Marcus Meissner 2022-08-21 07:00:05 UTC
done