Bug 494531 (CVE-2009-1272)

Summary: CVE-2009-1272 php: crash when extracting zip file with relative paths
Product: [Other] Security Response Reporter: Tomas Hoger <thoger>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: fedora, jorton, rpm
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-06-16 07:05:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 487371    
Bug Blocks: 474824    

Description Tomas Hoger 2009-04-07 10:59:23 UTC
PHP 5.2.9 upstream release notes mention following security fix:

  Fixed a crash on extract in zip when files or directories entry names
  contain a relative path. (Pierre)

  http://www.php.net/releases/5_2_9.php

Upstream commit:
http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.1.2.48&r2=1.1.2.49

Note: This fix is related to CVE-2008-5658, as the checking was only introduced as part of that patch.

Comment 1 Joe Orton 2009-04-07 12:24:30 UTC
Just noting that CVE-2008-5658 is bug 474824.

Comment 2 Tomas Hoger 2009-04-09 07:37:36 UTC
CVE-2009-1272:
The php_zip_make_relative_path function in php_zip.c in PHP 5.2.x
before 5.2.9 allows context-dependent attackers to cause a denial of
service (crash) via a ZIP file that contains filenames with relative
paths, which is not properly handled during extraction.

Comment 3 Tomas Hoger 2009-06-16 07:05:31 UTC
Proper fix for CVE-2008-5658 was used in Red Hat Applications Stacks v2 updates.  PHP packages in Red Hat Enterprise Linux 2.1, 3, 4, and 5, and Red Hat Applications Stacks v1 were not affected by this flaw.

All Fedora versions are updated to 5.2.9 now.