Bug 26601 - jbig2dec new security issue CVE-2020-12268
Summary: jbig2dec new security issue CVE-2020-12268
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: Security (show other bugs)
Version: 7
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact: Sec team
URL:
Whiteboard: MGA7-64-OK
Keywords: advisory, validated_update
Depends on:
Blocks:
 
Reported: 2020-05-08 01:46 CEST by David Walser
Modified: 2020-05-15 17:49 CEST (History)
6 users (show)

See Also:
Source RPM: jbig2dec-0.17-2.mga8.src.rpm
CVE:
Status comment:


Attachments

Description David Walser 2020-05-08 01:46:16 CEST
SUSE has issued an advisory today (May 7):
http://lists.suse.com/pipermail/sle-security-updates/2020-May/006802.html

The issue is fixed upstream in 0.18.

Mageia 7 is also affected.
David Walser 2020-05-08 02:04:00 CEST

Status comment: (none) => Fixed upstream in 0.18
Whiteboard: (none) => MGA7TOO

Comment 1 David GEIGER 2020-05-08 11:55:46 CEST
Done for Cauldron and mga7!

CC: (none) => geiger.david68210

Comment 2 Lewis Smith 2020-05-08 20:07:37 CEST
Once again, thanks for an ultra-speedy response.
Alors, assigning this to you!

Assignee: bugsquad => geiger.david68210

Comment 3 David Walser 2020-05-09 04:30:08 CEST
Advisory:
========================

Updated jbig2dec packages fix security vulnerability:

jbig2_image_compose in jbig2_image.c in Artifex jbig2dec before 0.18 has a
heap-based buffer overflow (CVE-2020-12268).

References:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-12268
http://lists.suse.com/pipermail/sle-security-updates/2020-May/006802.html
========================

Updated packages in core/updates_testing:
========================
jbig2dec-0.18-1.mga7
libjbig2dec0-0.18-1.mga7
libjbig2dec-devel-0.18-1.mga7

from jbig2dec-0.18-1.mga7.src.rpm

Status comment: Fixed upstream in 0.18 => (none)
Whiteboard: MGA7TOO => (none)
Assignee: geiger.david68210 => qa-bugs
Version: Cauldron => 7

Comment 4 Herman Viaene 2020-05-10 10:06:09 CEST
MGA7-64 Plasma on Lenovo B50
No installation issues.
Ref bug 22065 would OK on clean install. Nevertheless tried to find something on the net to test.
Found https://jbig2dec.com/ and quote from it: "This is a decoder only implementation, and its primary use is in Ghostscript and MuPDF for decoding JBIG2 streams in PDF files. Thus its primary focus is the set of JBIG2 features supported in PDF." It also refers to some test files, downloaded the pdf file from it and tried the command line.
$ jbig2dec t89-halftone.pdf
jbig2dec FATAL ERROR not a JBIG2 file header 
jbig2dec FATAL ERROR page has no image, cannot be completed 
jbig2dec WARNING unable to complete page 

So whether it's me, but i cann't demonstrate anything this way. Leaving for others to judge upon this update.

CC: (none) => herman.viaene

Comment 5 Herman Viaene 2020-05-10 10:11:13 CEST
Tried to downgradealong the instructions of QArepo:
# urpmi --update --downgrade jbig2dec lib64jbig2dec0
No package named jbig2dec
No package named lib64jbig2dec0
Comment 6 Len Lawrence 2020-05-10 11:35:11 CEST
@Herman: comment 4
Thanks for your efforts Herman and the link.
Looks like the PDF file may be a summary of the background principles rather than a suitable test file.  It can be read in a normal PDF reader like xpdf.

Before update a run on the test case at https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20332 resulted in a loop (?) where one or other of the cpu cores hit 100%.  It is meant to be run under asan though so this is probably not a legitimate test.

One of the test files from https://jbig2dec.com/tests/index.html:  
$ jbig2dec 042_11.jb2 
unsupported output format: 0
$ jbig2dec -o whatever.pbm 042_11.jb2
$ ll *.pbm
-rw-r--r-- 1 lcl lcl 505237 May 10 10:14 whatever.pbm
$ display whatever.pbm
produced an image of a page of text showing degradation from top to bottom.

Updated the packages.
$ jbig2dec -o test.pbm clusterfuzz-testcase-minimized-jbig2_fuzzer-5647271708590080
jbig2dec FATAL ERROR not enough data for decoding (-780016/4) (segment 0x200001)
jbig2dec WARNING failed to decode; treating as end of file (segment 0x200001)
jbig2dec FATAL ERROR page has no image, cannot be completed 
jbig2dec WARNING unable to complete page 

That looks like a good result for the PoC.
$ jbig2dec -o updated.pbm 042_11.jb2
$ display updated.pbm
Shows the same image as before so this bug can be cleared.

Whiteboard: (none) => MGA7-64-OK
CC: (none) => tarazed25

Comment 7 Thomas Andrews 2020-05-10 19:12:57 CEST
Validating. Advisory in Comment 3.

Keywords: (none) => validated_update
CC: (none) => andrewsfarm, sysadmin-bugs

Thomas Backlund 2020-05-15 16:44:52 CEST

CC: (none) => tmb
Keywords: (none) => advisory

Comment 8 Mageia Robot 2020-05-15 17:49:36 CEST
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGASA-2020-0213.html

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.