Bug 1928959 (CVE-2021-20244)

Summary: CVE-2021-20244 ImageMagick: Division by zero in ImplodeImage in MagickCore/visual-effects.c
Product: [Other] Security Response Reporter: Pedro Sampaio <psampaio>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: fedora, jhorak, mike, pahan
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: ImageMagick 7.0.10-62 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in ImageMagick in MagickCore/visual-effects.c. An attacker who submits a crafted file that is processed by ImageMagick could trigger undefined behavior in the form of math division by zero. The highest threat from this vulnerability is to system availability.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-18 19:03:08 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: 1929932, 1929933    
Bug Blocks: 1928960, 1928961    

Description Pedro Sampaio 2021-02-15 21:08:30 UTC
A flaw was found in ImageMagick in MagickCore/visual-effects.c. An attacker who submits a crafted file that is processed by ImageMagick could trigger undefined behavior in the form of math division by zero. This would most likely lead to an impact to application availability, but could potentially cause other problems related to undefined behavior.

References:

https://github.com/ImageMagick/ImageMagick/pull/3194

Comment 1 RaTasha Tillery-Smith 2021-02-16 14:36:06 UTC
External References:

https://github.com/ImageMagick/ImageMagick/pull/3194

Comment 2 Todd Cullum 2021-02-18 00:33:24 UTC
Flaw Summary:

In MagickCore/visual-effects.c, routine ImplodeImage(), there are fives lines of code which could trigger a divide-by-zero if a crafted image is processed by ImageMagick which sets the image's rows, columns, or several other attributes to 0. These division operations were replaced with the PerceptibleReciprocal() routine in the upstream patch to avoid the problem.

Comment 4 Todd Cullum 2021-02-18 00:36:17 UTC
Statement:

This flaw is out of support scope for Red Hat Enterprise Linux 6 and 7. To learn more about Red Hat Enterprise Linux support scope, please see https://access.redhat.com/support/policy/updates/errata/ .

Comment 5 Todd Cullum 2021-02-18 00:36:57 UTC
Created ImageMagick tracking bugs for this issue:

Affects: epel-8 [bug 1929932]
Affects: fedora-all [bug 1929933]

Comment 6 Product Security DevOps Team 2021-02-18 19:03:08 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-2021-20244