From 19a54d92a6d627d8dbb677816750b4d8661db10e Mon Sep 17 00:00:00 2001 From: dholland Date: Sat, 21 Sep 2013 18:47:05 +0000 Subject: Add upstream candidate patch for CVE-2013-4243. PKGREVISION -> 6 --- graphics/tiff/Makefile | 4 +-- graphics/tiff/distinfo | 3 ++- graphics/tiff/patches/patch-CVE-2013-4243 | 45 +++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 graphics/tiff/patches/patch-CVE-2013-4243 (limited to 'graphics/tiff') diff --git a/graphics/tiff/Makefile b/graphics/tiff/Makefile index b58acddc568..34f1bc6a437 100644 --- a/graphics/tiff/Makefile +++ b/graphics/tiff/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.115 2013/08/28 16:51:36 richard Exp $ +# $NetBSD: Makefile,v 1.116 2013/09/21 18:47:05 dholland Exp $ DISTNAME= tiff-4.0.3 -PKGREVISION= 5 +PKGREVISION= 6 CATEGORIES= graphics MASTER_SITES= ftp://ftp.remotesensing.org/pub/libtiff/ \ http://libtiff.maptools.org/dl/ diff --git a/graphics/tiff/distinfo b/graphics/tiff/distinfo index 3a5b6aedcbe..a296f1013da 100644 --- a/graphics/tiff/distinfo +++ b/graphics/tiff/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.61 2013/08/15 14:58:46 drochner Exp $ +$NetBSD: distinfo,v 1.62 2013/09/21 18:47:05 dholland Exp $ SHA1 (tiff-4.0.3.tar.gz) = 652e97b78f1444237a82cbcfe014310e776eb6f0 RMD160 (tiff-4.0.3.tar.gz) = eacd725fb3c299682c1c2e508049d98acd170f31 @@ -6,4 +6,5 @@ Size (tiff-4.0.3.tar.gz) = 2051630 bytes SHA1 (patch-CVE-2012-4564) = bda3b26e431e8234e5afd984a086c980a8eb6c41 SHA1 (patch-CVE-2013-1960_1961) = b815edbeeb1eb23ce2633060dd390985dec794f3 SHA1 (patch-CVE-2013-4231) = bc1420583b9c4b0a34d26142bc35b6d0d26af529 +SHA1 (patch-CVE-2013-4243) = e5d37df64620451f9a34a3f6c14825873db9c1bd SHA1 (patch-configure) = 1fb9ef790a59ac9c1396dd8e962c75946e2c998a diff --git a/graphics/tiff/patches/patch-CVE-2013-4243 b/graphics/tiff/patches/patch-CVE-2013-4243 new file mode 100644 index 00000000000..e71ac593450 --- /dev/null +++ b/graphics/tiff/patches/patch-CVE-2013-4243 @@ -0,0 +1,45 @@ +$NetBSD: patch-CVE-2013-4243,v 1.1 2013/09/21 18:47:05 dholland Exp $ + +Upstream candidate patch for CVE 2013-4243. +taken from http://bugzilla.maptools.org/attachment.cgi?id=518 +(via http://bugzilla.maptools.org/show_bug.cgi?id=2451) + +Despite looking suspect with respect to integer overflows, this +appears to be ok, as long as you aren't on a 16-bit platform, because +the largest image size the input can encode is apparently 65535*65535. + +--- tools/gif2tiff.c.orig 2013-09-21 18:45:13.000000000 +0000 ++++ tools/gif2tiff.c +@@ -280,6 +280,10 @@ readgifimage(char* mode) + fprintf(stderr, "no colormap present for image\n"); + return (0); + } ++ if (width == 0 || height == 0) { ++ fprintf(stderr, "Invalid value of width or height\n"); ++ return(0); ++ } + if ((raster = (unsigned char*) _TIFFmalloc(width*height+EXTRAFUDGE)) == NULL) { + fprintf(stderr, "not enough memory for image\n"); + return (0); +@@ -406,6 +410,10 @@ process(register int code, unsigned char + fprintf(stderr, "bad input: code=%d is larger than clear=%d\n",code, clear); + return 0; + } ++ if (*fill >= raster + width*height) { ++ fprintf(stderr, "raster full before eoi code\n"); ++ return 0; ++ } + *(*fill)++ = suffix[code]; + firstchar = oldcode = code; + return 1; +@@ -436,6 +444,10 @@ process(register int code, unsigned char + } + oldcode = incode; + do { ++ if (*fill >= raster + width*height) { ++ fprintf(stderr, "raster full before eoi code\n"); ++ return 0; ++ } + *(*fill)++ = *--stackp; + } while (stackp > stack); + return 1; -- cgit v1.2.3