Bug 1036830 (CVE-2013-6420)

Summary: CVE-2013-6420 php: memory corruption in openssl_x509_parse()
Product: [Other] Security Response Reporter: Vincent Danen <vdanen>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: urgent Docs Contact:
Priority: urgent    
Version: unspecifiedCC: bleanhar, ccoleman, dmcphers, jdetiber, jialiu, jorton, jrusnack, lmeyer, mmaslano, rcollet, security-response-team, tdawson, tkramer
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: impact=critical,public=20131210,reported=20131202,source=upstream,cvss2=7.5/AV:N/AC:L/Au:N/C:P/I:P/A:P,rhel-3/php=affected,rhel-4/php=affected,rhel-5.3.z/php=affected,rhel-5.6.z/php=affected,rhel-5.9.z/php=affected,rhel-5/php=affected,rhel-5.6.z/php53=affected,rhel-5.9.z/php53=affected,rhel-5/php53=affected,rhel-6.2.z/php=affected,rhel-6.3.z/php=affected,rhel-6.4.z/php=affected,rhel-6/php=affected,rhel-7/php=notaffected,rhscl-1/php54-php=affected,rhscl-1.1/php55-php=affected,openshift-enterprise-1/php=affected,openshift-enterprise-2/php=affected,fedora-all/php=affected,cwe=CWE-130->CWE-119
Fixed In Version: php 5.5.7, php 5.4.23, php 5.3.28 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-11 23:20:08 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On: 1037490, 1037491, 1037492, 1037493, 1037495, 1037496, 1037530, 1037531, 1037532, 1037534, 1037535, 1037536, 1037537, 1037538, 1037540, 1037541, 1037542, 1037563, 1037808, 1037811, 1040276    
Bug Blocks: 1036834    
Attachments:
Description Flags
Proposed patch none

Description Vincent Danen 2013-12-02 12:21:07 EST
Stefan Esser reported a vulnerability in the PHP openssl extension. A memory  corruption flaw was found in the way the openssl_x509_parse() function of the PHP openssl extension parsed X.509 certificates. A remote attacker could use this flaw to provide a malicious self-signed certificate or a certificate signed by a trusted authority to a PHP application using the aforementioned function, causing the application to crash or, possibly, allow the attacker to execute arbitrary code with the privileges of the user running the PHP interpreter. 


Acknowledgements:

Red Hat would like to thank the PHP project for reporting this issue. Upstream acknowledges Stefan Esser as the original reporter of this issue.
Comment 2 Huzaifa S. Sidhpurwala 2013-12-02 21:39:25 EST
This issue has been assigned CVE-2013-6420
Comment 4 Huzaifa S. Sidhpurwala 2013-12-03 02:39:13 EST
Created attachment 831933 [details]
Proposed patch
Comment 12 Vincent Danen 2013-12-10 15:53:26 EST
This has been corrected upstream in git:

http://git.php.net/?p=php-src.git;a=commit;h=c1224573c773b6845e83505f717fbf820fc18415
Comment 13 errata-xmlrpc 2013-12-10 21:26:14 EST
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2013:1814 https://rhn.redhat.com/errata/RHSA-2013-1814.html
Comment 14 errata-xmlrpc 2013-12-10 21:36:11 EST
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5
  Red Hat Enterprise Linux 6

Via RHSA-2013:1813 https://rhn.redhat.com/errata/RHSA-2013-1813.html
Comment 15 errata-xmlrpc 2013-12-10 22:48:10 EST
This issue has been addressed in following products:

  Red Hat Software Collections for RHEL-6

Via RHSA-2013:1815 https://rhn.redhat.com/errata/RHSA-2013-1815.html
Comment 16 Huzaifa S. Sidhpurwala 2013-12-11 00:44:48 EST
Created php tracking bugs for this issue:

Affects: fedora-all [bug 1040276]
Comment 17 errata-xmlrpc 2013-12-11 11:15:58 EST
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5.6 EUS - Server Only
  Red Hat Enterprise Linux 5.9 EUS - Server Only

Via RHSA-2013:1825 https://rhn.redhat.com/errata/RHSA-2013-1825.html
Comment 18 errata-xmlrpc 2013-12-11 11:36:43 EST
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5.3 Long Life
  Red Hat Enterprise Linux 5.6 EUS - Server Only
  Red Hat Enterprise Linux 6.2 EUS - Server and Compute Node Only
  Red Hat Enterprise Linux 6.4 EUS - Server and Compute Node Only
  Red Hat Enterprise Linux 6.3 EUS - Server and Compute Node Only
  Red Hat Enterprise Linux 5.9 EUS - Server Only

Via RHSA-2013:1824 https://rhn.redhat.com/errata/RHSA-2013-1824.html
Comment 19 errata-xmlrpc 2013-12-11 22:51:45 EST
This issue has been addressed in following products:

  Red Hat Enterprise Linux 4 Extended Lifecycle Support
  Red Hat Enterprise Linux 3 Extended Lifecycle Support

Via RHSA-2013:1826 https://rhn.redhat.com/errata/RHSA-2013-1826.html
Comment 20 Vincent Danen 2013-12-12 15:13:16 EST
This has now been corrected in upstream version 5.5.7: http://www.php.net/ChangeLog-5.php#5.5.7
Comment 21 Fedora Update System 2013-12-13 00:03:10 EST
php-5.5.7-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 23 Fedora Update System 2013-12-19 21:04:48 EST
php-5.4.23-1.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 24 Fedora Update System 2013-12-19 21:05:57 EST
php-5.5.7-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 25 Tomas Hoger 2014-02-17 05:00:07 EST
HackerOne report:
https://hackerone.com/reports/523