Bug #66960 [Opn->Fbk]: phar long filename crash
| From: | bishop@php.net | Date: | Mon, 08 Jan 2018 01:42:09 +0000 |
| Subject: | Bug #66960 [Opn->Fbk]: phar long filename crash | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-213411@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66960&edit=1
ID: 66960
Updated by: bishop@php.net
Reported by: twratajczak at gmail dot com
Summary: phar long filename crash
-Status: Open
+Status: Feedback
Type: Bug
Package: PHAR related
PHP Version: Irrelevant
-Assigned To:
+Assigned To: bishop
Block user comment: N
Private report: N
New Comment:
I am not seeing this behavior in the 7.1 series on Centos 7. Can you reproduce it in any current PHP
version (as of today, 7.1+)? If so, on what OS and architecture?
Previous Comments:
------------------------------------------------------------------------
[2014-03-26 14:20:37] twratajczak at gmail dot com
Description:
------------
performing file operations through phar:// with filenames over MAXPATHLEN causes crash
*** stack smashing detected ***: php terminated
Test script:
---------------
<?php
$p = new Phar('/tmp/a.phar');
file_exists('phar:///tmp/a.phar/'. str_repeat("a", 4100));
// only for this test case phar.readonly=Off is required
Expected result:
----------------
file_exists returning false
Actual result:
--------------
Program terminated with signal 6, Aborted.
#0 0x00007f5960d9cf77 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 0x00007f5960d9cf77 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00007f5960da05e8 in __GI_abort () at abort.c:90
#2 0x00007f5960dda4fb in __libc_message (do_abort=do_abort@entry=1, fmt=fmt@entry=0x7f5960eebf10
"*** %s ***: %s terminated\n") at ../sysdeps/unix/sysv/linux/libc_fatal.c:199
#3 0x00007f5960e7808c in __GI___fortify_fail (msg=<optimized out>, msg@entry=0x7f5960eebef8
"stack smashing detected") at fortify_fail.c:37
#4 0x00007f5960e78030 in __stack_chk_fail () at stack_chk_fail.c:28
#5 0x00000000004c048f in phar_set_inode (entry=0x7fff95d1c6d0) at
/home/tratajczak/Downloads/php-master-201403261230/ext/phar/phar_internal.h:542
#6 0x6161616161616161 in ?? ()
...
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66960&edit=1