pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/graphics/openjpeg
Module Name: pkgsrc
Committed By: nia
Date: Tue May 12 10:44:46 UTC 2020
Modified Files:
pkgsrc/graphics/openjpeg: Makefile distinfo
Added Files:
pkgsrc/graphics/openjpeg/patches: patch-src_lib_openjp2_j2k.c
patch-src_lib_openjp2_tcd.c
Log Message:
openjpeg: Cherrypick fixes for the following CVEs from upstream:
https://nvd.nist.gov/vuln/detail/CVE-2020-6851 - out-of-bounds-write
https://nvd.nist.gov/vuln/detail/CVE-2020-8112 - heap-overflow
Please make releases for your software. :/
Bump PKGREVISION
To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 pkgsrc/graphics/openjpeg/Makefile
cvs rdiff -u -r1.17 -r1.18 pkgsrc/graphics/openjpeg/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/graphics/openjpeg/patches/patch-src_lib_openjp2_j2k.c \
pkgsrc/graphics/openjpeg/patches/patch-src_lib_openjp2_tcd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/graphics/openjpeg/Makefile
diff -u pkgsrc/graphics/openjpeg/Makefile:1.20 pkgsrc/graphics/openjpeg/Makefile:1.21
--- pkgsrc/graphics/openjpeg/Makefile:1.20 Sun Jan 26 17:31:22 2020
+++ pkgsrc/graphics/openjpeg/Makefile Tue May 12 10:44:46 2020
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.20 2020/01/26 17:31:22 rillig Exp $
+# $NetBSD: Makefile,v 1.21 2020/05/12 10:44:46 nia Exp $
DISTNAME= openjpeg-2.3.1
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= graphics
MASTER_SITES= ${MASTER_SITE_GITHUB:=uclouvain/}
GITHUB_TAG= v${PKGVERSION_NOREV}
Index: pkgsrc/graphics/openjpeg/distinfo
diff -u pkgsrc/graphics/openjpeg/distinfo:1.17 pkgsrc/graphics/openjpeg/distinfo:1.18
--- pkgsrc/graphics/openjpeg/distinfo:1.17 Tue Jan 7 20:19:45 2020
+++ pkgsrc/graphics/openjpeg/distinfo Tue May 12 10:44:46 2020
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.17 2020/01/07 20:19:45 sevan Exp $
+$NetBSD: distinfo,v 1.18 2020/05/12 10:44:46 nia Exp $
SHA1 (openjpeg-2.3.1.tar.gz) = 38321fa9730252039ad0b7f247a160a8164f5871
RMD160 (openjpeg-2.3.1.tar.gz) = 31b75aa70f5d26dd1b7e374a9e4b6be1842fefe7
@@ -8,5 +8,7 @@ SHA1 (patch-CMakeLists.txt) = 3738946db6
SHA1 (patch-src_bin_jp2_CMakeLists.txt) = c9f709c23d6bab7a3c705640d66a00ec90ddabc7
SHA1 (patch-src_bin_jp2_convertbmp.c) = bceb4a99820568386e48eb00ab13ab9987d1e86a
SHA1 (patch-src_lib_openjp2_CMakeLists.txt) = d839121ec2d008e5d3e1676d3e7ac3642bc946f7
+SHA1 (patch-src_lib_openjp2_j2k.c) = b342aa64c6583a8e4f79495412e5506f40a9023e
SHA1 (patch-src_lib_openjp2_opj__config__private.h.cmake.in) = fc0c170789dbe0a2ebc9dce0ef0d21aa6b2edd49
+SHA1 (patch-src_lib_openjp2_tcd.c) = da3354c101485f1b5f92f59d5f1be07a006e3056
SHA1 (patch-src_lib_openmj2_t2.c) = a4ce0faa349f1a23453ef7632fbcc3af2d045337
Added files:
Index: pkgsrc/graphics/openjpeg/patches/patch-src_lib_openjp2_j2k.c
diff -u /dev/null pkgsrc/graphics/openjpeg/patches/patch-src_lib_openjp2_j2k.c:1.1
--- /dev/null Tue May 12 10:44:46 2020
+++ pkgsrc/graphics/openjpeg/patches/patch-src_lib_openjp2_j2k.c Tue May 12 10:44:46 2020
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_lib_openjp2_j2k.c,v 1.1 2020/05/12 10:44:46 nia Exp $
+
+CVE-2020-6851
+https://github.com/uclouvain/openjpeg/commit/d7064fad0f8a2b485c4b520697e6741c6d94f5c5.patch
+
+--- src/lib/openjp2/j2k.c.orig 2019-04-02 12:45:15.000000000 +0000
++++ src/lib/openjp2/j2k.c
+@@ -9236,6 +9236,14 @@ static OPJ_BOOL opj_j2k_update_image_dim
+ l_img_comp = p_image->comps;
+ for (it_comp = 0; it_comp < p_image->numcomps; ++it_comp) {
+ OPJ_INT32 l_h, l_w;
++ if( p_image->x0 > (OPJ_UINT32)INT_MAX ||
++ p_image->y0 > (OPJ_UINT32)INT_MAX ||
++ p_image->x1 > (OPJ_UINT32)INT_MAX ||
++ p_image->y1 > (OPJ_UINT32)INT_MAX ) {
++ opj_event_msg(p_manager, EVT_ERROR,
++ "Image coordinates above INT_MAX are not supported\n");
++ return OPJ_FALSE;
++ }
+
+ l_img_comp->x0 = (OPJ_UINT32)opj_int_ceildiv((OPJ_INT32)p_image->x0,
+ (OPJ_INT32)l_img_comp->dx);
Index: pkgsrc/graphics/openjpeg/patches/patch-src_lib_openjp2_tcd.c
diff -u /dev/null pkgsrc/graphics/openjpeg/patches/patch-src_lib_openjp2_tcd.c:1.1
--- /dev/null Tue May 12 10:44:46 2020
+++ pkgsrc/graphics/openjpeg/patches/patch-src_lib_openjp2_tcd.c Tue May 12 10:44:46 2020
@@ -0,0 +1,34 @@
+$NetBSD: patch-src_lib_openjp2_tcd.c,v 1.1 2020/05/12 10:44:46 nia Exp $
+
+CVE-2020-8112
+https://github.com/uclouvain/openjpeg/commit/05f9b91e60debda0e83977e5e63b2e66486f7074.patch
+
+--- src/lib/openjp2/tcd.c.orig 2019-04-02 12:45:15.000000000 +0000
++++ src/lib/openjp2/tcd.c
+@@ -905,8 +905,24 @@ static INLINE OPJ_BOOL opj_tcd_init_tile
+ /* p. 64, B.6, ISO/IEC FDIS15444-1 : 2000 (18 august 2000) */
+ l_tl_prc_x_start = opj_int_floordivpow2(l_res->x0, (OPJ_INT32)l_pdx) << l_pdx;
+ l_tl_prc_y_start = opj_int_floordivpow2(l_res->y0, (OPJ_INT32)l_pdy) << l_pdy;
+- l_br_prc_x_end = opj_int_ceildivpow2(l_res->x1, (OPJ_INT32)l_pdx) << l_pdx;
+- l_br_prc_y_end = opj_int_ceildivpow2(l_res->y1, (OPJ_INT32)l_pdy) << l_pdy;
++ {
++ OPJ_UINT32 tmp = ((OPJ_UINT32)opj_int_ceildivpow2(l_res->x1,
++ (OPJ_INT32)l_pdx)) << l_pdx;
++ if (tmp > (OPJ_UINT32)INT_MAX) {
++ opj_event_msg(manager, EVT_ERROR, "Integer overflow\n");
++ return OPJ_FALSE;
++ }
++ l_br_prc_x_end = (OPJ_INT32)tmp;
++ }
++ {
++ OPJ_UINT32 tmp = ((OPJ_UINT32)opj_int_ceildivpow2(l_res->y1,
++ (OPJ_INT32)l_pdy)) << l_pdy;
++ if (tmp > (OPJ_UINT32)INT_MAX) {
++ opj_event_msg(manager, EVT_ERROR, "Integer overflow\n");
++ return OPJ_FALSE;
++ }
++ l_br_prc_y_end = (OPJ_INT32)tmp;
++ }
+ /*fprintf(stderr, "\t\t\tprc_x_start=%d, prc_y_start=%d, br_prc_x_end=%d, br_prc_y_end=%d \n", l_tl_prc_x_start, l_tl_prc_y_start, l_br_prc_x_end ,l_br_prc_y_end );*/
+
+ l_res->pw = (l_res->x0 == l_res->x1) ? 0U : (OPJ_UINT32)((
Home |
Main Index |
Thread Index |
Old Index