Bug 1351193 (CVE-2016-5873)

Summary: CVE-2016-5873 php-pecl-http: Buffer overflow in HTTP url parsing functions
Product: [Other] Security Response Reporter: Andrej Nemec <anemec>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED UPSTREAM QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: fedora, sardella
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: php_pecl_http 3.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-08 02:56:06 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: 1351194, 1351195    
Bug Blocks:    

Description Andrej Nemec 2016-06-29 12:24:06 UTC
The url parsing functions of the PECL HTTP extension allow overflowing a buffer with data originating from an arbitrary HTTP request. Affected are the parse_*() functions in php_http_url.c that are called from within php_http_url_parse(). Other parsing functions were not tested but might be affected as well.

The problem occurs when non-printable characters contained in an URL are converted into percent-encoding. The state->offset used in these functions is incremented without sufficient checks regarding the size of the allocated state->buffer.

Upstream bug:

https://bugs.php.net/bug.php?id=71719

Upstream patch:

https://github.com/m6w6/ext-http/commit/3724cd76a28be1d6049b5537232e97ac567ae1f5

CVE assignment:

http://seclists.org/oss-sec/2016/q2/622

Comment 1 Andrej Nemec 2016-06-29 12:25:03 UTC
Created php-pecl-http tracking bugs for this issue:

Affects: fedora-all [bug 1351194]
Affects: epel-all [bug 1351195]

Comment 2 Product Security DevOps Team 2019-06-08 02:56:06 UTC
This CVE Bugzilla entry is for community support informational purposes only as it does not affect a package in a commercially supported Red Hat product. Refer to the dependent bugs for status of those individual community products.