Bug 1404735 (CVE-2016-9936) - CVE-2016-9936 php: Use After Free in unserialize()
Summary: CVE-2016-9936 php: Use After Free in unserialize()
Keywords:
Status: CLOSED WONTFIX
Alias: CVE-2016-9936
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1404737 1554854
Blocks: 1404738
TreeView+ depends on / blocked
 
Reported: 2016-12-14 14:16 UTC by Adam Mariš
Modified: 2019-09-29 14:02 UTC (History)
14 users (show)

Fixed In Version: php 7.0.14, php 7.1.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-14 14:17:35 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:1296 0 None None None 2018-05-03 05:05:52 UTC

Description Adam Mariš 2016-12-14 14:16:00 UTC
A use-after-free vulnerability was found in unserialize().

Upstream bug:

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

Upstream patch:

https://github.com/php/php-src/commit/b2af4e8868726a040234de113436c6e4f6372d17

CVE assignment:

http://seclists.org/oss-sec/2016/q4/658

Comment 1 Adam Mariš 2016-12-14 14:17:35 UTC
This issue happens when untrusted input is unserialized. Doing so is documented as being unsafe:

  http://php.net/manual/en/function.unserialize.php

  Do not pass untrusted user input to unserialize(). 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 2 Adam Mariš 2016-12-14 14:18:38 UTC
Created php tracking bugs for this issue:

Affects: fedora-all [bug 1404737]

Comment 3 Cedric Buissart 2017-02-21 08:59:50 UTC
This issue happens when untrusted input is unserialized. Doing so is documented as being unsafe: 
http://php.net/manual/en/function.wddx-deserialize.php#refsect1-function.wddx-deserialize-notes

Warning 
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.

Comment 5 errata-xmlrpc 2018-05-03 05:05:43 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


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