Bug #69719 [NEW]: Incorrect handling of paths with NULs, related to bug 69353
| From: | thoger at redhat dot com | Date: | Thu, 28 May 2015 12:00:18 +0000 |
| Subject: | Bug #69719 [NEW]: Incorrect handling of paths with NULs, related to bug 69353 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-192964@lists.php.net to get a copy of this message | ||
From: thoger at redhat dot com
Operating system:
PHP version: 5.6.9
Package: *General Issues
Bug Type: Bug
Bug description:Incorrect handling of paths with NULs, related to bug 69353
Description:
------------
Fix for bug 69353 addresses multiple issues of PHP APIs accepting paths
with NUL character and passing truncated paths to underlying libraries.
https://bugs.php.net/bug.php?id=69353
http://git.php.net/?p=php-src.git;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"));'
bool(true)
$ ./sapi/cli/php -r '$d = new DOMDocument();
$d->loadHTMLFile("/etc/issue"); @unlink("output");
$d->saveHTMLFile("output\0extra"); var_dump(file_exists("output"));'
bool(true)
* 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.
--
Edit bug report at https://bugs.php.net/bug.php?id=69719&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69719&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69719&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69719&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=69719&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=69719&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=69719&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=69719&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=69719&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=69719&r=support
Expected behavior: https://bugs.php.net/fix.php?id=69719&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=69719&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=69719&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=69719&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69719&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=69719&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=69719&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=69719&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=69719&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=69719&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=69719&r=mysqlcfg