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.
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/ .
Created ImageMagick tracking bugs for this issue:
Affects: epel-8 [bug 1929894]
Affects: fedora-all [bug 1929895]
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.
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):