Bug 1155607 - (CVE-2014-8626) CVE-2014-8626 php: xmlrpc ISO8601 date format parsing buffer overflow
CVE-2014-8626 php: xmlrpc ISO8601 date format parsing buffer overflow
Status: CLOSED ERRATA
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
urgent Severity urgent
: ---
: ---
Assigned To: Red Hat Product Security
impact=critical,public=20141105,repor...
: Security
Depends On: 1155019 1156111
Blocks: 1154506
  Show dependency treegraph
 
Reported: 2014-10-22 09:08 EDT by Tomas Hoger
Modified: 2014-11-06 12:59 EST (History)
4 users (show)

See Also:
Fixed In Version: php 5.2.7, php 5.3
Doc Type: Bug Fix
Doc Text:
A stack-based buffer overflow flaw was found in the way the xmlrpc extension parsed dates in the ISO 8601 format. A specially crafted XML-RPC request or response could possibly cause a PHP application to crash or execute arbitrary code with the privileges of the user running that PHP application.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-11-06 12:59:24 EST
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 Tomas Hoger 2014-10-22 09:08:43 EDT
While investigating the CVE-2014-3668 issue (bug 1154503), it was discovered that older PHP versions are affected by another issue in the ISO8601 date format parsing code.  The internal date_from_ISO8601() function failed to check buffer boundary when copying input string to a local fixed sized buffer.

http://git.php.net/?p=php-src.git;a=blob;f=ext/xmlrpc/libxmlrpc/xmlrpc.c;h=d82f270#l164

This leads to a stack based buffer overflow.  A PHP application that uses the PHP xmlrpc extension (in Red Hat Enterprise Linux and Fedora, this extension is available via separate php-xmlrpc package) to implement an XML-RPC server (or client) could crash or, possibly, execute arbitrary code while parsing a specially crafted XML-RPC request.

This problem was fixed upstream in PHP version 5.2.7 via:

http://git.php.net/?p=php-src.git;a=commitdiff;h=c818d0d
https://bugs.php.net/bug.php?id=45226

The actual impact of the fix was apparently not realized upstream, as the fix was only listed as a bug fix, rather than security fix, in the upstream ChangeLog:

http://php.net/ChangeLog-5.php#5.2.7

  Fixed bugs #45226, #18916 (xmlrpc_set_type() segfaults and wrong behavior
  with valid ISO8601 date string). (Jeff Lawsons)

Impact of this issue is mitigated on Red Hat Enterprise Linux 5, where php packages are built with the Stack Protector protection, which lead to early detection of the overflow, leading to application abort before the overwritten saved instruction pointer is used.  The php packages in Red Hat Enterprise Linux 4 are not built with the Stack Protector protection to mitigate the code execution impact.

The php packages in Red Hat Enterprise Linux 6 and later, as well as php53 packages in Red Hat Enterprise Linux 5 are based on the fixed upstream version and were not affected by this issue.
Comment 4 Tomas Hoger 2014-11-06 07:07:33 EST
Statement:

This issue did not affect php53 packages in Red Hat Enterprise Linux 5, php packages in Red Hat Enterprise Linux 6 and 7, and php54-php and php55-php packages in Red Hat Software Collections 1.
Comment 5 Tomas Hoger 2014-11-06 07:08:33 EST
CVE-2014-8626 was assigned to this issue:

http://seclists.org/oss-sec/2014/q4/540
Comment 6 Martin Prpic 2014-11-06 07:34:21 EST
IssueDescription:

A stack-based buffer overflow flaw was found in the way the xmlrpc extension parsed dates in the ISO 8601 format. A specially crafted XML-RPC request or response could possibly cause a PHP application to crash or execute arbitrary code with the privileges of the user running that PHP application.
Comment 7 errata-xmlrpc 2014-11-06 11:47:54 EST
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 4 Extended Lifecycle Support

Via RHSA-2014:1825 https://rhn.redhat.com/errata/RHSA-2014-1825.html
Comment 8 errata-xmlrpc 2014-11-06 12:01:44 EST
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 5

Via RHSA-2014:1824 https://rhn.redhat.com/errata/RHSA-2014-1824.html

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