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

SecurityTracker
Archives


 


Category:   Application (Generic)  >   curl Vendors:   curl.haxx.se
libcurl Out-of-Bounds Memory Read Error in FTP Wildcard Function Lets Remote Users Redirect the Target Client to an Arbitrary Site
SecurityTracker Alert ID:  1039897
SecurityTracker URL:  http://securitytracker.com/id/1039897
CVE Reference:   CVE-2017-8817   (Links to External Site)
Date:  Nov 30 2017
Impact:   Disclosure of system information, Modification of system information
Fix Available:  Yes  Vendor Confirmed:  Yes  
Version(s): 7.21.0 - 7.56.1
Description:   A vulnerability was reported in libcurl. A remote user may be able to redirect the target client to an arbitrary site.

A remote server can return specially crafted data to trigger an out-of-bounds memory read error in the FTP wildcard matching function (CURLOPT_WILDCARDMATCH) and cause the target connected libcurl client to be redirected.

libcurl applications that use HTTP or HTTPS URLs, allow libcurl redirects, and has FTP wildcards enabled are affected.

The vendor was notified on November 10, 2017.

The OSS-Fuzz project reported reported this vulnerability.

Impact:   A remote user may be able to redirect the target client to an arbitrary site.
Solution:   The vendor has issued a fix (7.57.0).

The vendor advisory is available at:

https://curl.haxx.se/docs/adv_2017-ae72.html

Vendor URL:  curl.haxx.se/docs/adv_2017-ae72.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 Out-of-Bounds Memory Read Error in FTP Wildcard Function Lets Remote Users Redirect the Target Client to an Arbitrary Site
Ubuntu has issued a fix for Ubuntu Linux 14.04 LTS, 16.04 LTS, 17.04, and 17.10.
Dec 4 2017 (Ubuntu Issues Fix) libcurl Out-of-Bounds Memory Read Error in FTP Wildcard Function Lets Remote Users Redirect the Target Client to an Arbitrary Site
Ubuntu has issued a fix for Ubuntu Linux 12.04 ESM.



 Source Message Contents

Subject:  [oss-security] [SECURITY ADVISORY] curl: FTP wildcard out of bounds read

FTP wildcard out of bounds read
===============================

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

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

libcurl contains a read out of bounds flaw in the FTP wildcard function.

libcurl's FTP wildcard matching feature, which is enabled with the
`CURLOPT_WILDCARDMATCH` option can use a built-in wildcard function or a user
provided one. The built-in wildcard function has a flaw that makes it not
detect the end of the pattern string if it ends with an open bracket (`[`) but
instead it will continue reading the heap beyond the end of the URL buffer
that holds the wildcard.

For applications that use HTTP(S) URLs, allow libcurl to handle redirects and
have FTP wildcards enabled, this flaw can be triggered by malicious servers
that can redirect clients to a URL using such a wildcard pattern.

We are not aware of any exploit of this flaw.

INFO
----

This bug was introduced in commit
[0825cd80a62c](https://github.com/curl/curl/commit/0825cd80a62c), May 2010.

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

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

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

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

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

In libcurl version 7.57.0, there's a better check for the end of the
string. Additionally, the wildcard feature is turned off if the URL passed to
libcurl is not using FTP(S), so a redirect to an FTP URL cannot trigger
wildcard functionality.

A [patch for CVE-2017-8817](https://curl.haxx.se/CVE-2017-8817.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 - Do not use `CURLOPT_WILDCARDMATCH` without carfully verifying the
      patterns used.

TIME LINE
---------

It was reported to the curl project on November 10, 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 OSS-Fuzz. Researched by Max Dymond. 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