Debian Bug report logs - #418057
CVE-2007-1797: integer overflows in DCM image decoder

version graph

Package: imagemagick; Maintainer for imagemagick is ImageMagick Packaging Team <>; Source for imagemagick is src:imagemagick.

Reported by: Laurent Bonnaud <>

Date: Fri, 6 Apr 2007 16:00:01 UTC

Severity: grave

Tags: security

Found in version imagemagick/7:

Fixed in version imagemagick/7:

Done: Daniel Kobras <>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox

Report forwarded to, Debian Security Team <>, Ryuichi Arafune <>:
Bug#418057; Package imagemagick. Full text and rfc822 format available.

Acknowledgement sent to Laurent Bonnaud <>:
New Bug report received and forwarded. Copy sent to Debian Security Team <>, Ryuichi Arafune <>. Full text and rfc822 format available.

Message #5 received at (full text, mbox):

From: Laurent Bonnaud <>
To: Debian Bug Tracking System <>
Subject: CVE-2007-1797: integer overflows in DCM image decoder
Date: Fri, 06 Apr 2007 17:58:28 +0200
Package: imagemagick
Version: 7:
Severity: grave
Tags: security
Justification: user security hole


here is the problem:

Multiple integer overflows in ImageMagick before 6.3.3-5 allow remote
attackers to execute arbitrary code via (1) a crafted DCM image, which
results in a heap-based overflow in the ReadDCMImage function, or (2)
the (a) colors or (b) comments field in a crafted XWD image, which
results in a heap-based overflow in the ReadXWDImage function,
different issues than CVE-2007-1667.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (100, 'unstable'), (99, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.20-1-686
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)

Versions of packages imagemagick depends on:
ii  libbz2-1.0          1.0.3-6              high-quality block-sorting file co
ii  libc6               2.5-0exp6            GNU C Library: Shared libraries
ii  libfreetype6        2.2.1-5              FreeType 2 font engine, shared lib
ii  libice6             1:1.0.3-1            X11 Inter-Client Exchange library
ii  libjasper-1.701-1   1.701.0-2            The JasPer JPEG-2000 runtime libra
ii  libjpeg62           6b-13                The Independent JPEG Group's JPEG 
ii  liblcms1            1.15-1               Color management library
ii  libmagick9          7: Image manipulation library
ii  libpng12-0          1.2.15~beta5-1       PNG library - runtime
ii  libsm6              1:1.0.2-1            X11 Session Management library
ii  libtiff4            3.8.2-7              Tag Image File Format (TIFF) libra
ii  libx11-6            2:1.1.1-1            X11 client-side library
ii  libxext6            1:1.0.3-1            X11 miscellaneous extension librar
ii  libxml2             2.6.27.dfsg-1        GNOME XML library
ii  libxt6              1:1.0.5-1            X11 toolkit intrinsics library
ii  zlib1g              1:1.2.3-13           compression library - runtime

imagemagick recommends no packages.

-- no debconf information

Information forwarded to, Ryuichi Arafune <>:
Bug#418057; Package imagemagick. Full text and rfc822 format available.

Acknowledgement sent to Daniel Schepler <>:
Extra info received and forwarded to list. Copy sent to Ryuichi Arafune <>. Full text and rfc822 format available.

Message #10 received at (full text, mbox):

From: Daniel Schepler <>
Subject: imagemagick NMU coming
Date: Tue, 24 Apr 2007 22:58:48 -0400
To anybody looking at these RC bugs against imagemagick: I'm planning on 
making an NMU for the package next Monday (30 April).  See bug #420672.
Daniel Schepler

Tags added: pending Request was from Daniel Kobras <> to (Sun, 29 Apr 2007 12:30:24 GMT) Full text and rfc822 format available.

Reply sent to Daniel Kobras <>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Laurent Bonnaud <>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #17 received at (full text, mbox):

From: Daniel Kobras <>
Subject: Bug#418057: fixed in imagemagick 7:
Date: Mon, 30 Apr 2007 18:17:05 +0000
Source: imagemagick
Source-Version: 7:

We believe that the bug you reported is fixed in the latest version of
imagemagick, which is due to be installed in the Debian FTP archive:

  to pool/main/i/imagemagick/imagemagick_6.2.4.5.dfsg1-1.diff.gz
  to pool/main/i/imagemagick/imagemagick_6.2.4.5.dfsg1-1.dsc
  to pool/main/i/imagemagick/imagemagick_6.2.4.5.dfsg1-1_i386.deb
  to pool/main/i/imagemagick/libmagick++9-dev_6.2.4.5.dfsg1-1_i386.deb
  to pool/main/i/imagemagick/libmagick++9c2a_6.2.4.5.dfsg1-1_i386.deb
  to pool/main/i/imagemagick/libmagick9-dev_6.2.4.5.dfsg1-1_i386.deb
  to pool/main/i/imagemagick/libmagick9_6.2.4.5.dfsg1-1_i386.deb
  to pool/main/i/imagemagick/perlmagick_6.2.4.5.dfsg1-1_i386.deb

A summary of the changes between this version and the previous one is

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
Daniel Kobras <> (supplier of updated imagemagick package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing

Hash: SHA1

Format: 1.7
Date: Sat, 28 Apr 2007 18:00:10 +0200
Source: imagemagick
Binary: perlmagick libmagick9 libmagick9-dev imagemagick libmagick++9-dev libmagick++9c2a
Architecture: source i386
Version: 7:
Distribution: unstable
Urgency: high
Maintainer: Luciano Bello <>
Changed-By: Daniel Kobras <>
 imagemagick - Image manipulation programs
 libmagick++9-dev - The object-oriented C++ API to the ImageMagick library--developme
 libmagick++9c2a - The object-oriented C++ API to the ImageMagick library
 libmagick9 - Image manipulation library
 libmagick9-dev - Image manipulation library -- development
 perlmagick - A perl interface to the libMagick graphics routines
Closes: 214623 317083 318176 325651 325720 330666 333616 335111 339548 340401 344997 345238 345595 345876 347486 349264 351498 352575 358148 360362 360400 364826 381831 383314 383314 385062 386964 393025 395830 398183 401047 404477 410435 412945 417237 418057 419274 420353
 imagemagick (7: unstable; urgency=high
   * New maintainers.
   * debian/compat: Splice debhelper version out of debian/rules into
     separate file (but don't bump version).
   * debian/control: Adjust jasper dependencies to current package names.
     Closes: #419274, #420353
   * Documentation minors improvements:
     - Manpages says SEE ALSO, not SEE-ALSO. Closes: #333616
     - Escaped specials chars in manpages. Closes: #381831
     - External reference in convert(1). Closes: #398183
     - "isplay", "perferred", "similiar" and "morify.html" typos fixed.
       Closes: #386964, #351498, #395830
     - ImageMagick(1) indentation. Closes: #335111
     - "convert -help" duplicated line fixes. Closes: #339548
     - Typo in description of --resize command fixed. Closes: #364826
   * Magick++/lib/Image.cpp: Include cstdlib header to fix build failure
     with gcc 4.3. Patch thanks to Martin Michlmayr. Closes: #417237
   * coders/dcm.c: Fix integer overflow in DCM coder. (CVE-2007-1797)
     Closes: #418057
   * coders/icon.c: Fix segfault in ICON coder.
   * coders/pcx.c: Fix heap overflow in PCX coder.
   * coders/pict.c: Fix multiple segfaults in PICT coder.
   * coders/png.c: Fix segfault in PNG coder.
   * coders/pnm.c: Fix segfault in PNM coder.
   * coders/sgi.c: Fix segfault in SGI coder.
   * coders/sun.c: Fix segfault during conversion in SUN coder.
   * coders/viff.c: Prevent heap corruption in VIFF coder.
   * coders/xwd.c: Fix segfault during conversion in XWD coder.
   * coders/xwd.c: Fix multiple integer overflows in XWD coder.
     (CVE-2007-1667, CVE-2007-1797)
   * The above fixes collectively address the following bug report:
     Closes: #412945
   * config/ Lose obsolete option -3 to dcraw delegate
     to unbreak support for raw digital images. Closes: #404477
 imagemagick (7: unstable; urgency=high
   * Non-maintainer upload.
   * coders/palm.c: Fix regression introduced in patch for CVE-2006-5456.
     Avoid bogus second read in macro call. Patch thanks to Vladimir
     Nadvornik. (CVE-2007-0770) Closes: #410435
 imagemagick (7: unstable; urgency=high
   * Non-maintainer upload.
   * coders/png.c: Fix amd64 build failure with recent libpng versions.
     Closes: #401047
   * debian/control: Tighten libpng12-dev build-dependency to exclude versions
     that are known to fail to link even with the above fix in place.
 imagemagick (7: unstable; urgency=high
   * Non-maintainer upload.
   * debian/control: Add build dependency on libxt-dev and pkg-config to
     make dependency list deterministic.
   * debian/control: libmagick9-dev depends on libxt-dev.
 imagemagick (7: unstable; urgency=high
   * Non-maintainer upload.
   * coders/dcm.c, coders/palm.c: Fix buffer overflows in DCM and Palm coders.
     Patches thanks to M Joonas Pihlaja. Closes: #393025
   * coders/sgi.c: Put back missing initialisation of loop variable that
     was erroneously removed in fix for CVE-2006-4144. Spotted by
     Martin Pitt. Closes: #383314
   * coders/sgi.c: Fix off-by-one error in boundary check causing slightly
     garbled image output. Also introduced in fix for for CVE-2006-4144.
   * coders/xpm.c: Do not gratuitously limit the allowed number of
     bytes per pixel. Patch thanks to Jens Seidel. Closes: #358148
   * magick/display.c: Fix NULL pointer dereference in display's
     "Visual Directory". Patch thanks to Frédéric Bothamy. Closes: #360400
   * utilities/ Replace UTF-8 encoded characters with
     latin1 equivalents to placate lintian.
   * debian/control: perlmagick provides libimage-magick-perl to comply
     with Perl policy. Closes: #317083
   * debian/control: Add gs-gpl build dependency, used in testsuite.
   * debian/control: Tries hard to comply with version 3.7.2 of Debian
   * debian/rules: Eliminate -l entries that slipped into --ldflags output.
     They're already present in --libs anyway. Closes: #340401
   * debian/rules: Run the testsuite, but don't treat failures as fatal
     errors for now.
   * debian/rules: At configure time, change X11 search paths to X11R7
   * debian/rules: Remove duplicate of license file from imagemagick
 imagemagick (7: unstable; urgency=high
   * Non-Maintainer Upload
   * Fix buffer overflow in SGI parser [CVE-2006-4144] (closes: #383314)
     Thanks to Daniel Kobras
   * Fix double free in ICC profile in PerlMagick (closes: #349264)
   * Fix incomaptibility with graphviz >= 2.8 and build-depend on an
     appropriate version (closes: #360362)
   * Fix XCF and Sun Raster File buffer overflows [CVE-2006-3743/-3744]
     (closes: #385062)
 imagemagick (7: unstable; urgency=low
   * Non-Maintainer Upload
   * Remove all instances of the imagemagick logo from the original
     sourcefile and repack. (closes: #214623)
   * Add back the free logo patch
   * Add clean-tarball rule to accomplish this
   * Change the copyright file to indicate that the logo is no longer
     included, and indiciate that the included logo is actually text saying
     "imagemagick" with the Debian open use logo.
 imagemagick (7: unstable; urgency=low
   * Non-maintainer upload.
   * Back to as requested by the release team to maintain binary
     compatibility. Bumped epoch once more.
 imagemagick (6: unstable; urgency=low
   * New upstream version.
 imagemagick (6: unstable; urgency=high
   * Non-maintainer upload.
   * coders/url.c: Do not treat local file:// URIs as temporary files that
     are removed after reading. Closes: #352575
 imagemagick (6: unstable; urgency=high
   * Non-maintainer upload.
   * magick/display.c: In DisplayImageCommand(), expand command line before
     allocating ressources based on argc. Patch and analysis thanks to
     Eero Häkkinen. Closes: #345595
   * magick/{animate.c,blob.c,display.c,image.c,log.c,montage.c,string.c,
     string_.h}: Implement new utility function FormatMagickStringNumeric()
     to securely expand a user-supplied format string with a single numeric
     argument. Adjust code to use this function where appropriate.
     (CVE-2006-0082) Closes: #345876
   * coders/pdf.c,coders/ps.c,magick/delegate.c,magick/delegate.h,
     magick/methods.h: Do not call external delegates with user-supplied
     filename, but with securely named symlinks only to prevent shell command
     injection (CVE-2005-4601). Closes: #345238
   * debian/rules: Make sure to include trailing spaces in multi-line
     commands to keep recent make happy. Cures problems with ghostscript
     font path. Fix thanks to Jeff Lessem. Closes: #347486
   * debian/imagemagick.mime: Rather than autodetect the type of an image,
     derive it from the mime type. As a side effect, this change allows to
     use arbitrary filenames with the 'see' command, even if they have
     special meaning to imagemagick internally. Also clean up some typos
     and superfluous entries once we're at it. Closes: #344997
 imagemagick (6: unstable; urgency=low
   * Another NMU to complete the installability fixes from 6:
   * Adjust libmagick9-dev dependencies to account for the removal of
     xlibs-dev from unstable, and bring them in line with build-deps.
 imagemagick (6: unstable; urgency=low
   * Non-maintainer upload to resolve buildability/installability.
   * debian/{control,rules}: Disable DPS support, which is no longer shipped
     in Xorg 6.9/7.0 (and was making us both FTBFS and uninstallable in sid)
   * debian/control: explicitely build-depend on libxext-dev, since we both
     test for and use it directly, rather than indirectly.
 imagemagick (6: unstable; urgency=low
   * Non-maintainer upload.
   * debian/control: Rename libmagick++9 to libmagick++9c2a, following a
     C++ ABI transition. Conflicts with and Replaces old version.
   * debian/*: Rename various debhelper support files due to above name
 imagemagick (6: unstable; urgency=medium
   * Non-maintainer upload.
   * debian/control: libmagick9-dev Conflicts/Replaces libmagick6-dev.
     Likewise for libmagick++9-dev. Closes: #330666
   * debian/control: Provide unversioned libmagick-dev and libmagick++-dev
     and conflict/replace them for future-proof handling of soname bumps.
 imagemagick (6: unstable; urgency=low
   * Non-maintainer upload.
   * New upstream version.
     + Yet another bump of the soname version, this time going from
       7 to 9.
   * debian/*: Cater for soname change and corresponding change of
     library packages names in multiple places.
 imagemagick (6: experimental; urgency=low
   * Non-maintainer upload.
   * New upstream version.
     + Version in library soname was increased from 6 to 7 due to
       changes in binary interface starting with 6.0.7. (Yes, this
       should have happened earlier.) Closes: #318176, #325651, #325720
   * debian/*: Rename packages from libmagick6 to libmagick7, and similar.
     Adjust version in various places accordingly. Drop c2 suffix from
     C++ library package.
   * debian/control: Use shlibs information to generate Depends line for
     imagemagick binary package.
   * debian/control: Remove Pre-Depends on prehistoric version of dpkg.
   * debian/control: Package complies with policy version 3.6.2. Bump
     Standards-Version accordingly.
   * Patches to upstream sources:
     + [bin/Magick++-config.1.debdiff]
       Stray file that seems to have slipped into the previous Debian
       diffs by mistake. Removed now.
     + [magick/blob.c]
       Originally a patch from upstream, now mostly merged. Retaining a
       single hunk that upstream reverted later on, though it still looks
     + [, configure]
       Override location of documentation files to Debian's default
       /usr/share/doc/imagemagick. Patch to configure was present before.
       This release promotes it back to as well. (No ill
       effects because AM_MAINTAINER_MODE is used.)
     + [coders/magick.c]
       Drop patch that exchanges upstream's logo for a DFSG-free version.
       This attempt to address #214623 (distribution of non-free logo)
       missed several other instances of the logo, must be applied to
       the orig.tar.gz rather than the Debian diff, and should have
       some input from upstream, so no point in carrying it around still.
 289dcca20cabdc8279e324acfbd5739e 1047 graphics optional imagemagick_6.2.4.5.dfsg1-1.dsc
 2c5d3723d25c4119cf003efce2161c56 5203463 graphics optional imagemagick_6.2.4.5.dfsg1.orig.tar.gz
 f7f59b4cd2bd6292c84cc1a922cb3191 98891 graphics optional imagemagick_6.2.4.5.dfsg1-1.diff.gz
 ed785393f73321c39045a2cfca3c4bcc 739222 graphics optional imagemagick_6.2.4.5.dfsg1-1_i386.deb
 03fcdd0be6ac45461187f443c2cdee30 1270866 libs optional libmagick9_6.2.4.5.dfsg1-1_i386.deb
 8f082a61b40f4117ac245bfc24203fcf 1578224 libdevel optional libmagick9-dev_6.2.4.5.dfsg1-1_i386.deb
 be8022b4e8d154339e9e471c11f3af38 176368 libs optional libmagick++9c2a_6.2.4.5.dfsg1-1_i386.deb
 aa5279c10479f169fdd0057e2a1cba01 227988 libdevel optional libmagick++9-dev_6.2.4.5.dfsg1-1_i386.deb
 f4807e698dc13e1bb46fe5c3e48c2dbd 168080 perl optional perlmagick_6.2.4.5.dfsg1-1_i386.deb

Version: GnuPG v1.4.3 (Darwin)


Information forwarded to, Luciano Bello <>:
Bug#418057; Package imagemagick. Full text and rfc822 format available.

Acknowledgement sent to Laurent Bonnaud <>:
Extra info received and forwarded to list. Copy sent to Luciano Bello <>. Full text and rfc822 format available.

Message #22 received at (full text, mbox):

From: Laurent Bonnaud <>
Subject: Re: Bug#418057 closed by Daniel Kobras <> (Bug#418057: fixed in imagemagick 7:
Date: Sun, 06 May 2007 16:23:00 +0200
>          imagemagick (7: unstable; urgency=high
>          .
>            * coders/dcm.c: Fix integer overflow in DCM coder. (CVE-2007-1797)
>              Closes: #418057

Thank you for the fix!

Laurent Bonnaud.

Bug archived. Request was from Debbugs Internal Request <> to (Tue, 26 Jun 2007 11:28:52 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.

Debian bug tracking system administrator <>. Last modified: Sun Apr 20 14:11:40 2014; Machine Name:

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.