Bug 617673 (CVE-2010-2531)

Summary: CVE-2010-2531 php: information leak vulnerability in var_export()
Product: [Other] Security Response Reporter: Vincent Danen <vdanen>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: jlieskov, jorton, tis
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: 2012-06-20 16:57:19 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: 624469, 626733, 626734, 626735, 626736, 626740    
Bug Blocks:    

Description Vincent Danen 2010-07-23 17:31:15 UTC
The upstream PHP 5.2.14 and 5.3.3 releases corrected an information disclosure flaw where the var_export() function would disclose data if a fatal error occurred due to recursion, memory_limit, or execution time.  The buffer is never cleared and is flushed to the user, regardless of the configured display_errors setting, because it is considered part of the output.  This could lead to a disclosure of possibly sensitive information.

The name CVE-2010-2531 has been assigned to this issue.

An example to test:

% cat test.php
#!/usr/bin/php
<?php
@$obj->p =& $obj;
var_export($obj, true);
?>
% php test.php
PHP Fatal error:  Nesting level too deep - recursive dependency? in test.php on line 4
stdClass::__set_state(array(
   'p' => 
  stdClass::__set_state(array(
     'p' => 
    stdClass::__set_state(array(
       'p' => 
      stdClass::__set_state(array(
% cat test2.php
#!/usr/bin/php
<?php
$a[] =& $a;
var_export($a, true);
?>
% php test2.php
PHP Fatal error:  Nesting level too deep - recursive dependency? in test.php on line 4
array (
  0 => 
  array (
    0 => 
    array (
      0 => 
      array (
        0 => 
        array (


The upstream changes prevent any output from displaying, so should only display the "PHP Fatal error".

The upstream fix:

http://svn.php.net/viewvc?view=revision&revision=301143

Comment 2 Vincent Danen 2010-07-23 17:41:18 UTC
This issue affects the versions of the php package, as shipped with Red Hat Enterprise Linux 3, 4, and 5.

This issue affects the versions of the php package, as shipped with Fedora release 12 and 13 (although 5.3.3-1 is currently an updates candidate).

Comment 5 errata-xmlrpc 2010-11-29 21:34:01 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 4
  Red Hat Enterprise Linux 5

Via RHSA-2010:0919 https://rhn.redhat.com/errata/RHSA-2010-0919.html

Comment 6 Vincent Danen 2010-11-29 22:38:24 UTC
Statement:

This issue is not planned to be fixed in Red Hat Enterprise Linux 3 due to this product being in Production 3 of its maintenance life-cycle, where only qualified security errata of important and critical impact are addressed.

For further information about the Errata Support Policy, visit:
http://www.redhat.com/security/updates/errata