Sec Bug->Bug #73719 [Opn]: Suspect memory issue with certain tar.gz file / PharData
| From: | stas@php.net | Date: | Tue, 27 Dec 2016 07:01:46 +0000 |
| Subject: | Sec Bug->Bug #73719 [Opn]: Suspect memory issue with certain tar.gz file / PharData | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-206217@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73719&edit=1
ID: 73719
Updated by: stas@php.net
Reported by: tklingenberg at lastflood dot net
Summary: Suspect memory issue with certain tar.gz file /
PharData
Status: Open
-Type: Security
+Type: Bug
Package: PHAR related
Operating System: Tested on Ubuntu 16.04
PHP Version: 7.0.14
Block user comment: N
Private report: Y
New Comment:
Don't see security problem here.
Previous Comments:
------------------------------------------------------------------------
[2016-12-11 22:29:06] tklingenberg at lastflood dot net
Description:
------------
One user reported an issue that a tar-gz data-file for the Magento application didn't run with
Magerun that uses Composer which then uses the PharData class under the hood.
File in question is:
URL: https://sourceforge.net/projects/mageloads/files/assets/1.9.2.4/magento-sample-data-1.9.2.4.tar.gz
SHASUM: `5ad29dc3df38d21b2407c49f66d5308b01961d60
Creating the instance based on that file:
php -r '$p = new PharData($argv[1]);' -- magento-sample-data-1.9.2.4.tar.gz
Creates the always reproduceable error:
PHP Fatal error: Allowed memory size of -1 bytes exhausted (tried to allocate 18446744073709543424
bytes) in Command line code on line 1
This large number looked suspicious to me so I reported this under security. I have not further
looked into it.
The tar-file itself is somewhat broken, if I verify it on my system I get some errors:
$ tar -tzf magento-sample-data-1.9.2.4.tar.gz >/dev/null
gzip: stdin: decompression OK, trailing garbage ignored
tar: Child returned status 2
tar: Error is not recoverable: exiting now
I hope the information provided is useful.
Ref; https://github.com/netz98/n98-magerun/issues/879
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=73719&edit=1