Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1406712 - (CVE-2016-9586) CVE-2016-9586 curl: printf floating point buffer overflow
CVE-2016-9586 curl: printf floating point buffer overflow
Status: CLOSED WONTFIX
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
low Severity low
: ---
: ---
Assigned To: Red Hat Product Security
impact=low,public=20161221,reported=2...
: Security
Depends On: 1406718 1406716 1406717
Blocks: 1406719
  Show dependency treegraph
 
Reported: 2016-12-21 05:11 EST by Andrej Nemec
Modified: 2018-01-11 07:26 EST (History)
30 users (show)

See Also:
Fixed In Version: curl 7.52.0
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-01-18 18:58:16 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Andrej Nemec 2016-12-21 05:11:52 EST
libcurl's implementation of the printf() functions triggers a buffer overflow
when doing a large floating point output. The bug occurs when the conversion
outputs more than 255 bytes.

The flaw happens because the floating point conversion is using system
functions without the correct boundary checks.

The functions have been documented as deprecated for a long time and users are
discouraged from using them in "new programs" as they are planned to get
removed at a future point. But as the functions are present and there's
nothing preventing users from using them, we expect there to be a certain
amount of existing users in the wild.

If there are any application that accepts a format string from the outside
without necessary input filtering, it could allow remote attacks.

This flaw does not exist in the command line tool.

We are not aware of any exploit of this flaw.

References:

http://seclists.org/oss-sec/2016/q4/719

External References:

https://curl.haxx.se/docs/adv_20161221A.html

Upstream patch:

https://curl.haxx.se/CVE-2016-9586.patch
Comment 1 Andrej Nemec 2016-12-21 05:12:18 EST
Acknowledgments:

Name: Daniel Stenberg
Comment 2 Andrej Nemec 2016-12-21 05:21:36 EST
Created curl tracking bugs for this issue:

Affects: fedora-all [bug 1406716]
Comment 3 Andrej Nemec 2016-12-21 05:21:54 EST
Created mingw-curl tracking bugs for this issue:

Affects: fedora-all [bug 1406717]
Affects: epel-7 [bug 1406718]
Comment 4 Doran Moppert 2016-12-21 22:55:27 EST
This flaw is present in the curl_*printf (curlx_*printf) family of functions, which are not used by curl but are exposed from libcurl.  I can't find any of these functions being used across Enterprise Linux.

To be exposed, third-party code would need to be using these long-deprecated functions, with a floating-point specifier and user-controlled (floating-point) input.  The overflow itself is of a 256-byte stack-allocated buffer, when the decimal expansion of the float exceeds that by up to 70 bytes.  Beyond about 16 digits for a double, the decimal expansion is effectively random so the attacker has very little control over precisely what bytes are written.  I think the chance of ACE can be discounted here.
Comment 5 Kamil Dudka 2016-12-23 03:48:28 EST
upstream commit:

https://github.com/curl/curl/commit/curl-7_51_0-162-g3ab3c16

Note You need to log in before you can comment on or make changes to this bug.