Bug 1928952 (CVE-2021-20241) - CVE-2021-20241 ImageMagick: Division by zero in WriteJP2Image() in coders/jp2.c
Summary: CVE-2021-20241 ImageMagick: Division by zero in WriteJP2Image() in coders/jp2.c
Keywords:
Status: CLOSED WONTFIX
Alias: CVE-2021-20241
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1929894 1929895
Blocks: 1928960 1928961
TreeView+ depends on / blocked
 
Reported: 2021-02-15 20:52 UTC by Pedro Sampaio
Modified: 2021-02-18 19:03 UTC (History)
4 users (show)

Fixed In Version: ImageMagick 6.9.11-62, ImageMagick 7.0.10-62
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in ImageMagick in coders/jp2.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.
Clone Of:
Environment:
Last Closed: 2021-02-18 19:03:03 UTC
Embargoed:


Attachments (Terms of Use)

Description Pedro Sampaio 2021-02-15 20:52:01 UTC
A flaw was found in ImageMagick in coders/jp2.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. This flaw affects ImageMagick versions prior to 7.0.10-62.

References:

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

Comment 1 RaTasha Tillery-Smith 2021-02-16 14:40:11 UTC
External References:

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

Comment 2 Todd Cullum 2021-02-17 20:42:30 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 3 Todd Cullum 2021-02-17 20:43:24 UTC
Created ImageMagick tracking bugs for this issue:

Affects: epel-8 [bug 1929894]
Affects: fedora-all [bug 1929895]

Comment 4 Todd Cullum 2021-02-17 21:22:39 UTC
Flaw summary:

In WriteJP2Image() of the jp2 coder in /coders/jp2.c, there is a divide-by-zero possible, on 2 lines, because jp2_image->comps[i].dy could be set to zero when ImageMagick processes a crafted input file. The patch addresses this by using the PerceptibleReciprocal() routine instead of division in the computations.

Comment 5 Product Security DevOps Team 2021-02-18 19:03:03 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-20241


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