Bug 1260711 - (CVE-2015-6837, CVE-2015-6838) CVE-2015-6837 CVE-2015-6838 php: NULL pointer dereference in XSLTProcessor class
CVE-2015-6837 CVE-2015-6838 php: NULL pointer dereference in XSLTProcessor class
Status: CLOSED WONTFIX
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
low Severity low
: ---
: ---
Assigned To: Red Hat Product Security
impact=low,public=20150609,reported=2...
: Security
Depends On: 1260712 1305856 1305857
Blocks: 1260756 1306180
  Show dependency treegraph
 
Reported: 2015-09-07 09:47 EDT by Adam Mariš
Modified: 2016-03-15 16:57 EDT (History)
17 users (show)

See Also:
Fixed In Version: php 5.4.45, php 5.5.29, php 5.6.13
Doc Type: Bug Fix
Doc Text:
A NULL pointer dereference flaw was found in the XSLTProcessor class in PHP. An attacker could use this flaw to cause a PHP application to crash if it performed Extensible Stylesheet Language (XSL) transformations using untrusted XSLT files and allowed the use of PHP functions to be used as XSLT functions within XSL stylesheets.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-10-12 17:14:22 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Adam Mariš 2015-09-07 09:47:34 EDT
The XSLTProcessor class misses a few checks on the input from the libxslt library. The valuePop() function call is able to return NULL pointer and php does not check that.

Upstream report:

https://bugs.php.net/bug.php?id=69782

Upstream patch:

http://git.php.net/?p=php-src.git;a=commit;h=1744be2d17befc69bf00033993f4081852a747d6
Comment 1 Adam Mariš 2015-09-07 09:48:02 EDT
Created php tracking bugs for this issue:

Affects: fedora-all [bug 1260712]
Comment 2 Adam Mariš 2015-09-09 05:11:02 EDT
CVE assignment:

http://seclists.org/oss-sec/2015/q3/524
Comment 3 Fedora Update System 2015-09-14 18:19:18 EDT
php-5.6.13-1.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.
Comment 4 Fedora Update System 2015-09-14 19:18:50 EDT
php-5.6.13-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
Comment 5 Fedora Update System 2015-09-18 14:37:43 EDT
php-5.6.13-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 7 Tomas Hoger 2015-10-12 17:14:22 EDT
This issue is triggered by a specially-crafted / malicious Extensible Stylesheet Language (XSL).  Additionally, it requires XSLTProcessor to allow the use of PHP functions as XSLT functions (see XSLTProcessor::registerPHPFunctions).

The use of untrusted XSLTs has its own security concerns even without the ability to call PHP functions and without this flaw - they may allow DoS, XSS, or file content disclosure attacks.  When unrestricted use of PHP functions is allowed, this flaw should not be assume to cross any trust boundary.

As this flaw triggers NULL pointer dereference, its impact is limited to crash of the PHP interpreter.  When PHP is used with httpd using mod_php, crash may only impact attacker's own request (when using prefork mpm, which is still the default in Red Hat Enterprise Linux) or requests of several other uses (when using worker or event mpm).

In Red Hat Enterprise Linux and Fedora, the affected xsl extension is packaged in a separate sub-package php-xml.  Systems without the php-xml installed can not be affected by this issue.

Note that this actually triggers a bug in libxml2 library that was fixed upstream in version 2.9.2 using this commit:

https://git.gnome.org/browse/libxml2/commit/?id=03c6723043775122313f107695066e5744189a08

PHP was correctly assuming that libxml2's valuePop() should not return NULL.

Statement:

Red Hat Product Security has rated this issue as having Low security impact. This issue is not currently planned to be addressed in future updates. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.
Comment 9 errata-xmlrpc 2016-03-15 16:57:48 EDT
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7.1 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.2 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6.6 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6

Via RHSA-2016:0457 https://rhn.redhat.com/errata/RHSA-2016-0457.html

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