Bug 1412631 (CVE-2017-5340) - CVE-2017-5340 php: Use of uninitialized memory in unserialize()
Summary: CVE-2017-5340 php: Use of uninitialized memory in unserialize()
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2017-5340
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: 1412647 1412648 1412649 1412650 1412651 1412652 1412653 1412654 1412655 1412656 1412657 1554540
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-12 13:56 UTC by Adam Mariš
Modified: 2021-03-11 14:54 UTC (History)
8 users (show)

Fixed In Version: php 7.0.15, php 7.1.1
Clone Of:
Environment:
Last Closed: 2019-06-08 03:05:25 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š 2017-01-12 13:56:21 UTC
It was found that PHP uses uninitialized memory during calls to `unserialize()`. The payload supplied to `unserialize()` may control this uninitialized memory region and thus may be used to trick PHP into operating on faked objects and calling attacker controlled destructor function pointers, effectively allowing arbitrary code execution.

Upstream bug:

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

Comment 1 Adam Mariš 2017-01-12 14:07:20 UTC
Created php tracking bugs for this issue:

Affects: fedora-all [bug 1412647]

Comment 3 Adam Mariš 2017-01-12 14:10:58 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 5 errata-xmlrpc 2018-05-03 05:05:44 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.