diff options
Diffstat (limited to 'meta/recipes-multimedia/libtiff/files/CVE-2016-10268.patch')
-rw-r--r-- | meta/recipes-multimedia/libtiff/files/CVE-2016-10268.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/libtiff/files/CVE-2016-10268.patch b/meta/recipes-multimedia/libtiff/files/CVE-2016-10268.patch new file mode 100644 index 0000000000..03b982a1d9 --- /dev/null +++ b/meta/recipes-multimedia/libtiff/files/CVE-2016-10268.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | From 5397a417e61258c69209904e652a1f409ec3b9df Mon Sep 17 00:00:00 2001 | ||
2 | From: erouault <erouault> | ||
3 | Date: Fri, 2 Dec 2016 22:13:32 +0000 | ||
4 | Subject: [PATCH] * tools/tiffcp.c: avoid uint32 underflow in cpDecodedStrips | ||
5 | that can cause various issues, such as buffer overflows in the library. | ||
6 | Reported by Agostino Sarubbo. Fixes | ||
7 | http://bugzilla.maptools.org/show_bug.cgi?id=2598 | ||
8 | |||
9 | Upstream-Status: Backport | ||
10 | CVE: CVE-2016-10268 | ||
11 | Signed-off-by: Rajkumar Veer <rveer@mvista.com> | ||
12 | |||
13 | --- | ||
14 | ChangeLog | 7 +++++++ | ||
15 | tools/tiffcp.c | 2 +- | ||
16 | 2 files changed, 8 insertions(+), 1 deletion(-) | ||
17 | |||
18 | Index: tiff-4.0.7/tools/tiffcp.c | ||
19 | =================================================================== | ||
20 | --- tiff-4.0.7.orig/tools/tiffcp.c | ||
21 | +++ tiff-4.0.7/tools/tiffcp.c | ||
22 | @@ -985,7 +985,7 @@ DECLAREcpFunc(cpDecodedStrips) | ||
23 | tstrip_t s, ns = TIFFNumberOfStrips(in); | ||
24 | uint32 row = 0; | ||
25 | _TIFFmemset(buf, 0, stripsize); | ||
26 | - for (s = 0; s < ns; s++) { | ||
27 | + for (s = 0; s < ns && row < imagelength; s++) { | ||
28 | tsize_t cc = (row + rowsperstrip > imagelength) ? | ||
29 | TIFFVStripSize(in, imagelength - row) : stripsize; | ||
30 | if (TIFFReadEncodedStrip(in, s, buf, cc) < 0 | ||