Bug 1076360 - (CVE-2018-1000005) VUL-0: CVE-2018-1000005: curl: HTTP/2 trailer out-of-bounds read
(CVE-2018-1000005)
VUL-0: CVE-2018-1000005: curl: HTTP/2 trailer out-of-bounds read
Status: RESOLVED FIXED
Classification: Novell Products
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents
unspecified
Other Other
: P3 - Medium : Normal
: ---
Assigned To: Security Team bot
Security Team bot
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-01-17 10:28 UTC by Marcus Meissner
Modified: 2018-03-07 08:00 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus Meissner 2018-01-17 10:28:31 UTC
embargoed via distros

CRD: 2018-01-24

From Daniel S
Hi friends,

I'd like to alert you all about this pending curl security issue and request a 
CVE for it. It's a fairly low risk flaw I'd say.

Note: the original report and the fix is already public but we've tried to not 
highlight its security impact.

Thanks!

HTTP/2 trailer out-of-bounds read
=================================

Project curl Security Advisory, January 24th 2018 -
[Permalink](https://curl.haxx.se/docs/adv_2018-824a.html)

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

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

It was [reported](https://github.com/curl/curl/pull/2231) 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
following 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 client write. This could 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.

INFO
----

This bug was introduced in commit
[0761a51ee0551ad9e5](https://github.com/curl/curl/commit/0761a51ee0551ad9e5),
May 11 2016.

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

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

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

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

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

In libcurl version 7.58.0, the allocation size is corrected.

A [patch for
CVE-2018-XXXX](https://github.com/curl/curl/commit/fa3dbb9a147488a294.patch)
is available.

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

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

  A - Upgrade curl to version 7.58.0

  B - Apply the patch to your version and rebuild

TIME LINE
---------

It was public [reported to the curl
project](https://github.com/curl/curl/issues/2231) on January 10, 2018.

The security impact was realized out 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.

CREDITS
-------

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

Thanks a lot!
Comment 1 Pedro Monreal Gonzalez 2018-01-17 10:45:40 UTC
Only Factory is affected. We'll update to version 7.58.0 on the 24th.
Comment 2 Marcus Meissner 2018-01-18 10:10:05 UTC
CVE-2018-1000005
Comment 3 Marcus Meissner 2018-01-24 07:32:26 UTC
is public now:

HTTP/2 trailer out-of-bounds read
=================================

Project curl Security Advisory, January 24th 2018 -
[Permalink](https://curl.haxx.se/docs/adv_2018-824a.html)

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

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

It was [reported](https://github.com/curl/curl/pull/2231) 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.

INFO
----

This bug was introduced in commit
[0761a51ee0551ad9e5](https://github.com/curl/curl/commit/0761a51ee0551ad9e5),
May 11 2016.

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

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

- 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.

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

In libcurl version 7.58.0, the allocation size is corrected.

A [patch for
CVE-2018-1000005](https://github.com/curl/curl/commit/fa3dbb9a147488a294.patch)
is available.

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

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

  A - Upgrade curl to version 7.58.0

  B - Apply the patch to your version and rebuild

TIME LINE
---------

It was publicly [reported to the curl
project](https://github.com/curl/curl/issues/2231) 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.

CREDITS
-------

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

Thanks a lot!

-- 

  / daniel.haxx.se
Comment 4 Pedro Monreal Gonzalez 2018-01-24 11:20:32 UTC
Packages submitted for Factory, see requests:

https://build.opensuse.org/request/show/568861
https://build.opensuse.org/request/show/568866
Comment 6 Marcus Meissner 2018-02-08 06:08:42 UTC
fixed