summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRajkumar Veer <rveer@mvista.com>2017-11-03 21:58:43 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-11-05 22:39:48 +0000
commitdbd47a912bb5ced31b0cd34c53b9c1ee18f50bcf (patch)
treec522aa6e0a6501de94288e484d3baa99ce108ee8 /meta
parent3b7576ac2217c68e8d2d31f639a87113971a09bc (diff)
downloadpoky-dbd47a912bb5ced31b0cd34c53b9c1ee18f50bcf.tar.gz
tiff: Security fix CVE-2016-10267
(From OE-Core rev: 91aff69faa7861f9872331ea386145667607550c) Signed-off-by: Rajkumar Veer <rveer@mvista.com> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-multimedia/libtiff/files/CVE-2016-10267.patch70
-rw-r--r--meta/recipes-multimedia/libtiff/tiff_4.0.7.bb1
2 files changed, 71 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/libtiff/files/CVE-2016-10267.patch b/meta/recipes-multimedia/libtiff/files/CVE-2016-10267.patch
new file mode 100644
index 0000000000..f4c57917d8
--- /dev/null
+++ b/meta/recipes-multimedia/libtiff/files/CVE-2016-10267.patch
@@ -0,0 +1,70 @@
1From f8203c7ab1dbd7b5c59158576bec7da90191f42f Mon Sep 17 00:00:00 2001
2From: erouault <erouault>
3Date: Sat, 3 Dec 2016 11:15:18 +0000
4Subject: [PATCH] * libtiff/tif_ojpeg.c: make OJPEGDecode() early exit in case
5 of failure in OJPEGPreDecode(). This will avoid a divide by zero, and
6 potential other issues. Reported by Agostino Sarubbo. Fixes
7 http://bugzilla.maptools.org/show_bug.cgi?id=2611
8
9Upstream-Status: Backport
10
11CVE: CVE-2016-10267
12Signed-off-by: Rajkumar Veer <rveer@mvista.com>
13---
14 ChangeLog | 7 +++++++
15 libtiff/tif_ojpeg.c | 8 ++++++++
16 2 files changed, 15 insertions(+)
17
18diff --git a/ChangeLog b/ChangeLog
19index 7339c1a..66fbcdc 100644
20--- a/ChangeLog
21+++ b/ChangeLog
22@@ -1,3 +1,10 @@
23+2016-12-03 Even Rouault <even.rouault at spatialys.com>
24+
25+ * libtiff/tif_ojpeg.c: make OJPEGDecode() early exit in case of failure in
26+ OJPEGPreDecode(). This will avoid a divide by zero, and potential other issues.
27+ Reported by Agostino Sarubbo.
28+ Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2611
29+
30 2016-12-02 Even Rouault <even.rouault at spatialys.com>
31
32 * libtiff/tif_read.c, libtiff/tiffiop.h: fix uint32 overflow in
33diff --git a/libtiff/tif_ojpeg.c b/libtiff/tif_ojpeg.c
34index 1ccc3f9..f19e8fd 100644
35--- a/libtiff/tif_ojpeg.c
36+++ b/libtiff/tif_ojpeg.c
37@@ -244,6 +244,7 @@ typedef enum {
38
39 typedef struct {
40 TIFF* tif;
41+ int decoder_ok;
42 #ifndef LIBJPEG_ENCAP_EXTERNAL
43 JMP_BUF exit_jmpbuf;
44 #endif
45@@ -722,6 +723,7 @@ OJPEGPreDecode(TIFF* tif, uint16 s)
46 }
47 sp->write_curstrile++;
48 }
49+ sp->decoder_ok = 1;
50 return(1);
51 }
52
53@@ -784,8 +786,14 @@ OJPEGPreDecodeSkipScanlines(TIFF* tif)
54 static int
55 OJPEGDecode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s)
56 {
57+ static const char module[]="OJPEGDecode";
58 OJPEGState* sp=(OJPEGState*)tif->tif_data;
59 (void)s;
60+ if( !sp->decoder_ok )
61+ {
62+ TIFFErrorExt(tif->tif_clientdata,module,"Cannot decode: decoder not correctly initialized");
63+ return 0;
64+ }
65 if (sp->libjpeg_jpeg_query_style==0)
66 {
67 if (OJPEGDecodeRaw(tif,buf,cc)==0)
68--
691.9.1
70
diff --git a/meta/recipes-multimedia/libtiff/tiff_4.0.7.bb b/meta/recipes-multimedia/libtiff/tiff_4.0.7.bb
index cb7c4949cd..d60c7fed13 100644
--- a/meta/recipes-multimedia/libtiff/tiff_4.0.7.bb
+++ b/meta/recipes-multimedia/libtiff/tiff_4.0.7.bb
@@ -15,6 +15,7 @@ SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \
15 file://CVE-2016-10093.patch \ 15 file://CVE-2016-10093.patch \
16 file://CVE-2016-10268.patch \ 16 file://CVE-2016-10268.patch \
17 file://CVE-2016-10266.patch \ 17 file://CVE-2016-10266.patch \
18 file://CVE-2016-10267.patch \
18 " 19 "
19 20
20SRC_URI[md5sum] = "77ae928d2c6b7fb46a21c3a29325157b" 21SRC_URI[md5sum] = "77ae928d2c6b7fb46a21c3a29325157b"