Bug 1894226 (CVE-2020-27752)

Summary: CVE-2020-27752 ImageMagick: heap-based buffer overflow in PopShortPixel in MagickCore/quantum-private.h
Product: [Other] Security Response Reporter: Guilherme de Almeida Suckevicz <gsuckevi>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: fedora, jhorak, mike, pahan, rhel8-maint, security-response-team, stransky
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: ImageMagick 7.0.9-0 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in ImageMagick in MagickCore/quantum-private.h. This flaw allows an attacker who submits a crafted file processed by ImageMagick to trigger a heap buffer overflow. The highest threat from this vulnerability is to system availability and also a potential impact on data integrity.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-24 23:34:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1901247, 1901248, 1910554    
Bug Blocks: 1891602    

Description Guilherme de Almeida Suckevicz 2020-11-03 18:40:42 UTC
In ImageMagick, there is a heap-buffer-overflow at MagickCore/quantum-private.h:227 in PopShortPixel.

Reference:
https://github.com/ImageMagick/ImageMagick/issues/1752

Upstream patch:
https://github.com/ImageMagick/ImageMagick/commit/a9d563d3d73874312080d30dc4ba07cecad56192

Comment 1 Guilherme de Almeida Suckevicz 2020-11-03 18:40:44 UTC
Acknowledgments:

Name: Suhwan Song (Seoul National University)

Comment 2 Todd Cullum 2020-11-03 22:37:44 UTC
This looks like the fix for CVE-2020-25664 was an incomplete fix hence the second reproducer which triggers the same thing via the same code path after the patch was applied.

Comment 4 Todd Cullum 2020-11-03 22:41:41 UTC
Statement:

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 6 Guilherme de Almeida Suckevicz 2020-11-24 19:11:55 UTC
Created ImageMagick tracking bugs for this issue:

Affects: epel-8 [bug 1901247]
Affects: fedora-all [bug 1901248]

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

https://access.redhat.com/security/cve/cve-2020-27752