A use-after-free flaw was found in the way JasPer decoded certain JPEG 2000 image files. A specially crafted file could cause an application using JasPer to crash.
Upstream issue (including a reproducer);
Name: Liu Bingchang (IIE)
Created jasper tracking bugs for this issue:
Affects: epel-5 [bug 1406406]
Affects: fedora-all [bug 1406408]
Created mingw-jasper tracking bugs for this issue:
Affects: epel-7 [bug 1406409]
Affects: fedora-all [bug 1406407]
This is a problem in JPC encoder, so can be triggered if malicious image is converted by jasper, it does not affect use cases when jasper is only used to read / decode images.
The problem is that certain pointer variables are not set to NULL after calls to free(), and the code may attempt to free the memory again, leading to double-free or use-after-free.
This issue was fixed upstream via this commit:
The fix is included in upstream version 2.0.12.
This issue has been addressed in the following products:
Red Hat Enterprise Linux 6
Red Hat Enterprise Linux 7
Via RHSA-2017:1208 https://access.redhat.com/errata/RHSA-2017:1208