Bug 476551 - identify segfaults on malformed files
Summary: identify segfaults on malformed files
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: ImageMagick
Version: 5.2
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Jan Horak
QA Contact: desktop-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-12-15 15:26 UTC by Petr Šplíchal
Modified: 2016-06-01 01:48 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-03 11:42:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
reproducer (95.21 KB, image/x-icon)
2008-12-15 15:26 UTC, Petr Šplíchal
no flags Details
broken.mng (6.33 KB, video/x-mng)
2008-12-15 15:27 UTC, Petr Šplíchal
no flags Details
broken.pict (22.36 KB, image/x-pict)
2008-12-15 15:27 UTC, Petr Šplíchal
no flags Details
broken.sun (90.58 KB, image/x-sun-raster)
2008-12-15 15:28 UTC, Petr Šplíchal
no flags Details
broken2.ppm (90.41 KB, image/x-portable-pixmap)
2008-12-15 15:28 UTC, Petr Šplíchal
no flags Details
full suite of broken image files from the Debian bug report (666.67 KB, application/x-bzip)
2009-02-18 19:31 UTC, Vincent Danen
no flags Details
patch for ImageMagick 6.2.9 to fix CVE-2007-1667 and CVE-2007-1797 (18.83 KB, patch)
2009-02-18 19:32 UTC, Vincent Danen
no flags Details | Diff
patch for ImageMagick 5.5.7 to fix CVE-2007-1667 and CVE-2007-1797 (13.99 KB, patch)
2009-02-18 19:33 UTC, Vincent Danen
no flags Details | Diff

Description Petr Šplíchal 2008-12-15 15:26:20 UTC
Created attachment 326968 [details]
reproducer

Description of problem:

ImageMagick's identify command segfaults on attached malformed files.
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=413033 for the
source of reproducers.

Version-Release number of selected component (if applicable):
ImageMagick-6.2.8.0-4.el5_1.1

Steps to Reproduce:
identify broken.cur
identify broken.mng
identify broken.pict
identify broken.sun
identify broken2.ppm

Comment 1 Petr Šplíchal 2008-12-15 15:27:24 UTC
Created attachment 326970 [details]
broken.mng

Comment 2 Petr Šplíchal 2008-12-15 15:27:44 UTC
Created attachment 326971 [details]
broken.pict

Comment 3 Petr Šplíchal 2008-12-15 15:28:00 UTC
Created attachment 326972 [details]
broken.sun

Comment 4 Petr Šplíchal 2008-12-15 15:28:21 UTC
Created attachment 326973 [details]
broken2.ppm

Comment 5 Vincent Danen 2009-02-18 19:29:50 UTC
These files are part of a testsuite for CVE-2007-1667 and CVE-2007-1797.  It looks like CVE-2007-1797 was fixed in RHSA-2008:0145 and RHSA-2008:0165, but CVE-2007-1667 was only fixed in xorg and XFree86; it was never fixed in ImageMagick.

Downloading all of the broken files from the Debian report paints a bit of a different picture as well.  I haven't been able to test everything yet, but test results so far show:

F10 segfaults on broken3.jp2, broken.jp2, broken.jpc

RHEL-5 segfaults on broken2.ppm, broken.cur, broken.mng, broken.pict, broken.sun
RHEL-4 segfaults on broken2.bmp, broken2.ppm, broken.cur, broken.dcx, broken.mng, broken.pict, broken.sgi

I'll attach the full test suite and patches we used at Mandriva to fix this in ImageMagick (would need some massaging to apply because the patches combined both CVEs into one patch fix).

Comment 6 Vincent Danen 2009-02-18 19:31:12 UTC
Created attachment 332440 [details]
full suite of broken image files from the Debian bug report

Comment 7 Vincent Danen 2009-02-18 19:32:29 UTC
Created attachment 332441 [details]
patch for ImageMagick 6.2.9 to fix CVE-2007-1667 and CVE-2007-1797

Comment 8 Vincent Danen 2009-02-18 19:33:03 UTC
Created attachment 332442 [details]
patch for ImageMagick 5.5.7 to fix CVE-2007-1667 and CVE-2007-1797

Comment 9 Vincent Danen 2009-02-18 19:54:07 UTC
Further investigation, however, shows that these are not really much more than a denial of service (application crash).

We do not consider a crash of client applications such as ImageMagick's tools to be a security issue.

Comment 13 RHEL Program Management 2010-08-23 11:07:15 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 14 RHEL Program Management 2014-03-07 12:46:25 UTC
This bug/component is not included in scope for RHEL-5.11.0 which is the last RHEL5 minor release. This Bugzilla will soon be CLOSED as WONTFIX (at the end of RHEL5.11 development phase (Apr 22, 2014)). Please contact your account manager or support representative in case you need to escalate this bug.

Comment 15 RHEL Program Management 2014-06-03 11:42:41 UTC
Thank you for submitting this request for inclusion in Red Hat Enterprise Linux 5. We've carefully evaluated the request, but are unable to include it in RHEL5 stream. If the issue is critical for your business, please provide additional business justification through the appropriate support channels (https://access.redhat.com/site/support).


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