Bug 1340742 (CVE-2016-5095)

Summary: CVE-2016-5095 php: Integer overflow in php_filter_full_special_chars
Product: [Other] Security Response Reporter: Adam Mariš <amaris>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: abhgupta, anemec, dmcphers, fedora, hhorak, jialiu, jokerman, jorton, kseifried, lmeyer, mmccomas, rcollet, tiwillia, webstack-team
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-09 08:57:43 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: 1340745    
Bug Blocks: 1339953    

Description Adam Mariš 2016-05-30 08:41:30 UTC
An integer overflow in php_filter_full_special_chars was found, similar to CVE-2016-5094.

Reported in comment for the bug:

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

CVE assignment:

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

Comment 1 Adam Mariš 2016-05-30 08:47:08 UTC
Created php tracking bugs for this issue:

Affects: fedora-all [bug 1340745]

Comment 2 Fedora Update System 2016-06-03 15:22:02 UTC
php-5.6.22-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 Tomas Hoger 2016-06-09 08:57:43 UTC
While the affected code was added in PHP 5.3.3:

https://github.com/php/php-src/commit/a5b5743d71fbd5ae944469a1ca443a1cdb30663a

it wasn't actually used because of the incorrect FILTER_SANITIZE_FULL_SPECIAL_CHARS constant definition, which was only corrected in PHP 5.4.18 and 5.5.2:

https://github.com/php/php-src/commit/da3886de6dc8edab3da14331227816d6ca8e9b96

This issue is similar to CVE-2016-5094, so the impact and mitigation notes in bug 1340738 comment 3 are applicable here.  This could only affect PHP installations where no or very high memory_limit is set.  The default limit in Red Hat PHP packages in 128M, and hence the default configuration is not affected.

This issue has not been addressed upstream to date.