Bug 1128114 (CVE-2019-9545) - VUL-1: CVE-2019-9545: poppler: denial of service via recursive function call, in JBIG2Stream:readTextRegion() located in JBIG2Stream.cc
Summary: VUL-1: CVE-2019-9545: poppler: denial of service via recursive function call,...
Status: RESOLVED FIXED
Alias: CVE-2019-9545
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P4 - Low : Minor
Target Milestone: ---
Assignee: Security Team bot
QA Contact: Security Team bot
URL: https://smash.suse.de/issue/225602/
Whiteboard: CVSSv3:SUSE:CVE-2019-9545:3.3:(AV:L/A...
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-06 09:55 UTC by Robert Frohl
Modified: 2024-05-07 09:20 UTC (History)
4 users (show)

See Also:
Found By: Security Response Team
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---
abergmann: needinfo? (peter.simons)


Attachments
QA Reproducer (21.04 KB, application/pdf)
2019-03-06 09:57 UTC, Robert Frohl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Frohl 2019-03-06 09:55:32 UTC
CVE-2019-9545

An issue was discovered in Poppler 0.74.0. A recursive function call, in
JBIG2Stream::readTextRegion() located in JBIG2Stream.cc, can be triggered by
sending a crafted pdf file to (for example) the pdfimages binary. It allows an
attacker to cause Denial of Service (Segmentation fault) or possibly have
unspecified other impact. This is related to JBIG2Bitmap::clearToZero.

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2019-9545
http://people.canonical.com/~ubuntu-security/cve/2019/CVE-2019-9545.html
https://gitlab.freedesktop.org/poppler/poppler/issues/731
https://research.loginsoft.com/bugs/recursive-function-call-in-function-jbig2streamreadtextregion-poppler-0-74-0/
Comment 1 Robert Frohl 2019-03-06 09:57:33 UTC
Created attachment 799083 [details]
QA Reproducer

$ pdfimages -f 1 -l 1 -opw testing -upw testing RFC_POC output
[..]
Syntax Error (15173): Invalid symbol number in JBIG2 text region
-> output repeats indefinitely
Comment 2 Robert Frohl 2019-03-06 10:30:55 UTC
judging by the reproducer these codestreams are affected:
- SUSE:SLE-12:Update
- SUSE:SLE-12-SP2:Update
- SUSE:SLE-15:Update
Comment 4 Petr Gajdos 2023-06-19 13:26:31 UTC
Reproducible on 15sp2/poppler, 15sp4/poppler bails out quickly:

:/128114 # pdfimages -f 1 -l 1 -opw testing -upw testing poc output
Syntax Error (112): Dictionary key must be a name object
[...]
Syntax Error (15074): Bad 'Length' attribute in stream
Syntax Error: Invalid XRef entry 0
Syntax Error (16322): Missing 'endstream' or incorrect stream length
Syntax Error: invalid width/height
Syntax Error (15128): 4294967277 extraneous bytes after segment
:/128114 #

Perhaps something around
https://gitlab.freedesktop.org/poppler/poppler/-/commit/b8de1a1914e76642cafbbfa436f31be22e53e54f
Comment 5 Petr Gajdos 2023-10-24 13:32:04 UTC
BEFORE

15sp2,15,12sp2,12/poppler

:/128114 # pdfimages -f 1 -l 1 -opw testing -upw testing poc output
Syntax Error (112): Dictionary key must be a name object
Syntax Error (21490): Illegal character '>'
Syntax Error (21521): Illegal character <19> in hex string
Syntax Error (20145): Dictionary key must be a name object
[...]
Syntax Error (15173): Invalid symbol number in JBIG2 text region
Syntax Error (15173): Invalid symbol number in JBIG2 text region
Syntax Error (15173): Invalid symbol number in JBIG2 text region
Syntax Error (15173): Invalid symbol number in JBIG2 text region
Syntax Error (15173): Invalid symbol number in JBIG2 text region
Syntax Error (15173): Invalid symbol number in JBIG2 text region
Syntax Error (15173): Invalid symbol number in JBIG2 text region
Syntax Error (15173): Invalid symbol number in JBIG2 text region
Syntax Error (15173): Invalid symbol number in JBIG2 text region
Syntax Error (15173): Invalid symbol number in JBIG2 text region
Syntax Error (15173): Invalid symbol number in JBIG2 text region
Syntax Error (15173): Invalid symbol number in JBIG2 text region
Syntax Error (15173): Invalid symbol number in JBIG2 text region
Syntax Error (15173): Invalid symbol number in JBIG2 text region
Syntax Error (15173): Invalid symbol number in JBIG2 text region
Syntax Error (15173): Invalid symbol number in JBIG2 text region
^C
:/128114 #


PATCH

https://gitlab.freedesktop.org/poppler/poppler/-/commit/bf6909d2d

fixes the recursion for the testcase.


AFTER

:/128114 # pdfimages -f 1 -l 1 -opw testing -upw testing poc output
[..]
Syntax Error (15164): Invalid symbol number in JBIG2 text region
Syntax Error (15164): NULL bitmap in readTextRegion
:/128114 #
Comment 6 Petr Gajdos 2023-10-24 13:32:44 UTC
Will submit for 15sp2,15,12sp2,12/poppler.

I believe all fixed.
Comment 10 Maintenance Automation 2023-10-30 20:30:20 UTC
SUSE-SU-2023:4270-1: An update that solves two vulnerabilities can now be installed.

Category: security (moderate)
Bug References: 1128114, 1214726
CVE References: CVE-2019-9545, CVE-2022-37052
Sources used:
openSUSE Leap 15.4 (src): poppler-0.62.0-150000.4.31.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 11 Maintenance Automation 2023-11-03 16:30:06 UTC
SUSE-SU-2023:4362-1: An update that solves nine vulnerabilities can now be installed.

Category: security (moderate)
Bug References: 1112424, 1112428, 1128114, 1129202, 1140745, 1143570, 1214256, 1214723, 1214726
CVE References: CVE-2018-18454, CVE-2018-18456, CVE-2019-13287, CVE-2019-14292, CVE-2019-9545, CVE-2019-9631, CVE-2020-36023, CVE-2022-37052, CVE-2022-48545
Sources used:
SUSE Linux Enterprise Software Development Kit 12 SP5 (src): poppler-qt-0.43.0-16.40.1, poppler-0.43.0-16.40.1
SUSE Linux Enterprise High Performance Computing 12 SP5 (src): poppler-qt-0.43.0-16.40.1, poppler-0.43.0-16.40.1
SUSE Linux Enterprise Server 12 SP5 (src): poppler-qt-0.43.0-16.40.1, poppler-0.43.0-16.40.1
SUSE Linux Enterprise Server for SAP Applications 12 SP5 (src): poppler-qt-0.43.0-16.40.1, poppler-0.43.0-16.40.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 12 Maintenance Automation 2023-11-24 12:30:21 UTC
SUSE-SU-2023:4546-1: An update that solves six vulnerabilities can now be installed.

Category: security (moderate)
Bug References: 1128114, 1129202, 1143570, 1214256, 1214723, 1214726
CVE References: CVE-2019-14292, CVE-2019-9545, CVE-2019-9631, CVE-2020-36023, CVE-2022-37052, CVE-2022-48545
Sources used:
SUSE Linux Enterprise Software Development Kit 12 SP5 (src): poppler-0.24.4-14.41.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 13 Maintenance Automation 2023-11-24 20:30:16 UTC
SUSE-SU-2023:4562-1: An update that solves three vulnerabilities can now be installed.

Category: security (moderate)
Bug References: 1128114, 1214256, 1214726
CVE References: CVE-2019-9545, CVE-2020-36023, CVE-2022-37052
Sources used:
Basesystem Module 15-SP5 (src): poppler-0.79.0-150200.3.26.1
SUSE Manager Proxy 4.2 (src): poppler-0.79.0-150200.3.26.1
SUSE Manager Retail Branch Server 4.2 (src): poppler-0.79.0-150200.3.26.1
SUSE Manager Server 4.2 (src): poppler-0.79.0-150200.3.26.1
openSUSE Leap 15.4 (src): poppler-0.79.0-150200.3.26.1
Basesystem Module 15-SP4 (src): poppler-0.79.0-150200.3.26.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 14 Thomas Leroy 2024-05-07 09:20:21 UTC
All done, closing.