Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 593716 (CVE-2016-7167) - <net-misc/curl-7.50.3: escape and unescape integer overflows (CVE-2016-7167)
Summary: <net-misc/curl-7.50.3: escape and unescape integer overflows (CVE-2016-7167)
Status: RESOLVED FIXED
Alias: CVE-2016-7167
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Gentoo Security
URL: https://curl.haxx.se/docs/adv_2016091...
Whiteboard: A2 [glsa cve]
Keywords:
Depends on:
Blocks: CVE-2016-5419, CVE-2016-5420, CVE-2016-5421 CVE-2016-7141
  Show dependency tree
 
Reported: 2016-09-14 09:34 UTC by Agostino Sarubbo
Modified: 2017-01-19 19:29 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2016-09-14 09:34:15 UTC
From ${URL} :

The four libcurl functions curl_escape(), curl_easy_escape(), curl_unescape and curl_easy_unescape perform string URL percent escaping and unescaping. 
They accept custom string length inputs in signed integer arguments. (The functions having names without "easy" being the deprecated versions of the 
others.)

The provided string length arguments were not properly checked and due to arithmetic in the functions, passing in the length 0xffffffff (2^32-1 or 
UINT_MAX or even just -1) would end up causing an allocation of zero bytes of heap memory that curl would attempt to write gigabytes of data into.

The use of 'int' for this input type in the API is of course unwise but has remained so in order to maintain the API over the years.

This flaw exists in the following libcurl versions:
Affected versions: libcurl 7.11.1 to and including 7.50.2
Not affected versions: libcurl < 7.11.1 and libcurl >= 7.50.3



@maintainer(s): after the bump, in case we need to stabilize the package, please let us know if it is ready for the stabilization or not.
Comment 1 Anthony Basile gentoo-dev 2016-09-15 08:25:58 UTC
Okay curl-7.50.3 is now in the tree and ready for stabilization:

KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86"
Comment 2 Yury German Gentoo Infrastructure gentoo-dev 2016-09-16 00:16:18 UTC
Arches, please test and mark stable:

=net-misc/curl-7.50.3

Target Keywords : "alpha amd64 arm hppa ia64 ppc ppc64 sparc x86"

Thank you!
Comment 3 Agostino Sarubbo gentoo-dev 2016-09-16 08:40:16 UTC
amd64 stable
Comment 4 Tobias Klausmann (RETIRED) gentoo-dev 2016-09-17 09:52:09 UTC
Stable on alpha.
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2016-09-18 18:20:48 UTC
Stable for PPC64.
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2016-09-18 19:44:32 UTC
Stable for HPPA.
Comment 7 Markus Meier gentoo-dev 2016-09-24 19:28:34 UTC
arm stable
Comment 8 Agostino Sarubbo gentoo-dev 2016-09-29 08:43:26 UTC
x86 stable
Comment 9 Agostino Sarubbo gentoo-dev 2016-09-29 09:38:23 UTC
sparc stable
Comment 10 Agostino Sarubbo gentoo-dev 2016-09-29 12:39:10 UTC
ppc stable
Comment 11 Agostino Sarubbo gentoo-dev 2016-09-29 13:31:36 UTC
ia64 stable.

Maintainer(s), please cleanup.
Security, please add it to the existing request, or file a new one.
Comment 12 Anthony Basile gentoo-dev 2016-09-29 15:46:32 UTC
(In reply to Agostino Sarubbo from comment #11)
> ia64 stable.
> 
> Maintainer(s), please cleanup.
> Security, please add it to the existing request, or file a new one.

done
Comment 13 GLSAMaker/CVETool Bot gentoo-dev 2017-01-19 19:29:21 UTC
This issue was resolved and addressed in
 GLSA 201701-47 at https://security.gentoo.org/glsa/201701-47
by GLSA coordinator Thomas Deutschmann (whissi).