Bug #68791 [Ana->Csd]: Insecure temp file creation
| From: | remi@php.net | Date: | Wed, 04 Mar 2020 11:11:03 +0000 |
| Subject: | Bug #68791 [Ana->Csd]: Insecure temp file creation | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-225879@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=68791&edit=1
ID: 68791
Updated by: remi@php.net
Reported by: bugreports at internot dot info
Summary: Insecure temp file creation
-Status: Analyzed
+Status: Closed
Type: Bug
Package: Zip Related
Operating System: Linux Ubuntu 14.04
PHP Version: master-Git-2015-01-10 (Git)
-Assigned To:
+Assigned To: remi
Block user comment: N
Private report: N
New Comment:
Closing as 5.x is now EOL, PHP 7.2/7.3 have libzip 1.1.2, and since 7.4, libzip is no more bundled.
Previous Comments:
------------------------------------------------------------------------
[2016-09-05 18:44:44] cmb@php.net
Actually, this is a libzip issue that has been fixed as of libzip
1.0 (at least)[1], and PHP 7 already has at least libzip 1.0.1.
PHP 5.6, however, still ships with libzip 0.11.2, so the fix needs
to be backported. The respective mkstemp() call is in
zip_close.c[2].
[1] <http://hg.nih.at/libzip/rev/d3ac0a768127>
[2] <https://github.com/php/php-src/blob/PHP-5.6.26/ext/zip/lib/zip_close.c#L613>
------------------------------------------------------------------------
[2015-01-10 17:17:40] bugreports at internot dot info
Description:
------------
Hi,
In /ext/zip/lib/zip_close.c:
613 if ((tfd=mkstemp(temp)) == -1) {
mkstemp is called, but the umask is not securely set first.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=68791&edit=1