summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2016-08-10 15:11:19 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-23 23:22:03 +0100
commitc95d42a7d1fbd11fab8d4d4a5735eae49c1a2a44 (patch)
tree0a15c223db749f18e2f55b4b70dc23aecef17b38
parent7d403a2ecda3c923c95fbd558c55d677fce7fbc8 (diff)
downloadpoky-c95d42a7d1fbd11fab8d4d4a5735eae49c1a2a44.tar.gz
tiff: Security fix CVE-2016-5321
CVE-2016-5321 libtiff: a maliciously crafted TIFF file could cause the application to crash when using tiffcrop command External References: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-5321 http://bugzilla.maptools.org/show_bug.cgi?id=2558 Patch from: https://github.com/vadz/libtiff/commit/d9783e4a1476b6787a51c5ae9e9b3156527589f0 (From OE-Core rev: 35a7cb62be554e28f64b7583d46d693ea184491f) Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit 4a167cfb6ad79bbe2a2ff7f7b43c4a162ca42a4d) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-multimedia/libtiff/files/CVE-2016-5321.patch45
-rw-r--r--meta/recipes-multimedia/libtiff/tiff_4.0.4.bb1
2 files changed, 46 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/libtiff/files/CVE-2016-5321.patch b/meta/recipes-multimedia/libtiff/files/CVE-2016-5321.patch
new file mode 100644
index 0000000000..98538ad057
--- /dev/null
+++ b/meta/recipes-multimedia/libtiff/files/CVE-2016-5321.patch
@@ -0,0 +1,45 @@
1From d9783e4a1476b6787a51c5ae9e9b3156527589f0 Mon Sep 17 00:00:00 2001
2From: erouault <erouault>
3Date: Mon, 11 Jul 2016 21:26:03 +0000
4Subject: [PATCH 1/2] * tools/tiffcrop.c: Avoid access outside of stack
5 allocated array on a tiled separate TIFF with more than 8 samples per pixel.
6 Reported by Kaixiang Zhang of the Cloud Security Team, Qihoo 360
7 (CVE-2016-5321, bugzilla #2558)
8
9CVE: CVE-2016-5321
10Upstream-Status: Backport
11https://github.com/vadz/libtiff/commit/d9783e4a1476b6787a51c5ae9e9b3156527589f0
12
13Signed-off-by: Yi Zhao <yi.zhao@windirver.com>
14---
15 tools/tiffcrop.c | 2 +-
16 2 files changed, 8 insertions(+), 1 deletion(-)
17
18Index: tiff-4.0.4/tools/tiffcrop.c
19===================================================================
20--- tiff-4.0.4.orig/tools/tiffcrop.c
21+++ tiff-4.0.4/tools/tiffcrop.c
22@@ -989,7 +989,7 @@ static int readSeparateTilesIntoBuffer
23 nrow = (row + tl > imagelength) ? imagelength - row : tl;
24 for (col = 0; col < imagewidth; col += tw)
25 {
26- for (s = 0; s < spp; s++)
27+ for (s = 0; s < spp && s < MAX_SAMPLES; s++)
28 { /* Read each plane of a tile set into srcbuffs[s] */
29 tbytes = TIFFReadTile(in, srcbuffs[s], col, row, 0, s);
30 if (tbytes < 0 && !ignore)
31Index: tiff-4.0.4/ChangeLog
32===================================================================
33--- tiff-4.0.4.orig/ChangeLog
34+++ tiff-4.0.4/ChangeLog
35@@ -1,3 +1,10 @@
36+2016-07-11 Even Rouault <even.rouault at spatialys.com>
37+
38+ * tools/tiffcrop.c: Avoid access outside of stack allocated array
39+ on a tiled separate TIFF with more than 8 samples per pixel.
40+ Reported by Kaixiang Zhang of the Cloud Security Team, Qihoo 360
41+ (CVE-2016-5321, bugzilla #2558)
42+
43 2015-12-26 Even Rouault <even.rouault at spatialys.com>
44
45 * libtiff/tif_getimage.c: fix out-of-bound reads in TIFFRGBAImage
diff --git a/meta/recipes-multimedia/libtiff/tiff_4.0.4.bb b/meta/recipes-multimedia/libtiff/tiff_4.0.4.bb
index c32eeb0ab5..2e97653d95 100644
--- a/meta/recipes-multimedia/libtiff/tiff_4.0.4.bb
+++ b/meta/recipes-multimedia/libtiff/tiff_4.0.4.bb
@@ -9,6 +9,7 @@ SRC_URI = "ftp://ftp.remotesensing.org/pub/libtiff/tiff-${PV}.tar.gz \
9 file://CVE-2015-8784.patch \ 9 file://CVE-2015-8784.patch \
10 file://CVE-2015-8665_8683.patch \ 10 file://CVE-2015-8665_8683.patch \
11 file://CVE-2016-3186.patch \ 11 file://CVE-2016-3186.patch \
12 file://CVE-2016-5321.patch \
12 " 13 "
13 14
14SRC_URI[md5sum] = "9aee7107408a128c0c7b24286c0db900" 15SRC_URI[md5sum] = "9aee7107408a128c0c7b24286c0db900"