Bug 1154941 (CVE-2014-3707)
Summary: | CVE-2014-3707 curl: incorrect handle duplication after COPYPOSTFIELDS | ||||||
---|---|---|---|---|---|---|---|
Product: | [Other] Security Response | Reporter: | Murray McAllister <mmcallis> | ||||
Component: | vulnerability | Assignee: | Red Hat Product Security <security-response-team> | ||||
Status: | CLOSED ERRATA | QA Contact: | |||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | unspecified | CC: | acathrow, anemec, bazulay, bmcclain, carnil, cfergeau, dblechte, erik-fedora, gklein, idith, iheim, kdudka, lsurette, michal.skrivanek, paul, rbalakri, rh-spice-bugs, security-response-team, sisharma, slawomir, srevivo, weli, ykaul | ||||
Target Milestone: | --- | Keywords: | Security | ||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | curl 7.39.0 | Doc Type: | Bug Fix | ||||
Doc Text: |
A flaw was found in the way the libcurl library performed the duplication of connection handles. If an application set the CURLOPT_COPYPOSTFIELDS option for a handle, using the handle's duplicate could cause the application to crash or disclose a portion of its memory.
|
Story Points: | --- | ||||
Clone Of: | Environment: | ||||||
Last Closed: | 2016-07-11 09:04:18 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: | 1160724, 1160725, 1175776, 1215062 | ||||||
Bug Blocks: | 1154942, 1193283, 1210268 | ||||||
Attachments: |
|
Description
Murray McAllister
2014-10-21 05:12:02 UTC
Created attachment 948796 [details]
preliminary patch from upstream
This issue affects applications that set CURLOPT_COPYPOSTFIELDS options on a curl handle a subsequently duplicate the handle (using curl_easy_duphandle()). During the handle duplication, libcurl may read memory outside of the bounds of allocated buffer if POST data set using CURLOPT_COPYPOSTFIELDS was not NUL terminated. The out of bounds access occurs in strdup()/strlen(). This can cause crash if unmapped memory is reached before NUL byte is found, but such crash is unlikely. Due to another bug in the handle duplication code, POST data in the copied handle is not used even if no new POST data are set before performing the request. Instead, data from the buffer associated with the original handle is used. Therefore, if the original handle is freed, or if new POST data is set on it between duplication and the use of the new handle, libcurl may use data from an already freed buffer. There are no applications in Red Hat Enterprise Linux that uses libcurl in the way that would make them vulnerable to this issue. The CURLOPT_COPYPOSTFIELDS option is only used by PHP, when PHP script sets CURLOPT_POSTFIELDS option with data that is not array or object. As string arguments used with PHP curl_setopt(CURLOPT_POSTFIELDS) are unlikely to be NUL terminated, strdup() out of bounds read is likely to happen in curl_copy_handle(). Upstream advisory lists curl versions 7.17.1 and later to be affected by this problem. The version 7.17.1 is the one that introduced the CURLOPT_COPYPOSTFIELDS option. The curl packages in Red Hat Enterprise Linux 5 and earlier are based on older upstream curl versions and hence were not affected by this issue. This issue is now public. External Reference: http://curl.haxx.se/docs/adv_20141105.html fixed in curl-7.39.0-1.fc22 fixed in curl-7.37.0-9.fc21 fixed in curl-7.32.0-15.fc20 fixed in curl-7.29.0-25.fc19 Created mingw-curl tracking bugs for this issue: Affects: fedora-all [bug 1160724] Affects: epel-7 [bug 1160725] curl-7.37.0-9.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report. curl-7.32.0-15.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report. Statement: This issue does not affect the versions of curl as shipped with Red Hat Enterprise Linux 5. Note that there are no applications provided with Red Hat Enterprise Linux that use the vulnerable CURLOPT_COPYPOSTFIELDS option, except PHP which could only be affected if used in an extremely unlikely scenario or via the script's author. curl-7.32.0-16.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report. curl-7.32.0-17.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report. curl-7.37.0-11.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report. curl-7.29.0-27.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report. This issue has been addressed in the following products: Red Hat Enterprise Linux 6 Via RHSA-2015:1254 https://rhn.redhat.com/errata/RHSA-2015-1254.html This issue has been addressed in the following products: Red Hat Enterprise Linux 7 Via RHSA-2015:2159 https://rhn.redhat.com/errata/RHSA-2015-2159.html |