Bug 1891605 (CVE-2020-25664) - CVE-2020-25664 ImageMagick: heap-based buffer overflow in PopShortPixel in MagickCore/quantum-private.h
Summary: CVE-2020-25664 ImageMagick: heap-based buffer overflow in PopShortPixel in Ma...
Alias: CVE-2020-25664
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
Depends On: 1901225 1901226 Red Hat1910565
Blocks: Embargoed1891602
TreeView+ depends on / blocked
Reported: 2020-10-26 19:48 UTC by Guilherme de Almeida Suckevicz
Modified: 2021-02-11 18:37 UTC (History)
7 users (show)

Fixed In Version: ImageMagick 7.0.8-68, ImageMagick 6.9.10-68
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in ImageMagick. A specially crafted image could cause an out-of-bounds memory write leading to a crash. The highest threat from this vulnerability is to system availability.
Clone Of:
Last Closed: 2020-11-24 23:33:56 UTC

Attachments (Terms of Use)

Description Guilherme de Almeida Suckevicz 2020-10-26 19:48:51 UTC
In ImageMagick, there is a heap-buffer-overflow at MagickCore/quantum-private.h:227:12 in PopShortPixel.


Upstream patch:

Comment 1 Todd Cullum 2020-10-28 20:40:05 UTC
Flaw summary:

In WriteOnePNGImage() of the PNG coder at coders/png.c, an improper call to AcquireVirtualMemory() and memset() allows for an out-of-bounds write later when PopShortPixel() from MagickCore/quantum-private.h is called. The patch fixes the calls by adding 256 to rowbytes. An attacker who is able to supply a specially crafted image could affect availability with a low impact to data integrity.

Comment 2 Todd Cullum 2020-10-28 21:13:09 UTC

Name: Suhwan Song (Seoul National University)

Comment 3 Todd Cullum 2020-10-29 19:10:26 UTC

This flaw is out of support scope for Red Hat Enterprise Linux 5, 6, and 7. Inkscape is not affected because it no longer uses a bundled ImageMagick in Red Hat Enterprise Linux 8. For more information regarding support scopes, please see https://access.redhat.com/support/policy/updates/errata .

Comment 4 Guilherme de Almeida Suckevicz 2020-11-24 18:57:40 UTC
Created ImageMagick tracking bugs for this issue:

Affects: epel-8 [bug 1901225]
Affects: fedora-all [bug 1901226]

Comment 5 Product Security DevOps Team 2020-11-24 23:33:56 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):


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