Bug 1155607 (CVE-2014-8626) - CVE-2014-8626 php: xmlrpc ISO8601 date format parsing buffer overflow
Summary: CVE-2014-8626 php: xmlrpc ISO8601 date format parsing buffer overflow
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2014-8626
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
urgent
urgent
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1155019 1156111
Blocks: 1154506
TreeView+ depends on / blocked
 
Reported: 2014-10-22 13:08 UTC by Tomas Hoger
Modified: 2019-09-29 13:23 UTC (History)
4 users (show)

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.
Clone Of:
Environment:
Last Closed: 2014-11-06 17:59:24 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2014:1824 normal SHIPPED_LIVE Important: php security update 2014-11-06 21:59:32 UTC
Red Hat Product Errata RHSA-2014:1825 normal SHIPPED_LIVE Critical: php security update 2014-11-06 21:47:24 UTC

Description Tomas Hoger 2014-10-22 13:08:43 UTC
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 12:07:33 UTC
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 12:08:33 UTC
CVE-2014-8626 was assigned to this issue:

http://seclists.org/oss-sec/2014/q4/540

Comment 6 Martin Prpič 2014-11-06 12:34:21 UTC
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 16:47:54 UTC
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 17:01:44 UTC
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.