Bug 1260734

Summary: php: new DateTimeZone($foo) is ignoring text after null byte
Product: [Other] Security Response Reporter: Adam Mariš <amaris>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED NOTABUG QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: bleanhar, ccoleman, dmcphers, fedora, jdetiber, jialiu, jkeck, jokerman, jorton, kseifried, lmeyer, mmaslano, mmccomas, rcollet, webstack-team
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: php 5.6.13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-28 12:42:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1260760    
Bug Blocks: 1260756    

Description Adam Mariš 2015-09-07 14:38:21 UTC
The DateTimeZone constructors are not binary safe. They're parsing the timezone as string, but discard the length when calling timezone_initialize().

Upstream report:

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

Upstream patch:

http://git.php.net/?p=php-src.git;a=commit;h=bb057498f7457e8b2eba98332a3bad434de4cf12

Comment 1 Remi Collet 2015-09-07 14:48:55 UTC
As state in 70277, this bug is not considered by upstream as a security issue, and have not be fixed in 5.4 / 5.5 (security only branches)

Even if trailing char are present (this usually should be not validated user input), there is no risk.

Comment 2 Adam Mariš 2015-09-07 16:12:45 UTC
Created php tracking bugs for this issue:

Affects: fedora-all [bug 1260760]

Comment 3 Fedora Update System 2015-09-14 22:19:27 UTC
php-5.6.13-1.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.

Comment 4 Fedora Update System 2015-09-14 23:18:32 UTC
php-5.6.13-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 5 Fedora Update System 2015-09-18 18:38:47 UTC
php-5.6.13-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 6 Tomas Hoger 2015-09-28 12:42:35 UTC
Not considered to be a security issue, as noted in comment 1 above and in the upstream bug.