Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1213347 (CVE-2015-3145) - CVE-2015-3145 curl: cookie parser out of boundary memory access
Summary: CVE-2015-3145 curl: cookie parser out of boundary memory access
Keywords:
Status: CLOSED NOTABUG
Alias: CVE-2015-3145
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1214182 1214795 1214796
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-20 11:03 UTC by Vasyl Kaigorodov
Modified: 2023-05-12 09:04 UTC (History)
20 users (show)

Fixed In Version: curl 7.42.0
Clone Of:
Environment:
Last Closed: 2015-04-24 11:17:27 UTC
Embargoed:


Attachments (Terms of Use)

Description Vasyl Kaigorodov 2015-04-20 11:03:59 UTC
libcurl supports HTTP "cookies" as documented in RFC 6265. Together with each
individual cookie there are several different properties, but for this
vulnerability we focus on the associated "path" element. It tells information
about for which path on a given host the cookies is valid.

The internal libcurl function called `sanitize_cookie_path()` that cleans up
the path element as given to it from a remote site or when read from a file,
did not properly validate the input. If given a path that consisted of a
single double-quote, libcurl would index a newly allocated memory area with
index -1 and assign a zero to it, thus destroying heap memory it wasn't
supposed to.

At best, this gets unnoticed but can also lead to a crash or worse. We have
not researched further what kind of malicious actions that potentially this
could be used for.

Applications have to explicitly enable cookie parsing in libcurl for this
problem to trigger, and if not enabled libcurl will not hit this problem.

We are not aware of any exploits of this flaw.

Affected versions: from libcurl 7.31.0 to and including 7.41.0

Acknowledgements:

Red Hat would like to thank Daniel Stenberg (curl upstream) for reporting this issue. Upstream acknowledges Hanno Böck as the original reporter.

Comment 1 Martin Prpič 2015-04-22 07:55:08 UTC
External References:

http://curl.haxx.se/docs/adv_20150422C.html

Comment 2 Martin Prpič 2015-04-22 07:56:52 UTC
Created curl tracking bugs for this issue:

Affects: fedora-all [bug 1214182]

Comment 4 Stefan Cornelius 2015-04-23 14:32:21 UTC
Created mingw-curl tracking bugs for this issue:

Affects: fedora-all [bug 1214795]
Affects: epel-7 [bug 1214796]

Comment 5 Stefan Cornelius 2015-04-23 14:38:52 UTC
Patch:
http://curl.haxx.se/CVE-2015-3145.patch

Comment 6 Huzaifa S. Sidhpurwala 2015-04-24 08:41:24 UTC
Statement:

Not vulnerable. This issue does not affect the version of curl as shipped with Red Hat Enterprise Linux 5, 6 and 7.

Comment 8 Fedora Update System 2015-04-26 12:42:45 UTC
curl-7.40.0-3.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2015-04-28 13:01:25 UTC
curl-7.32.0-20.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2015-05-02 18:11:34 UTC
curl-7.37.0-14.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.


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