Bug 1471834 (CVE-2017-11145)

Summary: CVE-2017-11145 php: wddx_deserialize() heap out-of-bound read via php_parse_date()
Product: [Other] Security Response Reporter: Adam Mariš <amaris>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: abhgupta, fedora, hhorak, jorton, kseifried, psampaio, rcollet, tiwillia, webstack-team
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: php 5.6.31, php 7.0.21, php 7.1.7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-21 08:15:14 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: 1471856, 1554537    
Bug Blocks: 1491035    

Description Adam Mariš 2017-07-17 14:11:56 UTC
In PHP before 5.6.31, 7.x before 7.0.21, and 7.1.x before 7.1.7, lack
of a bounds check in the date extension's timelib_meridian parsing code
could be used by attackers able to supply date strings to leak
information from the interpreter, related to an
ext/date/lib/parse_date.c out-of-bounds read affecting the
php_parse_date function.

Upstream bug:

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

Upstream patch:

https://gist.github.com/anonymous/bd77ac90d3bdf31ce2a5251ad92e9e75

Comment 1 Martin Prpič 2017-07-17 14:34:29 UTC
Created php tracking bugs for this issue:

Affects: fedora-all [bug 1471856]

Comment 2 Adam Mariš 2017-07-21 08:15:14 UTC
This issue happens when untrusted input is deserialized. Doing so is documented as being unsafe:

http://php.net/manual/en/function.wddx-deserialize.php

Do not pass untrusted user input to wddx_deserialize(). Unserialization can result in code being loaded and executed due to object instantiation and autoloading, and a malicious user may be able to exploit this. Use a safe, standard data interchange format such as JSON (via json_decode() and json_encode()) if you need to pass serialized data to the user.

Comment 3 Tomas Hoger 2018-03-12 21:49:32 UTC
The CVE-2017-11146 was rejected as:

"""
This candidate was withdrawn by its CNA. Further investigation showed that it was not an independently fixable security issue relative to CVE-2017-11145.
"""

Comment 5 errata-xmlrpc 2018-05-03 05:07:41 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 6
  Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUS

Via RHSA-2018:1296 https://access.redhat.com/errata/RHSA-2018:1296