The JPXStream::init function in Poppler 0.78.0 and earlier doesn't check for negative values of stream length, leading to an Integer Overflow, thereby making it possible to allocate a large memory chunk on the heap, with a size controlled by an attacker, as demonstrated by pdftocairo.
Created poppler tracking bugs for this issue:
Affects: fedora-all [bug 1732342]
Upstream bug: https://gitlab.freedesktop.org/poppler/poppler/issues/805
Reproducer available at: https://gitlab.freedesktop.org/poppler/poppler/uploads/3f22837ebd503f87e730b51221b89742/raiter_issue5465.pdf
This is an integer overflow in the JPX code, which leads to poppler allocating large chunks of memory on the heap. The size of the memory to be allocated can be controlled by the attacker by maliciously modifying the PDF file being parsed. The attacker can cause memory exhaustion or the application compiled against poppler library to crash.
This issue has been addressed in the following products:
Red Hat Enterprise Linux 8
Via RHSA-2019:2713 https://access.redhat.com/errata/RHSA-2019:2713
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):