Home    |    View Topics    |    Search    |    Contact Us    |   



Category:   Application (Generic)  >   curl Vendors:
libcurl SSL Memory Allocation Error Lets Remote Users Cause the Target Service to Crash
SecurityTracker Alert ID:  1039898
SecurityTracker URL:
CVE Reference:   CVE-2017-8818   (Links to External Site)
Date:  Nov 30 2017
Impact:   Denial of service via network
Fix Available:  Yes  Vendor Confirmed:  Yes  
Version(s): 7.56.0 - 7.56.1
Description:   A vulnerability was reported in libcurl. A remote user can cause the target service to crash.

A remote user can trigger a memory allocation error in SSL-related code to cause the target application using libcurl to crash.

Systems with 32-bit pointers are affected.

The vendor was notified on November 18, 2017.

John Schoenick reported this vulnerability.

Impact:   A remote user can cause the target service to crash.
Solution:   The vendor has issued a fix (7.57.0).

The vendor advisory is available at:

Vendor URL: (Links to External Site)
Cause:   Access control error
Underlying OS:  Linux (Any), UNIX (Any), Windows (Any)

Message History:   None.

 Source Message Contents

Subject:  [oss-security] [SECURITY ADVISORY] curl: SSL out of buffer access

SSL out of buffer access

Project curl Security Advisory, November 29th 2017 -


libcurl contains an out boundary access flaw in SSL related code.

When allocating memory for a connection (the internal struct called
`connectdata`), a certain amount of memory is allocated at the end of the
struct to be used for SSL related structs. Those structs are used by the
particular SSL library libcurl is built to use. The application can also tell
libcurl which specific SSL library to use if it was built to support more than

The math used to calculate the extra memory amount necessary for the SSL
library was wrong on 32 bit systems, which made the allocated memory too small
by 4 bytes. The last struct member of the last object within the memory area
could then be outside of what was allocated. Accessing that member could lead
to a crash or other undefined behaviors depending on what memory that is
present there and how the particular SSL library decides to act on that memory

Specifically the vulnerability is present if libcurl was built so that
`sizeof(long long *) < sizeof(long long)` which as far as we are aware only
happens in 32-bit builds.

We are not aware of any exploit of this flaw.


This bug was introduced in commit
[70f1db321a](, July 2017.

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


This is only an issue on systems with 32 bit pointers. (Technically, on
systems where `sizeof(long long *) < sizeof(long long)`.)

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

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


In libcurl version 7.57.0, the allocation size is corrected.

A [patch for CVE-2017-8818]( is


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

  A - Upgrade curl to version 7.57.0

  B - Apply the patch to your version and rebuild


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

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

(The [original report]( was made in public)


Reported by John Schoenick. Patch by Ray Satiro.

Thanks a lot!



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 2021, LLC