Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1136154 - (CVE-2014-3613) CVE-2014-3613 curl: incorrect handling of IP addresses in cookie domain
CVE-2014-3613 curl: incorrect handling of IP addresses in cookie domain
Status: CLOSED ERRATA
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
impact=moderate,public=20140910,repor...
: Security
Depends On: 1139453 1139454 1140036 1140037 1140038 1175776 1215062
Blocks: 1136155 1193283 1210268
  Show dependency treegraph
 
Reported: 2014-09-02 00:15 EDT by Murray McAllister
Modified: 2016-07-11 05:02 EDT (History)
20 users (show)

See Also:
Fixed In Version: curl 7.38.0
Doc Type: Bug Fix
Doc Text:
It was found that the libcurl library did not correctly handle partial literal IP addresses when parsing received HTTP cookies. An attacker able to trick a user into connecting to a malicious server could use this flaw to set the user's cookie to a crafted domain, making other cookie-related issues easier to exploit.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-11 05:02:26 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch from upstream (11.77 KB, patch)
2014-09-02 00:16 EDT, Murray McAllister
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:1254 normal SHIPPED_LIVE Moderate: curl security, bug fix, and enhancement update 2015-07-20 13:50:03 EDT
Red Hat Product Errata RHSA-2015:2159 normal SHIPPED_LIVE Moderate: curl security, bug fix, and enhancement update 2015-11-19 03:26:18 EST

  None (edit)
Description Murray McAllister 2014-09-02 00:15:01 EDT
Daniel Stenberg reported the following vulnerability in cURL that could cause libcurl-based HTTP clients to leak cookie information:

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.

Versions 7.1 up to and including 7.37.1 are affected.

Information about how to enable cookies is available from http://curl.haxx.se/docs/http-cookies.html

Acknowledgements:

Red Hat would like to thank the cURL project for reporting this issue. Upstream acknowledges Tim Ruehsen as the original reporter.
Comment 2 Murray McAllister 2014-09-02 00:16:28 EDT
Created attachment 933581 [details]
patch from upstream
Comment 7 Tomas Hoger 2014-09-08 14:21:41 EDT
This issue can affect applications using curl if they enabled cookie support and are used to access HTTP/HTTPS servers using IP address rather than host name.  To take advantage of the problem, attacker needs to trick victim into connecting to their malicious server using its IP address.  The IP of the malicious server must have the last two or three octets of it match relevant octets of a non-malicious server IP victim normally connects to (i.e. using example from comment 0, if victim normally connects to 192.168.0.1, attack's malicious server must use an IP ending with 168.0.1 or 0.1).  In such case, attacker's server can send cookies with crafted 'domain' attribute that will be sent to the target server.

This can provide an attacker with a way to exploit other cookie handling bugs on the target server (e.g. session fixation issues, or other issues related to improper sanitization of cookie values).

It does not seem this issue can lead to leak of cookies in any reasonable use case.  A non-malicious server would have to incorrectly set 'domain' attributes on cookies it returns to risk their expose to other servers.
Comment 8 Tomas Hoger 2014-09-08 14:23:22 EDT
Statement:

This issue affects the versions of curl as shipped with Red Hat Enterprise Linux 5 and is not planned to be corrected in future updates.

Inktank Ceph Enterprise 1.1 and 1.2 receives only qualified Important and Critical impact security fixes. This issue has been rated as having Moderate security impact and is not currently planned to be addressed in future updates. For additional information, refer to the Inktank Ceph Enterprise Support Matrix:
http://www.inktank.com/enterprise/support/
Comment 17 Murray McAllister 2014-09-10 04:28:44 EDT
This issue is public now.

External References:

http://curl.haxx.se/docs/adv_20140910A.html
Comment 18 Murray McAllister 2014-09-10 04:34:37 EDT
Created curl tracking bugs for this issue:

Affects: fedora-all [bug 1140036]
Comment 19 Murray McAllister 2014-09-10 04:34:41 EDT
Created mingw-curl tracking bugs for this issue:

Affects: fedora-all [bug 1140037]
Affects: epel-7 [bug 1140038]
Comment 20 Fedora Update System 2014-09-13 23:27:26 EDT
curl-7.32.0-13.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 21 Fedora Update System 2014-09-23 00:26:20 EDT
curl-7.37.0-7.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 22 Fedora Update System 2014-10-08 15:03:42 EDT
curl-7.29.0-23.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 30 errata-xmlrpc 2015-07-22 01:43:35 EDT
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6

Via RHSA-2015:1254 https://rhn.redhat.com/errata/RHSA-2015-1254.html
Comment 32 errata-xmlrpc 2015-11-19 02:06:38 EST
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2015:2159 https://rhn.redhat.com/errata/RHSA-2015-2159.html

Note You need to log in before you can comment on or make changes to this bug.