aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajkumar Veer <rveer@mvista.com>2017-11-03 22:33:41 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-11-05 22:39:26 +0000
commit957e9f92b17c6b268e6c037666d2f32ef23f7bf9 (patch)
tree2776628e05e47382dc9a5738c8cde239d233df24
parent7423b8318a381d139590f6ab2c50874d0eb775a6 (diff)
downloadopenembedded-core-957e9f92b17c6b268e6c037666d2f32ef23f7bf9.zip
openembedded-core-957e9f92b17c6b268e6c037666d2f32ef23f7bf9.tar.gz
openembedded-core-957e9f92b17c6b268e6c037666d2f32ef23f7bf9.tar.bz2
tiff: Security fix for CVE-2017-7602
Signed-off-by: Rajkumar Veer <rveer@mvista.com> Signed-off-by: Armin Kuster <akuster@mvista.com>
-rw-r--r--meta/recipes-multimedia/libtiff/files/CVE-2017-7602.patch69
-rw-r--r--meta/recipes-multimedia/libtiff/tiff_4.0.7.bb1
2 files changed, 70 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/libtiff/files/CVE-2017-7602.patch b/meta/recipes-multimedia/libtiff/files/CVE-2017-7602.patch
new file mode 100644
index 0000000..9ed97e24
--- /dev/null
+++ b/meta/recipes-multimedia/libtiff/files/CVE-2017-7602.patch
@@ -0,0 +1,69 @@
+From 66e7bd59520996740e4df5495a830b42fae48bc4 Mon Sep 17 00:00:00 2001
+From: erouault <erouault>
+Date: Wed, 11 Jan 2017 16:33:34 +0000
+Subject: [PATCH] * libtiff/tif_read.c: avoid potential undefined behaviour on
+ signed integer addition in TIFFReadRawStrip1() in isMapped() case. Fixes
+ http://bugzilla.maptools.org/show_bug.cgi?id=2650
+
+Upstream-Status: Backport
+
+CVE: CVE-2017-7602
+Signed-off-by: Rajkumar Veer <rveer@mvista.com>
+
+Index: tiff-4.0.7/ChangeLog
+===================================================================
+--- tiff-4.0.7.orig/ChangeLog 2017-04-25 18:42:07.656135638 +0530
++++ tiff-4.0.7/ChangeLog 2017-04-25 18:54:36.812147299 +0530
+@@ -8,6 +8,12 @@
+
+ 2017-01-11 Even Rouault <even.rouault at spatialys.com>
+
++ * libtiff/tif_read.c: avoid potential undefined behaviour on signed integer
++ addition in TIFFReadRawStrip1() in isMapped() case.
++ Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2650
++
++2017-01-11 Even Rouault <even.rouault at spatialys.com>
++
+ * libtiff/tif_jpeg.c: validate BitsPerSample in JPEGSetupEncode() to avoid
+ undefined behaviour caused by invalid shift exponent.
+ Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2648
+Index: tiff-4.0.7/libtiff/tif_read.c
+===================================================================
+--- tiff-4.0.7.orig/libtiff/tif_read.c 2017-04-25 18:42:07.132135629 +0530
++++ tiff-4.0.7/libtiff/tif_read.c 2017-04-25 18:58:25.272150855 +0530
+@@ -420,16 +420,26 @@
+ return ((tmsize_t)(-1));
+ }
+ } else {
+- tmsize_t ma,mb;
++ tmsize_t ma;
+ tmsize_t n;
+- ma=(tmsize_t)td->td_stripoffset[strip];
+- mb=ma+size;
+- if ((td->td_stripoffset[strip] > (uint64)TIFF_TMSIZE_T_MAX)||(ma>tif->tif_size))
+- n=0;
+- else if ((mb<ma)||(mb<size)||(mb>tif->tif_size))
+- n=tif->tif_size-ma;
+- else
+- n=size;
++ if ((td->td_stripoffset[strip] > (uint64)TIFF_TMSIZE_T_MAX)||
++ ((ma=(tmsize_t)td->td_stripoffset[strip])>tif->tif_size))
++ {
++ n=0;
++ }
++ else if( ma > TIFF_TMSIZE_T_MAX - size )
++ {
++ n=0;
++ }
++ else
++ {
++ tmsize_t mb=ma+size;
++ if (mb>tif->tif_size)
++ n=tif->tif_size-ma;
++ else
++ n=size;
++ }
++
+ if (n!=size) {
+ #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
+ TIFFErrorExt(tif->tif_clientdata, module,
diff --git a/meta/recipes-multimedia/libtiff/tiff_4.0.7.bb b/meta/recipes-multimedia/libtiff/tiff_4.0.7.bb
index 7f438da..126cad1 100644
--- a/meta/recipes-multimedia/libtiff/tiff_4.0.7.bb
+++ b/meta/recipes-multimedia/libtiff/tiff_4.0.7.bb
@@ -25,6 +25,7 @@ SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \
file://CVE-2017-7596.patch \
file://CVE-2017-7598.patch \
file://CVE-2017-7601.patch \
+ file://CVE-2017-7602.patch \
"
SRC_URI[md5sum] = "77ae928d2c6b7fb46a21c3a29325157b"