SecurityTracker.com
    Home    |    View Topics    |    Search    |    Contact Us    |   

SecurityTracker
Archives


 


Category:   Application (Generic)  >   curl Vendors:   curl.haxx.se
libcurl NTLM Buffer Overflow Lets Remote Users Execute Arbitrary Code
SecurityTracker Alert ID:  1039896
SecurityTracker URL:  http://securitytracker.com/id/1039896
CVE Reference:   CVE-2017-8816   (Links to External Site)
Date:  Nov 30 2017
Impact:   Execution of arbitrary code via network, User access via network
Fix Available:  Yes  Vendor Confirmed:  Yes  
Version(s): 7.15.4 - 7.56.1
Description:   A vulnerability was reported in libcurl. A remote user can execute arbitrary code on the target system.

A remote user can send specially crafted data to trigger a buffer overflow in the NTLM authentication process and execute arbitrary code on the target system.

32-bit systems are affected.

The vendor was notified on November 6, 2017.

Alex Nichols reported this vulnerability.

Impact:   A remote user can execute arbitrary code on the target system.
Solution:   The vendor has issued a fix (7.57.0).

The vendor advisory is available at:

https://curl.haxx.se/docs/adv_2017-12e7.html

Vendor URL:  curl.haxx.se/docs/adv_2017-12e7.html (Links to External Site)
Cause:   Boundary error
Underlying OS:  Linux (Any), UNIX (Any), Windows (Any)

Message History:   This archive entry has one or more follow-up message(s) listed below.
Nov 30 2017 (Ubuntu Issues Fix) libcurl NTLM Buffer Overflow Lets Remote Users Execute Arbitrary Code
Ubuntu has issued a fix for Ubuntu Linux 14.04 LTS, 16.04 LTS, 17.04, and 17.10.



 Source Message Contents

Subject:  [oss-security] [SECURITY ADVISORY] curl: NTLM buffer overflow via integer overflow

NTLM buffer overflow via integer overflow
=========================================

Project curl Security Advisory, November 29th 2017 -
[Permalink](https://curl.haxx.se/docs/adv_2017-11e7.html)

VULNERABILITY
-------------

libcurl contains a buffer overrun flaw in the NTLM authentication code.

The internal function `Curl_ntlm_core_mk_ntlmv2_hash` sums up the lengths of
the user name + password (= SUM) and multiplies the sum by two (= SIZE) to
figure out how large storage to allocate from the heap.

The SUM value is subsequently used to iterate over the input and generate
output into the storage buffer. On systems with a 32 bit `size_t`, the math to
calculate SIZE triggers an integer overflow when the combined lengths of the
user name and password is larger than 2GB (2^31 bytes). This integer overflow
usually causes a very small buffer to actually get allocated instead of the
intended very huge one, making the use of that buffer end up in a buffer
overrun.

We are not aware of any exploit of this flaw.

INFO
----

This bug was introduced in commit
[be285cde3f5](https://github.com/curl/curl/commit/be285cde3f5), April 2006.

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

AFFECTED VERSIONS
-----------------

This is only an issue on 32 bit systems. It also requires the user and
password fields to use more than 2GB of memory combined, which in itself
should be rare.

- Affected versions: libcurl 7.15.4 to and including 7.56.1
- Not affected versions: libcurl < 7.15.4 and >= 7.57.0

curl is used by many applications, but not always advertised as such.

THE SOLUTION
------------

In libcurl version 7.57.0, the integer overflow is avoided.

A [patch for CVE-2017-8816](https://curl.haxx.se/CVE-2017-8816.patch) is
available.

RECOMMENDATIONS
---------------

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

  A - Upgrade curl to version 7.57.0

  B - Apply the patch to your version and rebuild

  C - Put length restrictions on the user name and passwords you can pass to
      libcurl

TIME LINE
---------

It was reported to the curl project on November 6, 2017.  We contacted
distros@openwall on November 21.

curl 7.57.10 was released on November 29 2017, coordinated with the
publication of this advisory.

CREDITS
-------

Reported by Alex Nichols. Patch by Daniel Stenberg.

Thanks a lot!

-- 

  / daniel.haxx.se
 
 


Go to the Top of This SecurityTracker Archive Page





Home   |    View Topics   |    Search   |    Contact Us

This web site uses cookies for web analytics. Learn More

Copyright 2019, SecurityGlobal.net LLC