Bug 894575 (CVE-2014-3613) - VUL-0: CVE-2014-3613: curl: libcurl cookie leaks
Summary: VUL-0: CVE-2014-3613: curl: libcurl cookie leaks
Status: RESOLVED FIXED
Alias: CVE-2014-3613
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P2 - High : Critical
Target Milestone: ---
Assignee: Security Team bot
QA Contact: Security Team bot
URL:
Whiteboard: wasL3:41829 maint:released:sle11-sp1:...
Keywords: DSLA_REQUIRED, DSLA_SOLUTION_PROVIDED
Depends on:
Blocks:
 
Reported: 2014-09-02 09:00 UTC by Marcus Meissner
Modified: 2018-10-19 18:25 UTC (History)
6 users (show)

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


Attachments
backported CVE-2014-3613 patch for SLE-11 (7.83 KB, patch)
2014-10-30 13:22 UTC, Vítězslav Čížek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus Meissner 2014-09-02 09:00:06 UTC
embargoed, via linux-distros, CRD Sep 10 2014

                              libcurl cookie leaks
                              ====================

Project cURL Security Advisory, September 10th 2014
http://curl.haxx.se/docs/security.html

1. VULNERABILITY

   Two flaws can make libcurl based HTTP clients leak cookie information.

   A) IP address as domain problem

   By not detecting and rejecting domain names for partial literal IP addresses
   properly when parsing received HTTP cookies, libcurl can be fooled to both
   sending cookies to wrong sites and into allowing arbitrary sites to set
   cookies for others.

   For this problem to trigger, the client application must use the numerical
   IP address in the URL to access the site and the site must send back cookies
   to the site using domain= and a partial IP address.

   Since libcurl wrongly approaches the IP address like it was a normal domain
   name, a site at IP address 192.168.0.1 can set cookies for anything ending
   with .168.0.1 thus fooling libcurl to send them also to for example
   127.168.0.1.

   The flaw requires dots to be present in the IP address, which restricts the
   flaw to IPv4 literal addresses or IPv6 addresses using the somewhat unusual
   "dotted-quad" style: "::ffff:192.0.2.128"

   This is not believed to be done by typical sites as this is not supported by
   clients that adhere to the rules of the RFC 6265, and many sites are written
   to explictly use their own specific named domain when sending cookies.

   B) Cookies set for Top Level Domains (TLD)

   libcurl wrongly allows cookies to be set for TLDs, thus making them much
   broader then they are supposed to be allowed to. This can allow arbitrary
   sites to set cookies that then would get sent to a different and unrelated
   site or domain.

2. INFO

   Cookie parsing and use is opt-in by applications and is not enabled by
   default.

   libcurl's cookie parser has no Public Suffix awareness, so apart from
   rejecting TLDs from being allowed it might still allow cookies for domains
   that are otherwise widely rejected by ordinary browsers. See
   https://publicsuffix.org/ for details.

   The Common Vulnerabilities and Exposures (CVE) project has assigned the name
   CVE-2014-XXXX to this issue.

3. AFFECTED VERSIONS

   The IP address flaw has existed ever since libcurl started to support
   cookies.

   The TLD part of the problem was introduced by commit 85b9dc8023 and has been
   included in libcurl versions since 7.31.0 to and including 7.37.1.

   Affected versions: from libcurl 7.1 to and including 7.37.1
   Not affected versions: libcurl >= 7.38.0

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

4. THE SOLUTION

   libcurl 7.38.0 makes sure that when connected to a site specified with a
   literal IP address, only exact matches are considered for cookies and it
   prevents cookies set for just a TLD. It does not add any public suffix
   awareness.

   A patch for this problem is available at:

     http://curl.haxx.se/libcurl-cookie-leak.patch


5. RECOMMENDATIONS

   We suggest you take one of the following actions immediately, in order of
   preference:

   A - Upgrade to curl and libcurl 7.38.0

   B - Apply the patch and rebuild libcurl

   C - Avoid using cookies in your application if you ever use URLs involving
       literal IP addresses.


6. TIME LINE

   It was reported to the curl project on August 15th 2014. We contacted
   distros@openwall on XXXXX XXth.

   libcurl 7.38.0 was released on September 10th 2014, coordinated with the
   publication of this advisory.


7. CREDITS

   Reported by Tim Ruehsen. Patch written by Tim Ruehsen and Daniel Stenberg.

   Thanks a lot!
Comment 1 Swamp Workflow Management 2014-09-02 22:00:25 UTC
bugbot adjusting priority
Comment 2 Vítězslav Čížek 2014-09-10 09:14:42 UTC
Embargo is over, curl 7.38.0 was released.
http://curl.haxx.se/changes.html#7_38_0

There are references to CVE-2014-3620, which isn't mentioned in this bug.
I guess I should include it in the changelog as well.
Comment 3 Marcus Meissner 2014-09-10 09:56:52 UTC
will open a seperate bug for that.
Comment 4 Marcus Meissner 2014-09-10 11:41:20 UTC
The TLD part was important, the literal IP cookie setting is "moderate" severity, as literal IP usage is not so common.

We will put this fix only on planned updates for now.
Comment 5 SMASH SMASH 2014-09-10 11:45:12 UTC
Affected packages:

SLE-10-SP3-TERADATA: curl, compat-curl2
SLE-11-SP3: curl
SLE-11-SP3-PRODUCTS: curl
SLE-11-SP3-UPTU: curl
Comment 7 Bernhard Wiedemann 2014-09-10 15:00:24 UTC
This is an autogenerated message for OBS integration:
This bug (894575) was mentioned in
https://build.opensuse.org/request/show/248371 13.1+12.3 / curl
Comment 9 Swamp Workflow Management 2014-09-17 21:04:23 UTC
openSUSE-SU-2014:1139-1: An update that fixes two vulnerabilities is now available.

Category: security (important)
Bug References: 894575,895991
CVE References: CVE-2014-3613,CVE-2014-3620
Sources used:
openSUSE 13.1 (src):    curl-7.32.0-2.27.1
openSUSE 12.3 (src):    curl-7.28.1-4.43.1
Comment 37 Swamp Workflow Management 2015-01-31 00:08:44 UTC
SUSE-SU-2015:0179-1: An update that solves three vulnerabilities and has four fixes is now available.

Category: security (moderate)
Bug References: 870444,884698,885302,894575,897816,901924,911363
CVE References: CVE-2014-3613,CVE-2014-3707,CVE-2014-8150
Sources used:
SUSE Linux Enterprise Software Development Kit 11 SP3 (src):    curl-7.19.7-1.40.1
SUSE Linux Enterprise Server 11 SP3 for VMware (src):    curl-7.19.7-1.40.1
SUSE Linux Enterprise Server 11 SP3 (src):    curl-7.19.7-1.40.1
SUSE Linux Enterprise Security Module 11 SP3 (src):    curl-openssl1-7.19.7-0.40.1
SUSE Linux Enterprise Desktop 11 SP3 (src):    curl-7.19.7-1.40.1
Comment 39 Marcus Meissner 2015-02-03 09:39:07 UTC
at some point we might need to roll this into LTSS updates.

i put it on the planned ltss updates.