Skip to contentSkip to conversation

] libtiff: Update to 4.0.7

PATCH New Armin Kuster 1 participant 1 message Dec 10, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ] libtiff: Update to 4.0.7

Major changes:
The libtiff tools bmp2tiff, gif2tiff, ras2tiff, sgi2tiff, sgisv, and ycbcr are completely removed from the distribution, used for demos.

CVEs fixed:
CVE-2016-9297
CVE-2016-9448
CVE-2016-9273
CVE-2014-8127
CVE-2016-3658
CVE-2016-5875
CVE-2016-5652
CVE-2016-3632

plus more that are not identified in the changelog.

removed patches integrated into update. more info: http://libtiff.maptools.org/v4.0.7.html

---
 .../libtiff/files/CVE-2015-8665_8683.patch         | 137 -------
 .../libtiff/files/CVE-2015-8781.patch              | 195 ----------
 .../libtiff/files/CVE-2015-8784.patch              |  73 ----
 .../libtiff/files/CVE-2016-3186.patch              |  24 --
 .../libtiff/files/CVE-2016-3622.patch              | 129 -------
 .../libtiff/files/CVE-2016-3623.patch              |  52 ---
 .../libtiff/files/CVE-2016-3632.patch              |  34 --
 .../libtiff/files/CVE-2016-3658.patch              | 111 ------
 .../libtiff/files/CVE-2016-3945.patch              | 118 ------
 .../libtiff/files/CVE-2016-3990.patch              |  66 ----
 .../libtiff/files/CVE-2016-3991.patch              | 147 -------
 .../libtiff/files/CVE-2016-5321.patch              |  49 ---
 .../libtiff/files/CVE-2016-5323.patch              | 107 ------
 .../libtiff/files/CVE-2016-9535-1.patch            | 423 ---------------------
 .../libtiff/files/CVE-2016-9535-2.patch            |  67 ----
 .../libtiff/files/CVE-2016-9538.patch              |  67 ----
 .../libtiff/files/CVE-2016-9539.patch              |  60 ---
 .../libtiff/files/CVE-2016-9540.patch              |  60 ---
 .../libtiff/files/Fix_several_CVE_issues.patch     | 281 --------------
 .../libtiff/{tiff_4.0.6.bb => tiff_4.0.7.bb}       |  23 +-
 20 files changed, 2 insertions(+), 2221 deletions(-)
 delete mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2015-8665_8683.patch
 delete mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2015-8781.patch
 delete mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2015-8784.patch
 delete mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2016-3186.patch
 delete mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2016-3622.patch
 delete mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2016-3623.patch
 delete mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2016-3632.patch
 delete mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2016-3658.patch
 delete mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2016-3945.patch
 delete mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2016-3990.patch
 delete mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2016-3991.patch
 delete mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2016-5321.patch
 delete mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2016-5323.patch
 delete mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2016-9535-1.patch
 delete mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2016-9535-2.patch
 delete mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2016-9538.patch
 delete mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2016-9539.patch
 delete mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2016-9540.patch
 delete mode 100644 meta/recipes-multimedia/libtiff/files/Fix_several_CVE_issues.patch
 rename meta/recipes-multimedia/libtiff/{tiff_4.0.6.bb => tiff_4.0.7.bb} (65%)
meta/recipes-multimedia/libtiff/files/CVE-2015-8665_8683.patch deleted +0 -137
deleted file mode 100644
index 39c5059..0000000
@@ -1,137 +0,0 @@
-From f94a29a822f5528d2334592760fbb7938f15eb55 Mon Sep 17 00:00:00 2001
-From: erouault <erouault>
-Date: Sat, 26 Dec 2015 17:32:03 +0000
-Subject: [PATCH] * libtiff/tif_getimage.c: fix out-of-bound reads in
- TIFFRGBAImage interface in case of unsupported values of
- SamplesPerPixel/ExtraSamples for LogLUV / CIELab. Add explicit call to
- TIFFRGBAImageOK() in TIFFRGBAImageBegin(). Fix CVE-2015-8665 reported by
- limingxing and CVE-2015-8683 reported by zzf of Alibaba.
-
-Upstream-Status: Backport
-CVE: CVE-2015-8665
-CVE: CVE-2015-8683
-https://github.com/vadz/libtiff/commit/f94a29a822f5528d2334592760fbb7938f15eb55
-
-Signed-off-by: Armin Kuster <[email protected]>
-
----
- ChangeLog              |  8 ++++++++
- libtiff/tif_getimage.c | 35 ++++++++++++++++++++++-------------
- 2 files changed, 30 insertions(+), 13 deletions(-)
-
-Index: tiff-4.0.6/libtiff/tif_getimage.c
-===================================================================
---- tiff-4.0.6.orig/libtiff/tif_getimage.c
-+++ tiff-4.0.6/libtiff/tif_getimage.c
-@@ -182,20 +182,22 @@ TIFFRGBAImageOK(TIFF* tif, char emsg[102
- 				    "Planarconfiguration", td->td_planarconfig);
- 				return (0);
- 			}
--			if( td->td_samplesperpixel != 3 )
-+			if( td->td_samplesperpixel != 3 || colorchannels != 3 )
-             {
-                 sprintf(emsg,
--                        "Sorry, can not handle image with %s=%d",
--                        "Samples/pixel", td->td_samplesperpixel);
-+                        "Sorry, can not handle image with %s=%d, %s=%d",
-+                        "Samples/pixel", td->td_samplesperpixel,
-+                        "colorchannels", colorchannels);
-                 return 0;
-             }
- 			break;
- 		case PHOTOMETRIC_CIELAB:
--            if( td->td_samplesperpixel != 3 || td->td_bitspersample != 8 )
-+            if( td->td_samplesperpixel != 3 || colorchannels != 3 || td->td_bitspersample != 8 )
-             {
-                 sprintf(emsg,
--                        "Sorry, can not handle image with %s=%d and %s=%d",
-+                        "Sorry, can not handle image with %s=%d, %s=%d and %s=%d",
-                         "Samples/pixel", td->td_samplesperpixel,
-+                        "colorchannels", colorchannels,
-                         "Bits/sample", td->td_bitspersample);
-                 return 0;
-             }
-@@ -255,6 +257,9 @@ TIFFRGBAImageBegin(TIFFRGBAImage* img, T
- 	int colorchannels;
- 	uint16 *red_orig, *green_orig, *blue_orig;
- 	int n_color;
-+	
-+	if( !TIFFRGBAImageOK(tif, emsg) )
-+		return 0;
- 
- 	/* Initialize to normal values */
- 	img->row_offset = 0;
-@@ -2508,29 +2513,33 @@ PickContigCase(TIFFRGBAImage* img)
- 		case PHOTOMETRIC_RGB:
- 			switch (img->bitspersample) {
- 				case 8:
--					if (img->alpha == EXTRASAMPLE_ASSOCALPHA)
-+					if (img->alpha == EXTRASAMPLE_ASSOCALPHA &&
-+						img->samplesperpixel >= 4)
- 						img->put.contig = putRGBAAcontig8bittile;
--					else if (img->alpha == EXTRASAMPLE_UNASSALPHA)
-+					else if (img->alpha == EXTRASAMPLE_UNASSALPHA &&
-+							 img->samplesperpixel >= 4)
- 					{
- 						if (BuildMapUaToAa(img))
- 							img->put.contig = putRGBUAcontig8bittile;
- 					}
--					else
-+					else if( img->samplesperpixel >= 3 )
- 						img->put.contig = putRGBcontig8bittile;
- 					break;
- 				case 16:
--					if (img->alpha == EXTRASAMPLE_ASSOCALPHA)
-+					if (img->alpha == EXTRASAMPLE_ASSOCALPHA &&
-+						img->samplesperpixel >=4 )
- 					{
- 						if (BuildMapBitdepth16To8(img))
- 							img->put.contig = putRGBAAcontig16bittile;
- 					}
--					else if (img->alpha == EXTRASAMPLE_UNASSALPHA)
-+					else if (img->alpha == EXTRASAMPLE_UNASSALPHA &&
-+							 img->samplesperpixel >=4 )
- 					{
- 						if (BuildMapBitdepth16To8(img) &&
- 						    BuildMapUaToAa(img))
- 							img->put.contig = putRGBUAcontig16bittile;
- 					}
--					else
-+					else if( img->samplesperpixel >=3 )
- 					{
- 						if (BuildMapBitdepth16To8(img))
- 							img->put.contig = putRGBcontig16bittile;
-@@ -2539,7 +2548,7 @@ PickContigCase(TIFFRGBAImage* img)
- 			}
- 			break;
- 		case PHOTOMETRIC_SEPARATED:
--			if (buildMap(img)) {
-+			if (img->samplesperpixel >=4 && buildMap(img)) {
- 				if (img->bitspersample == 8) {
- 					if (!img->Map)
- 						img->put.contig = putRGBcontig8bitCMYKtile;
-@@ -2635,7 +2644,7 @@ PickContigCase(TIFFRGBAImage* img)
- 			}
- 			break;
- 		case PHOTOMETRIC_CIELAB:
--			if (buildMap(img)) {
-+			if (img->samplesperpixel == 3 && buildMap(img)) {
- 				if (img->bitspersample == 8)
- 					img->put.contig = initCIELabConversion(img);
- 				break;
-Index: tiff-4.0.6/ChangeLog
-===================================================================
---- tiff-4.0.6.orig/ChangeLog
-+++ tiff-4.0.6/ChangeLog
-@@ -1,3 +1,11 @@
-+2015-12-26  Even Rouault <even.rouault at spatialys.com>
-+
-+   * libtiff/tif_getimage.c: fix out-of-bound reads in TIFFRGBAImage
-+   interface in case of unsupported values of SamplesPerPixel/ExtraSamples
-+   for LogLUV / CIELab. Add explicit call to TIFFRGBAImageOK() in
-+   TIFFRGBAImageBegin(). Fix CVE-2015-8665 reported by limingxing and
-+   CVE-2015-8683 reported by zzf of Alibaba.
-+
- 2015-09-12  Bob Friesenhahn  <[email protected]>
- 
- 	* libtiff 4.0.6 released.
meta/recipes-multimedia/libtiff/files/CVE-2015-8781.patch deleted +0 -195

195 lines not on this page · raw message

meta/recipes-multimedia/libtiff/files/CVE-2015-8784.patch deleted +0 -73

73 lines not on this page · raw message

meta/recipes-multimedia/libtiff/files/CVE-2016-3186.patch deleted +0 -24
deleted file mode 100644
index 4a08aba..0000000
@@ -1,24 +0,0 @@
-Buffer overflow in the readextension function in gif2tiff.c
-allows remote attackers to cause a denial of service via a crafted GIF file.
-
-External References:
-https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-3186
-https://bugzilla.redhat.com/show_bug.cgi?id=1319503
-
-CVE: CVE-2016-3186
-Upstream-Status: Backport (RedHat)
-https://bugzilla.redhat.com/attachment.cgi?id=1144235&action=diff
-
-Signed-off-by: Yi Zhao <[email protected]>
-
---- tiff-4.0.6/tools/gif2tiff.c	2016-04-06 15:43:01.586048341 +0200
-+++ tiff-4.0.6/tools/gif2tiff.c	2016-04-06 15:48:05.523207710 +0200
-@@ -349,7 +349,7 @@
-     int status = 1;
- 
-     (void) getc(infile);
--    while ((count = getc(infile)) && count <= 255)
-+    while ((count = getc(infile)) && count >= 0 && count <= 255)
-         if (fread(buf, 1, count, infile) != (size_t) count) {
-             fprintf(stderr, "short read from file %s (%s)\n",
-                     filename, strerror(errno));
meta/recipes-multimedia/libtiff/files/CVE-2016-3622.patch deleted +0 -129

129 lines not on this page · raw message

meta/recipes-multimedia/libtiff/files/CVE-2016-3623.patch deleted +0 -52

52 lines not on this page · raw message

meta/recipes-multimedia/libtiff/files/CVE-2016-3632.patch deleted +0 -34
deleted file mode 100644
index a839250..0000000
@@ -1,34 +0,0 @@
-From d3f9829a37661749b200760ad6525f77cf77d77a Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Nikola=20Forr=C3=B3?= <[email protected]>
-Date: Mon, 11 Jul 2016 16:04:34 +0200
-Subject: [PATCH 4/8] Fix CVE-2016-3632
-
-CVE-2016-3632 libtiff: The _TIFFVGetField function in tif_dirinfo.c in
-LibTIFF 4.0.6 and earlier allows remote attackers to cause a denial of service
-(out-of-bounds write) or execute arbitrary code via a crafted TIFF image.
-
-CVE: CVE-2016-3632
-Upstream-Status: Backport [RedHat RHEL7]
-
-Signed-off-by: Yi Zhao <[email protected]>
----
- tools/thumbnail.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/tools/thumbnail.c b/tools/thumbnail.c
-index fd1cba5..75e7009 100644
---- a/tools/thumbnail.c
-+++ b/tools/thumbnail.c
-@@ -253,7 +253,8 @@ static struct cpTag {
-     { TIFFTAG_WHITEPOINT,		2, TIFF_RATIONAL },
-     { TIFFTAG_PRIMARYCHROMATICITIES,	(uint16) -1,TIFF_RATIONAL },
-     { TIFFTAG_HALFTONEHINTS,		2, TIFF_SHORT },
--    { TIFFTAG_BADFAXLINES,		1, TIFF_LONG },
-+    // disable BADFAXLINES, CVE-2016-3632
-+    //{ TIFFTAG_BADFAXLINES,		1, TIFF_LONG },
-     { TIFFTAG_CLEANFAXDATA,		1, TIFF_SHORT },
-     { TIFFTAG_CONSECUTIVEBADFAXLINES,	1, TIFF_LONG },
-     { TIFFTAG_INKSET,			1, TIFF_SHORT },
--- 
-2.7.4
-
meta/recipes-multimedia/libtiff/files/CVE-2016-3658.patch deleted +0 -111

111 lines not on this page · raw message

meta/recipes-multimedia/libtiff/files/CVE-2016-3945.patch deleted +0 -118

118 lines not on this page · raw message

meta/recipes-multimedia/libtiff/files/CVE-2016-3990.patch deleted +0 -66

66 lines not on this page · raw message

meta/recipes-multimedia/libtiff/files/CVE-2016-3991.patch deleted +0 -147

147 lines not on this page · raw message

meta/recipes-multimedia/libtiff/files/CVE-2016-5321.patch deleted +0 -49

49 lines not on this page · raw message

meta/recipes-multimedia/libtiff/files/CVE-2016-5323.patch deleted +0 -107

107 lines not on this page · raw message

meta/recipes-multimedia/libtiff/files/CVE-2016-9535-1.patch deleted +0 -423

423 lines not on this page · raw message

meta/recipes-multimedia/libtiff/files/CVE-2016-9535-2.patch deleted +0 -67

67 lines not on this page · raw message

meta/recipes-multimedia/libtiff/files/CVE-2016-9538.patch deleted +0 -67

67 lines not on this page · raw message

meta/recipes-multimedia/libtiff/files/CVE-2016-9539.patch deleted +0 -60

60 lines not on this page · raw message

meta/recipes-multimedia/libtiff/files/CVE-2016-9540.patch deleted +0 -60

60 lines not on this page · raw message

meta/recipes-multimedia/libtiff/files/Fix_several_CVE_issues.patch deleted +0 -281

281 lines not on this page · raw message

meta/recipes-multimedia/libtiff/tiff_4.0.7.bb renamed from meta/recipes-multimedia/libtiff/tiff_4.0.6.bb +2 -21
similarity index 65%
rename from meta/recipes-multimedia/libtiff/tiff_4.0.6.bb
rename to meta/recipes-multimedia/libtiff/tiff_4.0.7.bb
index 450927d..bbc7389 100644
@@ -6,29 +6,10 @@ CVE_NAME = "libtiff"
 
 SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \
            file://libtool2.patch \
-           file://CVE-2015-8665_8683.patch \
-           file://CVE-2015-8781.patch \
-           file://CVE-2015-8784.patch \
-           file://CVE-2016-3186.patch \
-           file://CVE-2016-5321.patch \
-           file://CVE-2016-5323.patch \
-           file://CVE-2016-3945.patch \
-           file://CVE-2016-3990.patch \
-           file://CVE-2016-3991.patch \
-           file://CVE-2016-3623.patch \
-           file://CVE-2016-3622.patch \
-           file://CVE-2016-3658.patch \
-           file://CVE-2016-3632.patch \
-           file://CVE-2016-9540.patch \
-           file://CVE-2016-9539.patch \
-           file://CVE-2016-9535-1.patch \
-           file://CVE-2016-9535-2.patch \
-           file://CVE-2016-9538.patch \
-           file://Fix_several_CVE_issues.patch \
           "
 
-SRC_URI[md5sum] = "d1d2e940dea0b5ad435f21f03d96dd72"
-SRC_URI[sha256sum] = "4d57a50907b510e3049a4bba0d7888930fdfc16ce49f1bf693e5b6247370d68c"
+SRC_URI[md5sum] = "77ae928d2c6b7fb46a21c3a29325157b"
+SRC_URI[sha256sum] = "9f43a2cfb9589e5cecaa66e16bf87f814c945f22df7ba600d63aac4632c4f019"
 
 # exclude betas
 UPSTREAM_CHECK_REGEX = "tiff-(?P<pver>\d+(\.\d+)+).tar"
Signature · 1 line
2.7.4