Bug 1351171 (CVE-2016-5770) - CVE-2016-5770 php: Int/size_t confusion in SplFileObject::fread
Summary: CVE-2016-5770 php: Int/size_t confusion in SplFileObject::fread
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2016-5770
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: 1351180
Blocks: 1351183
TreeView+ depends on / blocked
 
Reported: 2016-06-29 11:53 UTC by Andrej Nemec
Modified: 2021-10-21 00:54 UTC (History)
11 users (show)

Fixed In Version: php 5.5.37, php 5.6.23
Doc Type: If docs needed, set a value
Doc Text:
A type confusion issue was found in the SPLFileObject fread() function. A remote attacker able to submit a specially crafted input to a PHP application, which uses this function, could use this flaw to execute arbitrary code with the privileges of the user running that PHP application.
Clone Of:
Environment:
Last Closed: 2021-10-21 00:54:03 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2750 0 normal SHIPPED_LIVE Moderate: rh-php56 security, bug fix, and enhancement update 2016-11-15 16:40:02 UTC

Description Andrej Nemec 2016-06-29 11:53:20 UTC
An int/size_t confusion can happen in SplFileObject::fread

Upstream bug:

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

Upstream patch:

http://git.php.net/?p=php-src.git;a=commitdiff;h=7245bff300d3fa8bacbef7897ff080a6f1c23eba

CVE assignment:

http://seclists.org/oss-sec/2016/q2/589

Comment 1 Andrej Nemec 2016-06-29 12:05:13 UTC
Created php tracking bugs for this issue:

Affects: fedora-all [bug 1351180]

Comment 2 Fedora Update System 2016-07-02 15:27:16 UTC
php-5.6.23-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 3 Fedora Update System 2016-07-02 19:22:04 UTC
php-5.6.23-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 4 Fedora Update System 2016-07-02 19:27:23 UTC
php-5.6.23-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 5 Huzaifa S. Sidhpurwala 2016-07-14 07:58:53 UTC
Analysis:

int/size_t size confusion causes integer overflow, possibly leading to heap-buffer overflow. Can be triggered by writing specially-crafted value in the fread() function, which is normally script author controlled.

Comment 7 Remi Collet 2016-07-25 13:13:37 UTC
Notice: method SplFileObject::fread have been introduce in PHP 5.5.

So version <= 5.4 are not affected.

Comment 8 errata-xmlrpc 2016-11-15 11:41:47 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.2 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUS

Via RHSA-2016:2750 https://rhn.redhat.com/errata/RHSA-2016-2750.html


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