Bug 137249 - CAN-2004-0990 integer overflow in internal GD image library
CAN-2004-0990 integer overflow in internal GD image library
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: php (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Joe Orton
David Lawrence
: Security
Depends On:
  Show dependency treegraph
Reported: 2004-10-26 18:38 EDT by Josh Bressers
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-11-05 12:06:40 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Josh Bressers 2004-10-26 18:38:54 EDT
Bug 137246 describes an integer overflow in the GD image library.  PHP
can either use its internal GD, or the system GD library.  In RHEL3,
we use the internal GD library.

We should use the system GD library rather than the internal PHP library.

RHEL2.1 uses the system GD library.
Comment 1 Joe Orton 2004-10-27 02:00:30 EDT
Unfortunately these days PHP includes a specially patched version of
GD, switching to the system libgd drops various features.
Comment 2 Joe Orton 2004-11-05 12:06:40 EST
In fact, it's not unfortunate at all.  The PHP libgd reimplements
gdMalloc and friends using the PHP internal memory allocation
functions safe_emalloc etc; these do check for integer overflow, and
they also place a hard limit on the amount of RAM which can be consumed.

This successfully catches the issues triggered by the test case
referenced.   I've been through the PHP libgd checking the places I
checked in the real gd, and it everything looks safe.

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