]> code.ossystems Code Review - openembedded-core.git/commitdiff
tiff: Security fix for CVE-2017-7592
authorRajkumar Veer <rveer@mvista.com>
Sat, 4 Nov 2017 05:23:27 +0000 (22:23 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 5 Nov 2017 22:39:25 +0000 (22:39 +0000)
Signed-off-by: Rajkumar Veer <rveer@mvista.com>
Signed-off-by: Armin Kuster <akuster@mvista.com>
meta/recipes-multimedia/libtiff/files/CVE-2017-7592.patch [new file with mode: 0644]
meta/recipes-multimedia/libtiff/tiff_4.0.7.bb

diff --git a/meta/recipes-multimedia/libtiff/files/CVE-2017-7592.patch b/meta/recipes-multimedia/libtiff/files/CVE-2017-7592.patch
new file mode 100644 (file)
index 0000000..5b80445
--- /dev/null
@@ -0,0 +1,40 @@
+From 48780b4fcc425cddc4ef8ffdf536f96a0d1b313b Mon Sep 17 00:00:00 2001
+From: erouault <erouault>
+Date: Wed, 11 Jan 2017 16:38:26 +0000
+Subject: [PATCH] * libtiff/tif_getimage.c: add explicit uint32 cast in putagreytile to
+avoid UndefinedBehaviorSanitizer warning.
+Patch by Nicolas Pena.
+Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2658
+
+Upstream-Status: Backport
+CVE: CVE-2017-7592
+Signed-off-by: Rajkumar Veer <rveer@mvista.com>
+
+Index: tiff-4.0.7/ChangeLog
+===================================================================
+--- tiff-4.0.7.orig/ChangeLog  2017-04-24 14:25:10.143926025 +0530
++++ tiff-4.0.7/ChangeLog       2017-04-24 15:20:21.291839230 +0530
+@@ -1,3 +1,10 @@
++2017-01-11 Even Rouault <even.rouault at spatialys.com>
++
++      * libtiff/tif_getimage.c: add explicit uint32 cast in putagreytile to
++      avoid UndefinedBehaviorSanitizer warning.
++      Patch by Nicolas Pena.
++      Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2658
++
+ 2016-12-03 Even Rouault <even.rouault at spatialys.com>
+       * libtiff/tif_dirread.c: modify ChopUpSingleUncompressedStrip() to
+Index: tiff-4.0.7/libtiff/tif_getimage.c
+===================================================================
+--- tiff-4.0.7.orig/libtiff/tif_getimage.c     2016-11-18 08:17:45.000000000 +0530
++++ tiff-4.0.7/libtiff/tif_getimage.c  2017-04-24 15:17:46.671843283 +0530
+@@ -1305,7 +1305,7 @@
+     while (h-- > 0) {
+       for (x = w; x-- > 0;)
+         {
+-            *cp++ = BWmap[*pp][0] & (*(pp+1) << 24 | ~A1);
++            *cp++ = BWmap[*pp][0] & ((uint32)*(pp+1) << 24 | ~A1);
+             pp += samplesperpixel;
+         }
+       cp += toskew;
index 4efe4c2db696ad0b33aced6fd6d50f5c2381628b..303eff088bdf282b83b261ed40ec058566ada817 100644 (file)
@@ -18,7 +18,8 @@ SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \
            file://CVE-2016-10267.patch \
            file://CVE-2016-10269.patch \
            file://CVE-2016-10270.patch \
-          "
+           file://CVE-2017-7592.patch \
+        "
 
 SRC_URI[md5sum] = "77ae928d2c6b7fb46a21c3a29325157b"
 SRC_URI[sha256sum] = "9f43a2cfb9589e5cecaa66e16bf87f814c945f22df7ba600d63aac4632c4f019"