Bug 1053903 - (CVE-2014-0015) CVE-2014-0015 curl: re-use of wrong HTTP NTLM connection in libcurl
CVE-2014-0015 curl: re-use of wrong HTTP NTLM connection in libcurl
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=20140129,repor...
: Security
Depends On: 1059326 1059327 1097085 1097086
Blocks: 1053909
  Show dependency treegraph
 
Reported: 2014-01-15 18:47 EST by Vincent Danen
Modified: 2016-10-24 09:11 EDT (History)
3 users (show)

See Also:
Fixed In Version: curl 7.35.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-10-24 09:11:58 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)

  None (edit)
Description Vincent Danen 2014-01-15 18:47:10 EST
Daniel Stenberg reported the following vulnerability in cURL:

   libcurl can in some circumstances re-use the wrong connection when asked to
   do an NTLM-authenticated HTTP or HTTPS request.

   libcurl features a pool of recent connections so that subsequent requests
   can re-use an existing connection to avoid overhead.

   When re-using a connection a range of criterion must first be met. Due to a
   logical error in the code, a request that was issued by an application could
   wrongfully re-use an existing connection to the same server that was
   authenticated using different credentials. One underlying reason being that
   NTLM authenticates connections and not requests, contrary to how HTTP is
   designed to work and how other authentication methods work.

   An application that allows NTLM and another auth method (the bug only
   triggers if more than one auth method is asked for) to a server (that
   responds wanting NTLM) with user1:password1 and then does another operation
   to the same server with user2:password2 (when the previous connection was
   left alive) - the second request will re-use the same connection and since
   it'll then see that the NTLM negotiation is already made, it will just send
   the request over that connection thinking it uses 'user2' credentials when
   it is in fact still using the connection authenticated for user1...

   The set of auth methods to use is set with CURLOPT_HTTPAUTH.

   Two common auth defines in libcurl are CURLAUTH_ANY and CURLAUTH_ANYSAFE.
   Both of them ask for NTLM and other methods and can therefore trigger this
   problem.

   Applications can disable libcurl's re-use of connections and thus mitigate
   this problem, by using one of the following libcurl options to alter how
   connections are or aren't re-used: CURLOPT_FRESH_CONNECT,
   CURLOPT_MAXCONNECTS and CURLMOPT_MAX_HOST_CONNECTIONS (if using curl_multi
   API).

This will be corrected in upstream libcurl and curl 7.35.0.
Comment 1 Vincent Danen 2014-01-15 18:49:25 EST
Acknowledgements:

Red Hat would like to thank the cURL project for reporting this issue.  Upstream acknowledges Paras Sethia as the original reporter and Yehezkel Horowitz for discovering the security impact.
Comment 2 Vincent Danen 2014-01-15 18:55:11 EST
This is corrected upstream:

https://github.com/bagder/curl/commit/8ae35102c43d8d
Comment 4 Kamil Dudka 2014-01-29 05:59:03 EST
fixed in curl-7.35.0-1.fc21
Comment 5 Vincent Danen 2014-01-29 11:19:36 EST
This affects libcurl 7.10.6 to and including 7.34.0.  It is fixed in version 7.35.0.


External References:

http://curl.haxx.se/docs/security.html#20140129
Comment 7 Vincent Danen 2014-01-29 11:21:47 EST
Created curl tracking bugs for this issue:

Affects: fedora-all [bug 1059327]
Comment 8 Fedora Update System 2014-02-02 21:46:49 EST
curl-7.32.0-4.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 9 Fedora Update System 2014-02-15 15:02:12 EST
curl-7.29.0-13.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 10 Vincent Danen 2014-03-26 11:28:14 EDT
Mitigation:

Avoid using HTTP NTLM in your application.  If you must use NTLM authentication, ensure that it is the only requested authentication method (use --ntlm specifically, do not use --anyauth or other authentication methods).
Comment 13 errata-xmlrpc 2014-05-27 12:26:45 EDT
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6

Via RHSA-2014:0561 https://rhn.redhat.com/errata/RHSA-2014-0561.html
Comment 14 Huzaifa S. Sidhpurwala 2014-05-28 00:18:32 EDT
Statement:

This issue affects the version of curl as shipped with Red Hat Enterprise Linux 5 and 7. The Red Hat Security Response Team has rated this issue as having Moderate security impact, a future update may address this flaw.

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