[libtiff] Add upstream patches for CVE-2013-4243 (#996832)
Petr Hracek
phracek at fedoraproject.org
Wed May 21 14:06:29 UTC 2014
commit 19774ff309bdb072f6585ed92e454036f34213f7
Author: Petr Hracek <phracek at redhat.com>
Date: Wed May 21 15:50:08 2014 +0200
Add upstream patches for CVE-2013-4243 (#996832)
libtiff-CVE-2013-4243.patch | 41 +++++++++++++++++++++++++++++++++++++++++
libtiff.spec | 7 ++++++-
2 files changed, 47 insertions(+), 1 deletions(-)
---
diff --git a/libtiff-CVE-2013-4243.patch b/libtiff-CVE-2013-4243.patch
new file mode 100644
index 0000000..c365d99
--- /dev/null
+++ b/libtiff-CVE-2013-4243.patch
@@ -0,0 +1,41 @@
+diff --git a/tools/gif2tiff.c b/tools/gif2tiff.c
+index 2731273..ca824e2 100644
+--- a/tools/gif2tiff.c
++++ b/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,7 +410,11 @@ process(register int code, unsigned char** fill)
+ fprintf(stderr, "bad input: code=%d is larger than clear=%d\n",code, clear);
+ return 0;
+ }
+- *(*fill)++ = suffix[code];
++ if (*fill >= raster + width*height) {
++ fprintf(stderr, "raster full before eoi code\n");
++ return 0;
++ }
++ *(*fill)++ = suffix[code];
+ firstchar = oldcode = code;
+ return 1;
+ }
+@@ -436,7 +444,11 @@ process(register int code, unsigned char** fill)
+ }
+ oldcode = incode;
+ do {
+- *(*fill)++ = *--stackp;
++ if (*fill >= raster + width*height) {
++ fprintf(stderr, "raster full before eoi code\n");
++ return 0;
++ }
++ *(*fill)++ = *--stackp;
+ } while (stackp > stack);
+ return 1;
+ }
diff --git a/libtiff.spec b/libtiff.spec
index 9f5a647..5cb14ff 100644
--- a/libtiff.spec
+++ b/libtiff.spec
@@ -1,7 +1,7 @@
Summary: Library of functions for manipulating TIFF format image files
Name: libtiff
Version: 4.0.3
-Release: 14%{?dist}
+Release: 15%{?dist}
License: libtiff
Group: System Environment/Libraries
@@ -21,6 +21,7 @@ Patch8: libtiff-CVE-2013-4231.patch
Patch9: libtiff-CVE-2013-4232.patch
Patch10: libtiff-CVE-2013-4244.patch
Patch11: libtiff-make-check.patch
+Patch12: libtiff-CVE-2013-4243.patch
BuildRequires: zlib-devel libjpeg-devel jbigkit-devel
BuildRequires: libtool automake autoconf pkgconfig
@@ -83,6 +84,7 @@ image files using the libtiff library.
%patch9 -p1
%patch10 -p1
%patch11 -p1
+%patch12 -p1
# Use build system's libtool.m4, not the one in the package.
rm -f libtool.m4
@@ -188,6 +190,9 @@ find html -name 'Makefile*' | xargs rm
%{_mandir}/man1/*
%changelog
+* Wed May 21 2014 Petr Hracek <phracek at redhat.com> - 4.0.3-15
+- Add upstream patches for CVE-2013-4243 (#996832)
+
* Thu Dec 19 2013 Petr Hracek <phracek at redhat.com> - 4.0.3-14
- Fix: #1044609 Can't install both architectures
More information about the scm-commits
mailing list