|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Sec Bug #69719 Incorrect handling of paths with NULs, related to bug 69353
Submitted: 2015-05-28 12:00 UTC Modified: 2016-02-11 12:48 UTC
From: thoger at redhat dot com Assigned: stas (profile)
Status: Closed Package: *General Issues
PHP Version: 5.6.9 OS:
Private report: No CVE-ID: 2015-4598
 [2015-05-28 12:00 UTC] thoger at redhat dot com
Fix for bug 69353 addresses multiple issues of PHP APIs accepting paths with NUL character and passing truncated paths to underlying libraries.;a=commitdiff;h=52b93f0cfd3cba7ff98cc5198df6ca4f23865f80

Reviewing the changes, I noticed following inconsistencies:

* DOMDocument's load functions were fixed, but not save:

$ ./sapi/cli/php -r '$d = new DOMDocument(); $d->loadHTMLFile("/etc/issue"); @unlink("output"); $d->save("output\0extra"); var_dump(file_exists("output"));'

$ ./sapi/cli/php -r '$d = new DOMDocument(); $d->loadHTMLFile("/etc/issue"); @unlink("output"); $d->saveHTMLFile("output\0extra"); var_dump(file_exists("output"));'

* GD imagepsencodefont() was fixed. That has to be called after imagepsloadfont() and that still passes 's' format to zend_parse_parameters().  I've not tested this one as I don't have build with Type1 font support available.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-05-28 18:11 UTC]
-Type: Bug +Type: Security -Private report: No +Private report: Yes
 [2015-06-10 04:40 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: stas
 [2015-06-10 04:40 UTC]
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at

 For Windows:
Thank you for the report, and for helping us make PHP better.

 [2015-06-10 07:42 UTC]
Automatic comment on behalf of stas
Log: Fix #69719 - more checks for nulls in paths
 [2015-06-10 08:50 UTC]
Automatic comment on behalf of stas
Log: Fix #69719 - more checks for nulls in paths
 [2015-06-10 09:15 UTC]
Automatic comment on behalf of stas
Log: Fix #69719 - more checks for nulls in paths
 [2016-02-11 12:48 UTC]
-CVE-ID: +CVE-ID: 2015-4598
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Feb 26 06:01:25 2024 UTC