Bug 1375906 (CVE-2016-7167)

Summary: CVE-2016-7167 curl: escape and unescape integer overflows
Product: [Other] Security Response Reporter: Adam Mariš <amaris>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: bmcclain, bodavis, cfergeau, csutherl, dbhole, dblechte, dmoppert, eedri, erik-fedora, gzaronik, jclere, kanderso, kdudka, ksrot, lsurette, mbabacek, mgoldboi, michal.skrivanek, mturk, omajid, paul, rh-spice-bugs, rwagner, sardella, sherold, slawomir, srevivo, szidek, twalsh, ykaul
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: curl 7.50.3 Doc Type: If docs needed, set a value
Doc Text:
Multiple integer overflow flaws leading to heap-based buffer overflows were found in the way curl handled escaping and unescaping of data. An attacker could potentially use these flaws to crash an application using libcurl by sending a specially crafted input to the affected libcurl functions.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-08 02:58:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1375907, 1375908, 1375909, 1377578    
Bug Blocks: 1375910    

Description Adam Mariš 2016-09-14 08:41:03 UTC
It was found that provided string length arguments in four libcurl functions curl_escape(), curl_easy_escape(), curl_unescape and curl_easy_unescape 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.

This flaw does not affect the curl command line tool.

Affected versions: libcurl 7.11.1 to and including 7.50.2

External References:

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

Comment 1 Adam Mariš 2016-09-14 08:42:28 UTC
Created curl tracking bugs for this issue:

Affects: fedora-all [bug 1375907]

Comment 2 Adam Mariš 2016-09-14 08:42:45 UTC
Created mingw-curl tracking bugs for this issue:

Affects: fedora-all [bug 1375908]
Affects: epel-7 [bug 1375909]

Comment 3 Dhiru Kholia 2016-09-15 07:34:17 UTC
Upstream patch:

https://curl.haxx.se/CVE-2016-7167.patch

Comment 20 errata-xmlrpc 2017-08-01 17:03:18 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2017:2016 https://access.redhat.com/errata/RHSA-2017:2016

Comment 22 errata-xmlrpc 2018-08-16 16:06:25 UTC
This issue has been addressed in the following products:

  Red Hat JBoss Core Services

Via RHSA-2018:2486 https://access.redhat.com/errata/RHSA-2018:2486

Comment 23 errata-xmlrpc 2018-11-13 08:32:23 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 6
  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUS

Via RHSA-2018:3558 https://access.redhat.com/errata/RHSA-2018:3558