Bug 494823 - (CVE-2005-3350) CVE-2005-3350 giflib/libunfig: memory corruption via a crafted GIF
CVE-2005-3350 giflib/libunfig: memory corruption via a crafted GIF
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
All Linux
high Severity high
: ---
: ---
Assigned To: Red Hat Product Security
: Security
: 491727 (view as bug list)
Depends On: 171413 491727 493567 493568
  Show dependency treegraph
Reported: 2009-04-08 05:32 EDT by Tomas Hoger
Modified: 2009-11-19 10:07 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-11-19 10:07:22 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Chris Evans' PoC - bad2.gif (16.41 KB, image/gif)
2009-04-08 05:35 EDT, Tomas Hoger
no flags Details
Chris Evans' PoC - bad3.gif (16.41 KB, image/gif)
2009-04-08 05:35 EDT, Tomas Hoger
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2009:0444 normal SHIPPED_LIVE Important: giflib security update 2009-04-22 13:37:31 EDT

  None (edit)
Description Tomas Hoger 2009-04-08 05:32:16 EDT
Common Vulnerabilities and Exposures assigned an identifier CVE-2005-3350 to the following vulnerability:

libungif library before 4.1.0 allows attackers to corrupt memory and possibly
execute arbitrary code via a crafted GIF file that leads to an out-of-bounds

Comment 1 Tomas Hoger 2009-04-08 05:35:21 EDT
Created attachment 338675 [details]
Chris Evans' PoC - bad2.gif

Source: http://scary.beasts.org/security/CESA-2005-007.txt

Crash can be reproduced using e.g. gif2ps from giflib-utils
Comment 2 Tomas Hoger 2009-04-08 05:35:53 EDT
Created attachment 338676 [details]
Chris Evans' PoC - bad3.gif

Source: http://scary.beasts.org/security/CESA-2005-007.txt
Comment 4 errata-xmlrpc 2009-04-22 13:37:34 EDT
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2009:0444 https://rhn.redhat.com/errata/RHSA-2009-0444.html
Comment 5 Fedora Update System 2009-05-15 21:53:37 EDT
giflib-4.1.3-10.fc9 has been submitted as an update for Fedora 9.
Comment 6 Fedora Update System 2009-05-18 22:09:13 EDT
giflib-4.1.3-10.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 7 Tomas Hoger 2009-05-25 14:29:10 EDT
The fix for this issue has raised few questions related to the late release of the updates for this flaw.  Here are few more details about the cause of this and the time line.

This problem (along with the crash-only issue CVE-2005-2974) was reported in October 2005 and was originally tracked via bug #171413.  Updates addressing this flaw were released for libungif packages shipped in the current versions of Red Hat Enterprise Linux (2.1 to 4):


and Fedora Core (3 and 4):


SRPMs for updated packages can be found on Red Hat FTP (RHEL updates):

  (has FTP links for individual SRPMs)

or Fedora Project's archive FTP (FC updates):


Later on, in between Fedora Core 4 and 5, libungif package was replaced with giflib.  libungif and giflib differ in the support for patented LZW algorithm, libungif can only create uncompressed gif images, and is now no longer maintained upstream after patent expiration:


According to giflib's RPM changelog, the work on libungif -> giflib transition started in September 2005 and the patch for the flaw did not get included in giflib packages.  Fedora Core 5 was released with affected giflib 4.1.3, which has not been updated to newer upstream version in Fedora Core and Fedora until recently.  It was also included in Red Hat Enterprise Linux 5 (which was based on Fedora Core 6).  Missing fix for the giflib was only spotted recently.

Updated Fedora giflib packages can be found at:


Fedora 9 packages got backported patch included and are already available in the stable repository.  For Fedora 10, giflib was rebased to the current upstream version 4.1.6 and is available in the testing repository at the moment.
Comment 8 Fedora Update System 2009-06-18 07:39:26 EDT
giflib-4.1.6-2.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

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