From f6e2e8889be194ff637b4524d5dd2a11fe01966b Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Dec 18 2014 17:40:05 +0000 Subject: import jasper-1.900.1-26.el7_0.2 --- diff --git a/SOURCES/jasper-CVE-2014-8137.patch b/SOURCES/jasper-CVE-2014-8137.patch new file mode 100644 index 0000000..9600cd3 --- /dev/null +++ b/SOURCES/jasper-CVE-2014-8137.patch @@ -0,0 +1,57 @@ +--- jasper-1.900.1.orig/src/libjasper/base/jas_icc.c 2014-12-11 14:06:44.000000000 +0100 ++++ jasper-1.900.1/src/libjasper/base/jas_icc.c 2014-12-11 15:16:37.971272386 +0100 +@@ -1009,7 +1009,6 @@ static int jas_icccurv_input(jas_iccattr + return 0; + + error: +- jas_icccurv_destroy(attrval); + return -1; + } + +@@ -1127,7 +1126,6 @@ static int jas_icctxtdesc_input(jas_icca + #endif + return 0; + error: +- jas_icctxtdesc_destroy(attrval); + return -1; + } + +@@ -1206,8 +1204,6 @@ static int jas_icctxt_input(jas_iccattrv + goto error; + return 0; + error: +- if (txt->string) +- jas_free(txt->string); + return -1; + } + +@@ -1328,7 +1324,6 @@ static int jas_icclut8_input(jas_iccattr + goto error; + return 0; + error: +- jas_icclut8_destroy(attrval); + return -1; + } + +@@ -1497,7 +1492,6 @@ static int jas_icclut16_input(jas_iccatt + goto error; + return 0; + error: +- jas_icclut16_destroy(attrval); + return -1; + } + +--- jasper-1.900.1.orig/src/libjasper/jp2/jp2_dec.c 2014-12-11 14:30:54.193209780 +0100 ++++ jasper-1.900.1/src/libjasper/jp2/jp2_dec.c 2014-12-11 14:36:46.313217814 +0100 +@@ -291,7 +291,10 @@ jas_image_t *jp2_decode(jas_stream_t *in + case JP2_COLR_ICC: + iccprof = jas_iccprof_createfrombuf(dec->colr->data.colr.iccp, + dec->colr->data.colr.iccplen); +- assert(iccprof); ++ if (!iccprof) { ++ jas_eprintf("error: failed to parse ICC profile\n"); ++ goto error; ++ } + jas_iccprof_gethdr(iccprof, &icchdr); + jas_eprintf("ICC Profile CS %08x\n", icchdr.colorspc); + jas_image_setclrspc(dec->image, fromiccpcs(icchdr.colorspc)); diff --git a/SOURCES/jasper-CVE-2014-8138.patch b/SOURCES/jasper-CVE-2014-8138.patch new file mode 100644 index 0000000..5aaf8ab --- /dev/null +++ b/SOURCES/jasper-CVE-2014-8138.patch @@ -0,0 +1,14 @@ +--- jasper-1.900.1.orig/src/libjasper/jp2/jp2_dec.c 2014-12-11 14:06:44.000000000 +0100 ++++ jasper-1.900.1/src/libjasper/jp2/jp2_dec.c 2014-12-11 14:06:26.000000000 +0100 +@@ -386,6 +386,11 @@ jas_image_t *jp2_decode(jas_stream_t *in + /* Determine the type of each component. */ + if (dec->cdef) { + for (i = 0; i < dec->numchans; ++i) { ++ /* Is the channel number reasonable? */ ++ if (dec->cdef->data.cdef.ents[i].channo >= dec->numchans) { ++ jas_eprintf("error: invalid channel number in CDEF box\n"); ++ goto error; ++ } + jas_image_setcmpttype(dec->image, + dec->chantocmptlut[dec->cdef->data.cdef.ents[i].channo], + jp2_getct(jas_image_clrspc(dec->image), diff --git a/SOURCES/jasper-CVE-2014-9029.patch b/SOURCES/jasper-CVE-2014-9029.patch new file mode 100644 index 0000000..98a2035 --- /dev/null +++ b/SOURCES/jasper-CVE-2014-9029.patch @@ -0,0 +1,29 @@ +--- jasper-1.900.1.orig/src/libjasper/jpc/jpc_dec.c 2014-11-27 12:45:44.000000000 +0100 ++++ jasper-1.900.1/src/libjasper/jpc/jpc_dec.c 2014-11-27 12:44:58.000000000 +0100 +@@ -1281,7 +1281,7 @@ static int jpc_dec_process_coc(jpc_dec_t + jpc_coc_t *coc = &ms->parms.coc; + jpc_dec_tile_t *tile; + +- if (JAS_CAST(int, coc->compno) > dec->numcomps) { ++ if (JAS_CAST(int, coc->compno) >= dec->numcomps) { + jas_eprintf("invalid component number in COC marker segment\n"); + return -1; + } +@@ -1307,7 +1307,7 @@ static int jpc_dec_process_rgn(jpc_dec_t + jpc_rgn_t *rgn = &ms->parms.rgn; + jpc_dec_tile_t *tile; + +- if (JAS_CAST(int, rgn->compno) > dec->numcomps) { ++ if (JAS_CAST(int, rgn->compno) >= dec->numcomps) { + jas_eprintf("invalid component number in RGN marker segment\n"); + return -1; + } +@@ -1356,7 +1356,7 @@ static int jpc_dec_process_qcc(jpc_dec_t + jpc_qcc_t *qcc = &ms->parms.qcc; + jpc_dec_tile_t *tile; + +- if (JAS_CAST(int, qcc->compno) > dec->numcomps) { ++ if (JAS_CAST(int, qcc->compno) >= dec->numcomps) { + jas_eprintf("invalid component number in QCC marker segment\n"); + return -1; + } diff --git a/SPECS/jasper.spec b/SPECS/jasper.spec index d421071..d3d244d 100644 --- a/SPECS/jasper.spec +++ b/SPECS/jasper.spec @@ -7,7 +7,7 @@ Summary: Implementation of the JPEG-2000 standard, Part 1 Name: jasper Group: System Environment/Libraries Version: 1.900.1 -Release: 26%{?dist} +Release: 26%{?dist}.2 License: JasPer URL: http://www.ece.uvic.ca/~frodo/jasper/ @@ -32,14 +32,18 @@ Patch7: jasper-pkgconfig.patch Patch8: jasper-1.900.1-CVE-2011-4516-CVE-2011-4517-CERT-VU-887409.patch +Patch9: jasper-CVE-2014-9029.patch +Patch10: jasper-CVE-2014-8137.patch +Patch11: jasper-CVE-2014-8138.patch + # Issues found by static analysis of code -Patch10: jasper-1.900.1-Coverity-BAD_SIZEOF.patch -Patch11: jasper-1.900.1-Coverity-CHECKED_RETURN.patch -Patch12: jasper-1.900.1-Coverity-FORWARD_NULL.patch -Patch13: jasper-1.900.1-Coverity-NULL_RETURNS.patch -Patch14: jasper-1.900.1-Coverity-RESOURCE_LEAK.patch -Patch15: jasper-1.900.1-Coverity-UNREACHABLE.patch -Patch16: jasper-1.900.1-Coverity-UNUSED_VALUE.patch +Patch110: jasper-1.900.1-Coverity-BAD_SIZEOF.patch +Patch111: jasper-1.900.1-Coverity-CHECKED_RETURN.patch +Patch112: jasper-1.900.1-Coverity-FORWARD_NULL.patch +Patch113: jasper-1.900.1-Coverity-NULL_RETURNS.patch +Patch114: jasper-1.900.1-Coverity-RESOURCE_LEAK.patch +Patch115: jasper-1.900.1-Coverity-UNREACHABLE.patch +Patch116: jasper-1.900.1-Coverity-UNUSED_VALUE.patch # autoreconf BuildRequires: autoconf automake libtool @@ -93,14 +97,17 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release} %patch6 -p1 -b .CVE-2008-3522 %patch7 -p1 -b .pkgconfig %patch8 -p1 -b .CVE-2011-4516-4517 - -%patch10 -p1 -b .BAD_SIZEOF -%patch11 -p1 -b .CHECKED_RETURN -%patch12 -p1 -b .FORWARD_NULL -%patch13 -p1 -b .NULL_RETURNS -%patch14 -p1 -b .RESOURCE_LEAK -%patch15 -p1 -b .UNREACHABLE -%patch16 -p1 -b .UNUSED_VALUE +%patch9 -p1 -b .CVE-2014-9029 +%patch10 -p1 -b .CVE-2014-8137 +%patch11 -p1 -b .CVE-2014-8138 + +%patch110 -p1 -b .BAD_SIZEOF +%patch111 -p1 -b .CHECKED_RETURN +%patch112 -p1 -b .FORWARD_NULL +%patch113 -p1 -b .NULL_RETURNS +%patch114 -p1 -b .RESOURCE_LEAK +%patch115 -p1 -b .UNREACHABLE +%patch116 -p1 -b .UNUSED_VALUE autoreconf --verbose --force --install @@ -170,6 +177,14 @@ make check %changelog +* Fri Dec 12 2014 Jiri Popelka - 1.900.1-26.2 +- CVE-2014-8137 - double-free in in jas_iccattrval_destroy (#1173568) +- CVE-2014-8138 - heap overflow in jp2_decode (#1173568) + +* Sat Dec 06 2014 Jiri Popelka - 1.900.1-26.1 +- CVE-2014-9029 - incorrect component number check in COC, RGN and QCC + marker segment decoders (#1171210) + * Fri Jan 24 2014 Daniel Mach - 1.900.1-26 - Mass rebuild 2014-01-24