This repository has been archived by the owner on Sep 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update openjpeg to 2.2.0 to address multiple CVEs
Summary: This new release includes a significant number of improvements and bug fixes. In particular: - Multi-threading support at decoding side - Several speed optimisations both at encoder and decoder, and both on Wavelet Transform and Entropy Coding parts. On our test set, a single-threaded execution is now around 20% faster (encoding or decoding). - Huge memory consumption reduction at decoding side (~60% reduction on large images) - Several important bug fixes, in particular the one that was preventing OpenJPEG to encode lossless in some specific situations, as well as those related to mode switches (BYPASS/LAZY, RESTART/TERMALL, etc). - Several security fixes thanks to the inclusion of OpenJPEG in the Google OSS Fuzz project. Beside that, several improvements have been brought to the project maintenance, like inclusion of benchmarking scripts to compare speed with latest available kakadu binaries. Security fixes: - CVE-2016-5139, CVE-2016-5152, CVE-2016-5158, CVE-2016-5159 [#854](uclouvain/openjpeg#854) - CVE-2016-1626 and CVE-2016-1628 [#850](uclouvain/openjpeg#850) For more info check the [NEWS](https://github.com/uclouvain/openjpeg/blob/v2.2.0/NEWS.md) and the [Changelog](https://github.com/uclouvain/openjpeg/blob/v2.2.0/CHANGELOG.md) Signed-off-by: Pierre-Yves <[email protected]> Test Plan: ``` $ opj_compress -i test.png -o test.j2k [INFO] tile number 1 / 1 [INFO] Generated outfile test.j2k encode time: 283 ms ``` Reviewers: #triage_team, JoshStrobl Reviewed By: #triage_team, JoshStrobl Subscribers: sunnyflunk, JoshStrobl Tags: #security Differential Revision: https://dev.solus-project.com/D794
- Loading branch information
1 parent
5671fff
commit 01687bc
Showing
14 changed files
with
104 additions
and
723 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,6 @@ libc.so.6 | |
liblcms2.so.2 | ||
libm.so.6 | ||
libpng15.so.15 | ||
libpthread.so.0 | ||
librt.so.1 | ||
libtiff.so.5 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
From e0047b38dee408a63e0af72823d8a00eb8681779 Mon Sep 17 00:00:00 2001 | ||
From: Hans Petter Jansson <[email protected]> | ||
Date: Wed, 14 Dec 2016 21:34:11 +0100 | ||
Subject: [PATCH 03/10] CVE-2016-9113 | ||
From b5039e257dafbb58ddc60e78c887dd45de62e19d Mon Sep 17 00:00:00 2001 | ||
From: Pierre-Yves <[email protected]> | ||
Date: Thu, 10 Aug 2017 11:43:01 +0200 | ||
Subject: [PATCH] CVE-2016-9113 | ||
|
||
Signed-off-by: Pierre-Yves <[email protected]> | ||
--- | ||
src/bin/jp2/convertbmp.c | 10 ++++++++++ | ||
1 file changed, 10 insertions(+) | ||
|
||
diff --git a/src/bin/jp2/convertbmp.c b/src/bin/jp2/convertbmp.c | ||
index 40b0325..15942bf 100644 | ||
index b49e7a0..3356b23 100644 | ||
--- a/src/bin/jp2/convertbmp.c | ||
+++ b/src/bin/jp2/convertbmp.c | ||
@@ -1049,6 +1049,11 @@ int imagetobmp(opj_image_t * image, const char *outfile) { | ||
&& image->comps[0].prec == image->comps[1].prec | ||
&& image->comps[1].prec == image->comps[2].prec) { | ||
@@ -845,6 +845,11 @@ int imagetobmp(opj_image_t * image, const char *outfile) | ||
&& image->comps[0].sgnd == image->comps[1].sgnd | ||
&& image->comps[1].sgnd == image->comps[2].sgnd) { | ||
|
||
+ if (!image->comps[0].data || !image->comps[1].data || !image->comps[2].data) { | ||
+ fprintf(stderr, "ERROR -> Missing image data in input file\n"); | ||
|
@@ -23,9 +24,9 @@ index 40b0325..15942bf 100644 | |
/* -->> -->> -->> -->> | ||
24 bits color | ||
<<-- <<-- <<-- <<-- */ | ||
@@ -1148,6 +1153,11 @@ int imagetobmp(opj_image_t * image, const char *outfile) { | ||
@@ -974,6 +979,11 @@ int imagetobmp(opj_image_t * image, const char *outfile) | ||
fclose(fdest); | ||
} else { /* Gray-scale */ | ||
} else { /* Gray-scale */ | ||
|
||
+ if (!image->comps[0].data) { | ||
+ fprintf(stderr, "ERROR -> Missing image data in input file\n"); | ||
|
@@ -36,5 +37,5 @@ index 40b0325..15942bf 100644 | |
8 bits non code (Gray scale) | ||
<<-- <<-- <<-- <<-- */ | ||
-- | ||
1.8.4.5 | ||
2.13.4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,35 @@ | ||
From 525525ecc7c70a078b5372df2484a8d0cd1c84e5 Mon Sep 17 00:00:00 2001 | ||
From: Hans Petter Jansson <[email protected]> | ||
Date: Wed, 14 Dec 2016 21:46:14 +0100 | ||
Subject: [PATCH 4/9] CVE-2016-9114 | ||
From de42fd16c5cacfc76c45771632946cffd3e8a3ec Mon Sep 17 00:00:00 2001 | ||
From: Pierre-Yves <[email protected]> | ||
Date: Thu, 10 Aug 2017 13:25:42 +0200 | ||
Subject: [PATCH] CVE-2016-9114 | ||
|
||
Signed-off-by: Pierre-Yves <[email protected]> | ||
--- | ||
src/bin/jp2/convert.c | 4 ++-- | ||
1 file changed, 2 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/src/bin/jp2/convert.c b/src/bin/jp2/convert.c | ||
index ee65920..63703a8 100644 | ||
index e2e1602..86743de 100644 | ||
--- a/src/bin/jp2/convert.c | ||
+++ b/src/bin/jp2/convert.c | ||
@@ -2153,7 +2153,7 @@ if(v > 65535) v = 65535; else if(v < 0) v = 0; | ||
@@ -2137,7 +2137,7 @@ int imagetopnm(opj_image_t * image, const char *outfile, int force_split) | ||
adjustR = | ||
(image->comps[compno].sgnd ? 1 << (image->comps[compno].prec - 1) : 0); | ||
(image->comps[compno].sgnd ? 1 << (image->comps[compno].prec - 1) : 0); | ||
|
||
- if(prec > 8) | ||
+ if(prec > 8 && red) | ||
{ | ||
for (i = 0; i < wr * hr; i++) | ||
{ | ||
@@ -2173,7 +2173,7 @@ if(v > 65535) v = 65535; else if(v < 0) v = 0; | ||
- if (prec > 8) { | ||
+ if (prec > 8 && red) { | ||
for (i = 0; i < wr * hr; i++) { | ||
v = *red + adjustR; | ||
++red; | ||
@@ -2162,7 +2162,7 @@ int imagetopnm(opj_image_t * image, const char *outfile, int force_split) | ||
fprintf(fdest, "%c%c", (unsigned char)(v >> 8), (unsigned char)v); | ||
} | ||
}/* for(i */ | ||
} | ||
- else /* prec <= 8 */ | ||
+ else if (red) /* prec <= 8 */ | ||
{ | ||
for(i = 0; i < wr * hr; ++i) | ||
{ | ||
- } else { /* prec <= 8 */ | ||
+ } else if (red) { /* prec <= 8 */ | ||
for (i = 0; i < wr * hr; ++i) { | ||
v = *red + adjustR; | ||
++red; | ||
-- | ||
1.8.4.5 | ||
2.13.4 | ||
|
Oops, something went wrong.