[oe-commits] [openembedded-core] 06/20: tiff: Security fix CVE-2016-5321

git at git.openembedded.org git at git.openembedded.org
Fri Sep 23 22:22:30 UTC 2016


rpurdie pushed a commit to branch jethro
in repository openembedded-core.

commit 35a7cb62be554e28f64b7583d46d693ea184491f
Author: Yi Zhao <yi.zhao at windriver.com>
AuthorDate: Wed Aug 10 15:11:19 2016 +0800

    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
    
    Signed-off-by: Yi Zhao <yi.zhao at windriver.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
    (cherry picked from commit 4a167cfb6ad79bbe2a2ff7f7b43c4a162ca42a4d)
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 .../libtiff/files/CVE-2016-5321.patch              | 45 ++++++++++++++++++++++
 meta/recipes-multimedia/libtiff/tiff_4.0.4.bb      |  1 +
 2 files changed, 46 insertions(+)

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 0000000..98538ad
--- /dev/null
+++ b/meta/recipes-multimedia/libtiff/files/CVE-2016-5321.patch
@@ -0,0 +1,45 @@
+From d9783e4a1476b6787a51c5ae9e9b3156527589f0 Mon Sep 17 00:00:00 2001
+From: erouault <erouault>
+Date: Mon, 11 Jul 2016 21:26:03 +0000
+Subject: [PATCH 1/2] * tools/tiffcrop.c: Avoid access outside of stack
+ allocated array on a tiled separate TIFF with more than 8 samples per pixel.
+ Reported by Kaixiang Zhang of the Cloud Security Team, Qihoo 360
+ (CVE-2016-5321, bugzilla #2558)
+
+CVE: CVE-2016-5321
+Upstream-Status: Backport
+https://github.com/vadz/libtiff/commit/d9783e4a1476b6787a51c5ae9e9b3156527589f0
+
+Signed-off-by: Yi Zhao <yi.zhao at windirver.com>
+---
+ tools/tiffcrop.c | 2 +-
+ 2 files changed, 8 insertions(+), 1 deletion(-)
+
+Index: tiff-4.0.4/tools/tiffcrop.c
+===================================================================
+--- tiff-4.0.4.orig/tools/tiffcrop.c
++++ tiff-4.0.4/tools/tiffcrop.c
+@@ -989,7 +989,7 @@ static int  readSeparateTilesIntoBuffer
+     nrow = (row + tl > imagelength) ? imagelength - row : tl;
+     for (col = 0; col < imagewidth; col += tw)
+       {
+-      for (s = 0; s < spp; s++)
++      for (s = 0; s < spp && s < MAX_SAMPLES; s++)
+         {  /* Read each plane of a tile set into srcbuffs[s] */
+ 	tbytes = TIFFReadTile(in, srcbuffs[s], col, row, 0, s);
+         if (tbytes < 0  && !ignore)
+Index: tiff-4.0.4/ChangeLog
+===================================================================
+--- tiff-4.0.4.orig/ChangeLog
++++ tiff-4.0.4/ChangeLog
+@@ -1,3 +1,10 @@
++2016-07-11 Even Rouault <even.rouault at spatialys.com>
++
++       * tools/tiffcrop.c: Avoid access outside of stack allocated array
++       on a tiled separate TIFF with more than 8 samples per pixel.
++       Reported by Kaixiang Zhang of the Cloud Security Team, Qihoo 360
++       (CVE-2016-5321, bugzilla #2558)
++
+ 2015-12-26  Even Rouault <even.rouault at spatialys.com>
+ 
+    * 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 c32eeb0..2e97653 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 \
            file://CVE-2015-8784.patch \
            file://CVE-2015-8665_8683.patch \
 	   file://CVE-2016-3186.patch \
+	   file://CVE-2016-5321.patch \
           "
 
 SRC_URI[md5sum] = "9aee7107408a128c0c7b24286c0db900"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list