summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2019-07-25 12:03:03 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-09-30 16:44:41 +0100
commit7e2b96aae095cf32a1770c5f2ba2825677b08085 (patch)
tree65ccc4f4c2ec8408fd60303bbcbc42bbd533f738
parent1fc478aa88f6156a68344562c3db9542f1b4b2a2 (diff)
downloadpoky-7e2b96aae095cf32a1770c5f2ba2825677b08085.tar.gz
tiff: fix CVE-2019-6128
(From OE-Core rev: 7293e417dd9bdd04fe0fec177a76c9286234ed46) (From OE-Core rev: c4fcc2dfefb304ac59f8c49acaad149e239de260) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-multimedia/libtiff/tiff/CVE-2019-6128.patch52
-rw-r--r--meta/recipes-multimedia/libtiff/tiff_4.0.10.bb2
2 files changed, 53 insertions, 1 deletions
diff --git a/meta/recipes-multimedia/libtiff/tiff/CVE-2019-6128.patch b/meta/recipes-multimedia/libtiff/tiff/CVE-2019-6128.patch
new file mode 100644
index 0000000000..6f1fd4d447
--- /dev/null
+++ b/meta/recipes-multimedia/libtiff/tiff/CVE-2019-6128.patch
@@ -0,0 +1,52 @@
1CVE: CVE-2019-6128
2Upstream-Status: Backport
3Signed-off-by: Ross Burton <ross.burton@intel.com>
4
5From 0c74a9f49b8d7a36b17b54a7428b3526d20f88a8 Mon Sep 17 00:00:00 2001
6From: Scott Gayou <github.scott@gmail.com>
7Date: Wed, 23 Jan 2019 15:03:53 -0500
8Subject: [PATCH] Fix for simple memory leak that was assigned CVE-2019-6128.
9
10pal2rgb failed to free memory on a few errors. This was reported
11here: http://bugzilla.maptools.org/show_bug.cgi?id=2836.
12---
13 tools/pal2rgb.c | 7 ++++++-
14 1 file changed, 6 insertions(+), 1 deletion(-)
15
16diff --git a/tools/pal2rgb.c b/tools/pal2rgb.c
17index 01d8502ec..9492f1cf1 100644
18--- a/tools/pal2rgb.c
19+++ b/tools/pal2rgb.c
20@@ -118,12 +118,14 @@ main(int argc, char* argv[])
21 shortv != PHOTOMETRIC_PALETTE) {
22 fprintf(stderr, "%s: Expecting a palette image.\n",
23 argv[optind]);
24+ (void) TIFFClose(in);
25 return (-1);
26 }
27 if (!TIFFGetField(in, TIFFTAG_COLORMAP, &rmap, &gmap, &bmap)) {
28 fprintf(stderr,
29 "%s: No colormap (not a valid palette image).\n",
30 argv[optind]);
31+ (void) TIFFClose(in);
32 return (-1);
33 }
34 bitspersample = 0;
35@@ -131,11 +133,14 @@ main(int argc, char* argv[])
36 if (bitspersample != 8) {
37 fprintf(stderr, "%s: Sorry, can only handle 8-bit images.\n",
38 argv[optind]);
39+ (void) TIFFClose(in);
40 return (-1);
41 }
42 out = TIFFOpen(argv[optind+1], "w");
43- if (out == NULL)
44+ if (out == NULL) {
45+ (void) TIFFClose(in);
46 return (-2);
47+ }
48 cpTags(in, out);
49 TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &imagewidth);
50 TIFFGetField(in, TIFFTAG_IMAGELENGTH, &imagelength);
51--
522.21.0
diff --git a/meta/recipes-multimedia/libtiff/tiff_4.0.10.bb b/meta/recipes-multimedia/libtiff/tiff_4.0.10.bb
index 152fa819a5..a82d74498e 100644
--- a/meta/recipes-multimedia/libtiff/tiff_4.0.10.bb
+++ b/meta/recipes-multimedia/libtiff/tiff_4.0.10.bb
@@ -6,8 +6,8 @@ CVE_PRODUCT = "libtiff"
6 6
7SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \ 7SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \
8 file://libtool2.patch \ 8 file://libtool2.patch \
9 file://CVE-2019-6128.patch"
9 " 10 "
10
11SRC_URI[md5sum] = "114192d7ebe537912a2b97408832e7fd" 11SRC_URI[md5sum] = "114192d7ebe537912a2b97408832e7fd"
12SRC_URI[sha256sum] = "2c52d11ccaf767457db0c46795d9c7d1a8d8f76f68b0b800a3dfe45786b996e4" 12SRC_URI[sha256sum] = "2c52d11ccaf767457db0c46795d9c7d1a8d8f76f68b0b800a3dfe45786b996e4"
13 13