This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 823594 (CVE-2012-2386)

Summary: CVE-2012-2386 php: Integer overflow leading to heap-buffer overflow in the Phar extension
Product: [Other] Security Response Reporter: Jan Lieskovsky <jlieskov>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: fedora, jorton, rpm
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: impact=moderate,public=20120521,reported=20120520,source=oss-security,cvss2=6.8/AV:N/AC:M/Au:N/C:P/I:P/A:P,rhel-5/php=notaffected,rhel-5/php53=affected,rhel-6/php=affected,fedora-all/php=affected,cwe=CWE-190->CWE-122[auto]
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-10 13:37:45 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On: 830727, 830728, 830729, 830730    
Bug Blocks: 823468, 835959, 835960    

Description Jan Lieskovsky 2012-05-21 11:24:38 EDT
An integer overflow, leading to heap-based buffer overflow was found in the way Phar extension of the PHP scripting language processed certain fields by manipulating TAR files. A remote attacker could provide a specially-crafted TAR archive file, which once processed in an PHP application using the Phar extension could lead to denial of service (application crash), or, potentially arbitary code execution with the privileges of the user running the application.

References:
[1] http://0x1byte.blogspot.com/2011/04/php-phar-extension-heap-overflow.html
[2] http://secunia.com/advisories/44335

Upstream bug (private):
[3] https://bugs.php.net/bug.php?id=61065

CVE Request:
[4] http://www.openwall.com/lists/oss-security/2012/05/20/5
Comment 1 Stefan Cornelius 2012-05-21 12:35:42 EDT
Current upstream patch:
http://git.php.net/?p=php-src.git;a=commitdiff;h=a10e778bfb7ce9caa1f91666ddf2705db7982d68
Comment 5 Stefan Cornelius 2012-05-23 04:38:06 EDT
This is CVE-2012-2386.
http://www.openwall.com/lists/oss-security/2012/05/22/10
Comment 6 Stefan Cornelius 2012-05-29 03:36:26 EDT
Upstream patch for the metadata issue:
http://git.php.net/?p=php-src.git;a=commitdiff;h=158d8a6b088662ce9d31e0c777c6ebe90efdc854
Comment 9 errata-xmlrpc 2012-06-27 11:52:34 EDT
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2012:1047 https://rhn.redhat.com/errata/RHSA-2012-1047.html
Comment 10 errata-xmlrpc 2012-06-27 11:53:08 EDT
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6

Via RHSA-2012:1046 https://rhn.redhat.com/errata/RHSA-2012-1046.html
Comment 11 Fedora Update System 2012-06-30 18:07:12 EDT
php-5.4.4-1.fc17, maniadrive-1.2-41.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 12 Fedora Update System 2012-07-02 18:31:34 EDT
php-5.3.14-1.fc16, php-eaccelerator-0.9.6.1-9.fc16.6, maniadrive-1.2-32.fc16.6 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 13 Jan Lieskovsky 2012-08-28 06:09:46 EDT
The phar extension got introduced upstream starting from php 5.3.0 version:
http://php.net/releases/5_3_0.php

This issue did NOT affect the version of the php package, as shipped with Red Hat Enterprise Linux 5 as it did not include support for phar extension yet.
Comment 14 Jan Lieskovsky 2012-08-28 06:15:53 EDT
Statement:

This issue did not affect the version of php as shipped with Red Hat Enterprise Linux 5 as it did not include support for phar extension yet. This issue was addressed in php53 package for Red Hat Enterprise Linux 5 via RHSA-2012:1047 and in php package for Red Hat Enterprise Linux 6 via RHSA-2012:1046.