Bug 1732340 (CVE-2019-9959)

Summary: CVE-2019-9959 poppler: integer overflow in JPXStream::init function leading to memory consumption
Product: [Other] Security Response Reporter: Marian Rehak <mrehak>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: caillon+fedoraproject, feborges, gnome-sig, john.j5live, mclasen, mkasik, rdieter, rhughes, rstrode, sandmann
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: poppler 0.79 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-09-12 12:46:04 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: 1732342, 1733026, 1733027, 1741146    
Bug Blocks: 1732341    

Description Marian Rehak 2019-07-23 07:55:10 UTC
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.

Upstream Information:

https://gitlab.freedesktop.org/poppler/poppler/blob/master/NEWS

Comment 1 Marian Rehak 2019-07-23 07:57:30 UTC
Created poppler tracking bugs for this issue:

Affects: fedora-all [bug 1732342]

Comment 2 Huzaifa S. Sidhpurwala 2019-07-25 03:49:02 UTC
Upstream bug: https://gitlab.freedesktop.org/poppler/poppler/issues/805
Patch: https://gitlab.freedesktop.org/poppler/poppler/commit/68ef84e5968a4249c2162b839ca6d7975048a557
Reproducer available at: https://gitlab.freedesktop.org/poppler/poppler/uploads/3f22837ebd503f87e730b51221b89742/raiter_issue5465.pdf

Analysis:

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.

Comment 5 errata-xmlrpc 2019-09-11 09:33:34 UTC
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

Comment 6 Product Security DevOps Team 2019-09-12 12:46:04 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-2019-9959

Comment 7 errata-xmlrpc 2020-03-31 19:21:20 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2020:1074 https://access.redhat.com/errata/RHSA-2020:1074