Bug 1323114 (CVE-2016-4070) - CVE-2016-4070 php: Integer overflow in php_raw_url_encode
Summary: CVE-2016-4070 php: Integer overflow in php_raw_url_encode
Keywords:
Status: CLOSED WONTFIX
Alias: CVE-2016-4070
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1323117
Blocks: 1323121
TreeView+ depends on / blocked
 
Reported: 2016-04-01 10:17 UTC by Adam Mariš
Modified: 2019-12-16 05:36 UTC (History)
15 users (show)

Fixed In Version: php 5.5.34, php 5.6.20, php 7.0.5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-23 11:03:57 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2750 0 normal SHIPPED_LIVE Moderate: rh-php56 security, bug fix, and enhancement update 2016-11-15 16:40:02 UTC

Description Adam Mariš 2016-04-01 10:17:44 UTC
An integer overflow vulnerability was found in php_raw_url_encode function.

Vulnerable code:

PHPAPI char *php_raw_url_encode(char const *s, int len, int *new_length)
{
	register int x, y;
	unsigned char *str;

	str = (unsigned char *) safe_emalloc(3, len, 1);
	for (x = 0, y = 0; len--; x++, y++) {
	str[y] = (unsigned char) s[x];

Upstream bug:

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

Upstream patch:

https://git.php.net/?p=php-src.git;a=commit;h=95433e8e339dbb6b5d5541473c1661db6ba2c451

Comment 1 Adam Mariš 2016-04-01 10:20:48 UTC
Created php tracking bugs for this issue:

Affects: fedora-all [bug 1323117]

Comment 2 Fedora Update System 2016-04-09 14:20:49 UTC
php-5.6.20-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 3 Fedora Update System 2016-04-09 14:22:20 UTC
php-5.6.20-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 5 errata-xmlrpc 2016-11-15 11:50:54 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 6.7 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.2 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUS

Via RHSA-2016:2750 https://rhn.redhat.com/errata/RHSA-2016-2750.html


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