CLD-242 Details

Other IDs this deficiency may be known by:

CVE ID CVE-2018-1000005 (nvd) (mitre) (debian) (archlinux) (red hat) (suse) (ubuntu)
Other ID(s)

Basic Information:

Affected Package(s) curl
Deficiency Type SECURITY
Date Created 2018-01-24 09:05:50
Date Last Modified 2018-01-24 09:27:09

Version Specific Information:

Cucumber 1.0 i686fixed in curl-7.58.0-i686-1
Cucumber 1.0 x86_64fixed in curl-7.58.0-x86_64-1 and curl-lib_i686-7.58.0-lib_i686-1

Cucumber 1.1 i686 fixed in curl-7.58.0-i686-1
Cucumber 1.1 x86_64 fixed in curl-7.58.0-x86_64-1 and curl-lib_i686-7.58.0-lib_i686-1


================================ Initial Report ================================


HTTP/2 trailer out-of-bounds read

Project curl Security Advisory, January 24th 2018 -


libcurl contains an out bounds read in code handling HTTP/2 trailers.

It was [reported]( that reading an
HTTP/2 trailer could mess up future trailers since the stored size was one
byte less than required.

The problem is that the code that creates HTTP/1-like headers from the HTTP/2
trailer data once appended a string like `":"` to the target buffer, while
this was recently changed to `": "` (a space was added after the colon) but
the associated math wasn't updated correspondingly.

When accessed, the data is read out of bounds and causes either a crash or
that the (too large) data gets passed to the libcurl callback. This might lead
to a denial-of-service situation or an information disclosure if someone has a
service that echoes back or uses the trailers for something.

We are not aware of any exploit of this flaw.


This bug was introduced in commit
May 11 2016.

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


- Affected versions: libcurl 7.49.0 to and including 7.57.0
- Not affected versions: libcurl < 7.49.0 and >= 7.58.0

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


In libcurl version 7.58.0, the allocation size is corrected.

A [patch for
is available.


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

 A - Upgrade curl to version 7.58.0

 B - Apply the patch to your version and rebuild


It was publicly [reported to the curl
project]( on January 10, 2018.

The security impact was realized and assessed on January 11. The fix was
merged publicly in git on the same day, not mentioning the security impact.

We contacted distros@openwall on January 17.

curl 7.58.0 was released on January 24 2018, coordinated with the publication
of this advisory.


Reported and patched by Zhouyihai Ding. Researched by Ray Satiro.

Thanks a lot!



================================= Our Analysis =================================

----- Affected Products -----
Versions of curl < 7.58.0 and > 7.49.0 are affected. This includes curl as
originally packaged in Cucumber Linux 1.0 and 1.1.

----- Fix for this Vulnerability -----
This vulnerability has been fixed in curl 7.58.0.

================================= Our Solution =================================

We have upgraded to curl 7.58.0.