Bug 934501 (CVE-2015-3236) - VUL-0: CVE-2015-3236: curl: lingering HTTP credentials in connection re-use
Summary: VUL-0: CVE-2015-3236: curl: lingering HTTP credentials in connection re-use
Status: RESOLVED FIXED
Alias: CVE-2015-3236
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other openSUSE 13.2
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Security Team bot
QA Contact: Security Team bot
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-12 07:22 UTC by Andreas Stieger
Modified: 2015-06-24 14:22 UTC (History)
2 users (show)

See Also:
Found By: Security Response Team
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 1 Andreas Stieger 2015-06-12 13:05:58 UTC
openSUSE:13.1:Update 7.42.1 affected
openSUSE:13.2:Update 7.42.1 affected
openSUSE Tumbleweed  7.42.1 affected

SLE not affected.
Comment 2 Swamp Workflow Management 2015-06-12 22:01:33 UTC
bugbot adjusting priority
Comment 3 Andreas Stieger 2015-06-17 12:04:42 UTC
public at http://curl.haxx.se/docs/adv_20150617A.html

lingering HTTP credentials in connection re-use

Project cURL Security Advisory, June 17th 2015 - Permalink
VULNERABILITY

libcurl can wrongly send HTTP credentials when re-using connections.

libcurl allows applications to set credentials for the upcoming transfer with HTTP Basic authentication, like with CURLOPT_USERPWD for example. Name and password. Just like all other libcurl options the credentials are sticky and are kept associated with the "handle" until something is made to change the situation.

Further, libcurl offers a curl_easy_reset() function that resets a handle back to its pristine state in terms of all settable options. A reset is of course also supposed to clear the credentials. A reset is typically used to clear up the handle and prepare it for a new, possibly unrelated, transfer.

Within such a handle, libcurl can also store a set of previous connections in case a second transfer is requested to a host name for which an existing connection is already kept alive.

With this flaw present, using the handle even after a reset would make libcurl accidentally use those credentials in a subseqent request if done to the same host name and connection as was previously accessed.

An example case would be first requesting a password protected resource from one section of a web site, and then do a second request of a public resource from a completely different part of the site without authentication. This flaw would then inadvertently leak the credentials in the second request.

We are not aware of any exploit of this flaw.
INFO

This flaw can also affect the curl command line tool if a similar operation series is made with that.

The Common Vulnerabilities and Exposures (CVE) project has assigned the name CVE-2015-3236 to this issue.
AFFECTED VERSIONS

This flaw is relevant for

    Affected versions: libcurl 7.40.0 to and including 7.42.1
    Not affected versions: libcurl < 7.40.0 and libcurl >= 7.43.0

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

In version 7.43.0, libcurl properly clears the credentials and prevents them from lingering around.

A patch for this problem that changes the default is available at (URL will be updated in final advisory):

http://curl.haxx.se/CVE-2015-3236.patch

RECOMMENDATIONS

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

A - Upgrade curl and libcurl to version 7.43.0

B - Apply the patch to your version and rebuild

C - If you use curl_easy_reset(), explicitly set the credentials afterwards
TIME LINE

It was first reported to the curl project on May 19 2015. We contacted distros@openwall on June 11.

libcurl 7.43.0 was released on June 17 2015, coordinated with the publication of this advisory.
CREDITS

Reported by Tomas Tomecek and Kamil Dudka.

Thanks a lot!
Comment 4 Bernhard Wiedemann 2015-06-17 15:00:09 UTC
This is an autogenerated message for OBS integration:
This bug (934501) was mentioned in
https://build.opensuse.org/request/show/312422 13.2+13.1 / curl
Comment 5 Andreas Stieger 2015-06-17 15:38:25 UTC
update running
Comment 6 Swamp Workflow Management 2015-06-24 13:06:59 UTC
openSUSE-SU-2015:1135-1: An update that solves two vulnerabilities and has one errata is now available.

Category: security (moderate)
Bug References: 851126,934501,934502
CVE References: CVE-2015-3236,CVE-2015-3237
Sources used:
openSUSE 13.2 (src):    curl-7.42.1-16.1
openSUSE 13.1 (src):    curl-7.42.1-2.47.1
Comment 7 Marcus Meissner 2015-06-24 14:22:21 UTC
reelased