Bug 13050 - PHP segfaults on ZipArchive::addEmptyDir()
Summary: PHP segfaults on ZipArchive::addEmptyDir()
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 4
Hardware: x86_64 Linux
Priority: Normal critical
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 13112
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-19 16:46 CET by Howard Miller
Modified: 2014-04-04 19:56 CEST (History)
1 user (show)

See Also:
Source RPM: libzip-0.11.1-2.mga4.src.rpm
CVE:
Status comment:


Attachments

Description Howard Miller 2014-03-19 16:46:54 CET
Description of problem:

segfault when addEmptyDir() is called. 

Version-Release number of selected component (if applicable): php -v
PHP 5.5.8 (cli) (built: Jan 18 2014 20:30:53) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
    with Zend OPcache v7.0.3-dev, Copyright (c) 1999-2013, by Zend Technologies
    with Suhosin v0.9.33, Copyright (c) 2007-2012, by SektionEins GmbH


How reproducible: 100%. Tried will lots of options on two different installations with both web and cli PHP


Steps to Reproduce:
Minimum script...

<?php
$za = new ZipArchive();
$flags = ZIPARCHIVE::CREATE;
$result = $za->open("/tmp/test.zip", $flags);
var_dump($result);
$za->addEmptyDir('activities/');

Reproducible: 

Steps to Reproduce:
Howard Miller 2014-03-20 10:14:16 CET

Source RPM: (none) => php-zip-5.5.8-2.mga4.x86_64

Comment 1 Howard Miller 2014-03-20 11:54:49 CET
I ran the php tests (in the php-devel rpm) and found the individual test for this feature..

run-tests.php extensions/zip/tests/oo_addemptydir.phpt

and (not surprisingly) it fails as well.
Comment 2 David Walser 2014-04-04 01:17:16 CEST
Please test the libzip update candidate in Bug 13112 and let us know (on that bug) if it fixes this issue.

CC: (none) => luigiwalser

Comment 3 David Walser 2014-04-04 18:53:32 CEST
I've confirmed your issue, and confirmed myself that on Mageia 4 i586, the libzip update does fix it.  Thanks for the report.  Since you're running x86_64, it'd be helpful if you could confirm the fix as well (on Bug 13112).

Depends on: (none) => 13112

David Walser 2014-04-04 18:55:52 CEST

Source RPM: php-zip-5.5.8-2.mga4.x86_64 => libzip-0.11.1-2.mga4.src.rpm

Comment 4 David Walser 2014-04-04 19:56:43 CEST
The update was pushed in Bug 13112:
http://advisories.mageia.org/MGASA-2014-0164.html

Thanks again for the report.

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.