Bug 1473822 (CVE-2017-7890) - CVE-2017-7890 php: Buffer over-read from unitialized data in gdImageCreateFromGifCtx function
Summary: CVE-2017-7890 php: Buffer over-read from unitialized data in gdImageCreateFro...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2017-7890
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:
: 1562758 (view as bug list)
Depends On: 1473823 1536012 1537128 1554537
Blocks: 1491035 1493963
TreeView+ depends on / blocked
 
Reported: 2017-07-21 19:15 UTC by Pedro Sampaio
Modified: 2019-09-29 14:16 UTC (History)
10 users (show)

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:
A data leak was found in gdImageCreateFromGifCtx() in GD Graphics Library used in PHP before 5.6.31 and 7.1.7. An attacker could craft a malicious GIF image and read up to 762 bytes from stack.
Clone Of:
Environment:
Last Closed: 2019-06-08 03:17:40 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:0406 normal SHIPPED_LIVE Moderate: php security update 2018-03-07 02:54:43 UTC
Red Hat Product Errata RHSA-2018:1296 None None None 2018-05-03 05:07:59 UTC

Description Pedro Sampaio 2017-07-21 19:15:32 UTC
A flaw was found in php. The GIF decoding function gdImageCreateFromGifCtx in gd_gif_in.c (which can be reached with a call to the imagecreatefromstring() function) uses constant-sized color tables of size 3 * 256, but does not zero-out these arrays before use. This flaw could lead to a information leak through a specially crafted image with bogus color table.

Upstream bug:

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

Upstream patch:

http://git.php.net/?p=php-src.git;a=commit;h=018092125538782b25d3ab6b036f0c8d5968f757
http://git.php.net/?p=php-src.git;a=commit;h=8dc4f4dc9e44d1cbfe4654aa6e0dc27c94913938
https://bugs.php.net/patch-display.php?bug=74435&patch=fix-74435-php-7.0&revision=1497970038

References:

http://php.net/ChangeLog-5.php

Comment 1 Pedro Sampaio 2017-07-21 19:16:06 UTC
Created php tracking bugs for this issue:

Affects: fedora-all [bug 1473823]

Comment 2 Raphael Sanchez Prudencio 2017-10-25 16:20:36 UTC
Statement:

Red Hat Product Security has rated this issue as having Moderate security impact. This issue is not currently planned to be addressed in future updates. We recommend avoiding usage of the functions gdImageCreateFromGifCtx() and imagecreatefromstring() as they can lead to stack data leak.

For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.

Comment 3 Ravindra Patil 2018-01-05 17:47:32 UTC
Is it possible to get more details on why this issue would not be fixed ?

Comment 8 errata-xmlrpc 2018-03-06 21:41:08 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

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

Comment 10 Andrej Nemec 2018-04-03 09:08:16 UTC
*** Bug 1562758 has been marked as a duplicate of this bug. ***

Comment 11 errata-xmlrpc 2018-05-03 05:07:50 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.