Bug 1412245 (CVE-2016-7478) - CVE-2016-7478 php: Unserialize Exception object can lead to infinite loop
Summary: CVE-2016-7478 php: Unserialize Exception object can lead to infinite loop
Keywords:
Status: CLOSED WONTFIX
Alias: CVE-2016-7478
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:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-11 15:35 UTC by Adam Mariš
Modified: 2019-09-29 14:03 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-11 15:37:22 UTC


Attachments (Terms of Use)

Description Adam Mariš 2017-01-11 15:35:34 UTC
It was found that specially crafted input to unserialize, an exception object which refers to itself as the previous exception, may cause exception::__toString never to terminate, causing infinite loop.

Upstream bug:

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

External Reference:

https://blog.checkpoint.com/wp-content/uploads/2016/12/PHP_Technical_Report.pdf

Comment 1 Adam Mariš 2017-01-11 15:37:22 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.


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