# HG changeset patch # User Christopher Rogers # Date 1302608248 0 # Node ID 85e2616a71233a57a1049883b94572647d1fb784 # Parent 540e07f1f4e176c12b412dc131812afddf775712 Up: tiff to 3.9.5. diff -r 540e07f1f4e1 -r 85e2616a7123 tiff-apps/receipt --- a/tiff-apps/receipt Tue Apr 12 11:24:03 2011 +0000 +++ b/tiff-apps/receipt Tue Apr 12 11:37:28 2011 +0000 @@ -1,7 +1,7 @@ # SliTaz package receipt. PACKAGE="tiff-apps" -VERSION="3.9.4" +VERSION="3.9.5" CATEGORY="x-window" SHORT_DESC="TIFF images manipulation cli applications. (Check tiff for libs)." MAINTAINER="pankso@slitaz.org" @@ -12,6 +12,6 @@ # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { - mkdir -p $fs/usr + mkdir -p $fs/usr cp -a $_pkg/usr/bin $fs/usr } diff -r 540e07f1f4e1 -r 85e2616a7123 tiff-dev/receipt --- a/tiff-dev/receipt Tue Apr 12 11:24:03 2011 +0000 +++ b/tiff-dev/receipt Tue Apr 12 11:37:28 2011 +0000 @@ -1,7 +1,7 @@ # SliTaz package receipt. PACKAGE="tiff-dev" -VERSION="3.9.4" +VERSION="3.9.5" CATEGORY="development" SHORT_DESC="TIFF images libs devel files. (Check tiff-apps for utilities)." MAINTAINER="pankso@slitaz.org" @@ -12,7 +12,7 @@ # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { - mkdir -p $fs/usr/lib + mkdir -p $fs/usr/lib cp -a $_pkg/usr/lib/*.*a $fs/usr/lib cp -a $_pkg/usr/include $fs/usr } diff -r 540e07f1f4e1 -r 85e2616a7123 tiff/receipt --- a/tiff/receipt Tue Apr 12 11:24:03 2011 +0000 +++ b/tiff/receipt Tue Apr 12 11:37:28 2011 +0000 @@ -1,7 +1,7 @@ # SliTaz package receipt. PACKAGE="tiff" -VERSION="3.9.4" +VERSION="3.9.5" CATEGORY="x-window" SHORT_DESC="TIFF images libs. (Check tiff-apps for utilities)." MAINTAINER="pankso@slitaz.org" @@ -15,16 +15,6 @@ { cd $src - # Added patch to fix CVE-2009-2285 - # Bufffer underflow in the LZWDecodeCompat function in libtiff 3.8.2 - # allows context-dependent attackers to cause a denial of service - # (crash) via a crafted TIFF imag. - - patch -Np1 -i $stuff/libtiff-CVE-2009-2285.patch - #http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-0192 - patch -Np1 -i $stuff/libtiff-CVE-2011-0192.patch - #http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-1167 - patch -Np1 -i $stuff/libtiff-CVE-2011-1167.patch ./configure && make && make install diff -r 540e07f1f4e1 -r 85e2616a7123 tiff/stuff/libtiff-CVE-2009-2285.patch --- a/tiff/stuff/libtiff-CVE-2009-2285.patch Tue Apr 12 11:24:03 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -Index: tiff-3.8.2/libtiff/tif_lzw.c -=================================================================== ---- tiff-3.8.2.orig/libtiff/tif_lzw.c -+++ tiff-3.8.2/libtiff/tif_lzw.c -@@ -421,7 +421,7 @@ LZWDecode(TIFF* tif, tidata_t op0, tsize - NextCode(tif, sp, bp, code, GetNextCode); - if (code == CODE_EOI) - break; -- if (code == CODE_CLEAR) { -+ if (code >= CODE_CLEAR) { - TIFFErrorExt(tif->tif_clientdata, tif->tif_name, - "LZWDecode: Corrupted LZW table at scanline %d", - tif->tif_row); -@@ -624,7 +624,7 @@ LZWDecodeCompat(TIFF* tif, tidata_t op0, - NextCode(tif, sp, bp, code, GetNextCodeCompat); - if (code == CODE_EOI) - break; -- if (code == CODE_CLEAR) { -+ if (code >= CODE_CLEAR) { - TIFFErrorExt(tif->tif_clientdata, tif->tif_name, - "LZWDecode: Corrupted LZW table at scanline %d", - tif->tif_row); diff -r 540e07f1f4e1 -r 85e2616a7123 tiff/stuff/libtiff-CVE-2011-0192.patch --- a/tiff/stuff/libtiff-CVE-2011-0192.patch Tue Apr 12 11:24:03 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -Protect against a fax VL(n) codeword commanding a move left. Without -this, a malicious input file can generate an indefinitely large series -of runs without a0 ever reaching the right margin, thus overrunning -our buffer of run lengths. Per CVE-2011-0192. This is a modified -version of a patch proposed by Drew Yao of Apple Product Security. -It adds an unexpected() report, and disallows the equality case except -for the first run of a line, since emitting a run without increasing a0 -still allows buffer overrun. (We have to allow it for the first run to -cover the case of encoding a zero-length run at start of line using VL.) - - -diff -Naur tiff-3.9.4.orig/libtiff/tif_fax3.h tiff-3.9.4/libtiff/tif_fax3.h ---- tiff-3.9.4.orig/libtiff/tif_fax3.h 2010-06-08 14:50:42.000000000 -0400 -+++ tiff-3.9.4/libtiff/tif_fax3.h 2011-03-10 12:11:20.850839162 -0500 -@@ -478,6 +478,12 @@ - break; \ - case S_VL: \ - CHECK_b1; \ -+ if (b1 <= (int) (a0 + TabEnt->Param)) { \ -+ if (b1 < (int) (a0 + TabEnt->Param) || pa != thisrun) { \ -+ unexpected("VL", a0); \ -+ goto eol2d; \ -+ } \ -+ } \ - SETVALUE(b1 - a0 - TabEnt->Param); \ - b1 -= *--pb; \ - break; \ diff -r 540e07f1f4e1 -r 85e2616a7123 tiff/stuff/libtiff-CVE-2011-1167.patch --- a/tiff/stuff/libtiff-CVE-2011-1167.patch Tue Apr 12 11:24:03 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -Upstream patch for CVE-2011-1167, heap-based buffer overflow in thunder -decoder (ZDI-CAN-1004). - - -diff -Naur tiff-3.9.4.orig/libtiff/tif_thunder.c tiff-3.9.4/libtiff/tif_thunder.c ---- tiff-3.9.4.orig/libtiff/tif_thunder.c 2010-06-08 14:50:43.000000000 -0400 -+++ tiff-3.9.4/libtiff/tif_thunder.c 2011-03-18 12:17:13.635796403 -0400 -@@ -55,12 +55,32 @@ - static const int twobitdeltas[4] = { 0, 1, 0, -1 }; - static const int threebitdeltas[8] = { 0, 1, 2, 3, 0, -3, -2, -1 }; - --#define SETPIXEL(op, v) { \ -- lastpixel = (v) & 0xf; \ -- if (npixels++ & 1) \ -- *op++ |= lastpixel; \ -- else \ -+#define SETPIXEL(op, v) { \ -+ lastpixel = (v) & 0xf; \ -+ if ( npixels < maxpixels ) \ -+ { \ -+ if (npixels++ & 1) \ -+ *op++ |= lastpixel; \ -+ else \ - op[0] = (tidataval_t) (lastpixel << 4); \ -+ } \ -+} -+ -+static int -+ThunderSetupDecode(TIFF* tif) -+{ -+ static const char module[] = "ThunderSetupDecode"; -+ -+ if( tif->tif_dir.td_bitspersample != 4 ) -+ { -+ TIFFErrorExt(tif->tif_clientdata, module, -+ "Wrong bitspersample value (%d), Thunder decoder only supports 4bits per sample.", -+ (int) tif->tif_dir.td_bitspersample ); -+ return 0; -+ } -+ -+ -+ return (1); - } - - static int -@@ -151,6 +171,7 @@ - (void) scheme; - tif->tif_decoderow = ThunderDecodeRow; - tif->tif_decodestrip = ThunderDecodeRow; -+ tif->tif_setupdecode = ThunderSetupDecode; - return (1); - } - #endif /* THUNDER_SUPPORT */