diff options
author | Yi Zhao <yi.zhao@windriver.com> | 2016-08-10 15:11:19 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-08-17 10:35:39 +0100 |
commit | 1b03beb80a977a0449b026b950347e453f8aa636 (patch) | |
tree | c69bcb28ab353ef9f30116ef1ecf95fdf5f1ce9a /meta/recipes-multimedia/libtiff | |
parent | b762eb937c68148e03b94775a69aa51413552b21 (diff) | |
download | poky-1b03beb80a977a0449b026b950347e453f8aa636.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: 4a167cfb6ad79bbe2a2ff7f7b43c4a162ca42a4d)
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-multimedia/libtiff')
-rw-r--r-- | meta/recipes-multimedia/libtiff/files/CVE-2016-5321.patch | 49 | ||||
-rw-r--r-- | meta/recipes-multimedia/libtiff/tiff_4.0.6.bb | 1 |
2 files changed, 50 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..63c665024b --- /dev/null +++ b/meta/recipes-multimedia/libtiff/files/CVE-2016-5321.patch | |||
@@ -0,0 +1,49 @@ | |||
1 | From d9783e4a1476b6787a51c5ae9e9b3156527589f0 Mon Sep 17 00:00:00 2001 | ||
2 | From: erouault <erouault> | ||
3 | Date: Mon, 11 Jul 2016 21:26:03 +0000 | ||
4 | Subject: [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 | |||
9 | CVE: CVE-2016-5321 | ||
10 | Upstream-Status: Backport | ||
11 | https://github.com/vadz/libtiff/commit/d9783e4a1476b6787a51c5ae9e9b3156527589f0 | ||
12 | |||
13 | Signed-off-by: Yi Zhao <yi.zhao@windirver.com> | ||
14 | --- | ||
15 | ChangeLog | 7 +++++++ | ||
16 | tools/tiffcrop.c | 2 +- | ||
17 | 2 files changed, 8 insertions(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/ChangeLog b/ChangeLog | ||
20 | index e98d54d..4e0302f 100644 | ||
21 | --- a/ChangeLog | ||
22 | +++ b/ChangeLog | ||
23 | @@ -1,3 +1,10 @@ | ||
24 | +2016-07-11 Even Rouault <even.rouault at spatialys.com> | ||
25 | + | ||
26 | + * tools/tiffcrop.c: Avoid access outside of stack allocated array | ||
27 | + on a tiled separate TIFF with more than 8 samples per pixel. | ||
28 | + Reported by Kaixiang Zhang of the Cloud Security Team, Qihoo 360 | ||
29 | + (CVE-2016-5321, bugzilla #2558) | ||
30 | + | ||
31 | 2015-12-27 Even Rouault <even.rouault at spatialys.com> | ||
32 | |||
33 | * libtiff/tif_next.c: fix potential out-of-bound write in NeXTDecode() | ||
34 | diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c | ||
35 | index d959ae3..6fc8fc1 100644 | ||
36 | --- a/tools/tiffcrop.c | ||
37 | +++ b/tools/tiffcrop.c | ||
38 | @@ -989,7 +989,7 @@ static int readSeparateTilesIntoBuffer (TIFF* in, uint8 *obuf, | ||
39 | nrow = (row + tl > imagelength) ? imagelength - row : tl; | ||
40 | for (col = 0; col < imagewidth; col += tw) | ||
41 | { | ||
42 | - for (s = 0; s < spp; s++) | ||
43 | + for (s = 0; s < spp && s < MAX_SAMPLES; s++) | ||
44 | { /* Read each plane of a tile set into srcbuffs[s] */ | ||
45 | tbytes = TIFFReadTile(in, srcbuffs[s], col, row, 0, s); | ||
46 | if (tbytes < 0 && !ignore) | ||
47 | -- | ||
48 | 2.7.4 | ||
49 | |||
diff --git a/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb b/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb index 36cb34ee0f..63df126627 100644 --- a/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb +++ b/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb | |||
@@ -9,6 +9,7 @@ SRC_URI = "ftp://ftp.remotesensing.org/pub/libtiff/tiff-${PV}.tar.gz \ | |||
9 | file://CVE-2015-8781.patch \ | 9 | file://CVE-2015-8781.patch \ |
10 | file://CVE-2015-8784.patch \ | 10 | file://CVE-2015-8784.patch \ |
11 | file://CVE-2016-3186.patch \ | 11 | file://CVE-2016-3186.patch \ |
12 | file://CVE-2016-5321.patch \ | ||
12 | " | 13 | " |
13 | 14 | ||
14 | SRC_URI[md5sum] = "d1d2e940dea0b5ad435f21f03d96dd72" | 15 | SRC_URI[md5sum] = "d1d2e940dea0b5ad435f21f03d96dd72" |