diff options
Diffstat (limited to 'meta/recipes-multimedia/libtiff/files/CVE-2017-7601.patch')
-rw-r--r-- | meta/recipes-multimedia/libtiff/files/CVE-2017-7601.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/libtiff/files/CVE-2017-7601.patch b/meta/recipes-multimedia/libtiff/files/CVE-2017-7601.patch new file mode 100644 index 0000000000..1b3c6c879f --- /dev/null +++ b/meta/recipes-multimedia/libtiff/files/CVE-2017-7601.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | From 0a76a8c765c7b8327c59646284fa78c3c27e5490 Mon Sep 17 00:00:00 2001 | ||
2 | From: erouault <erouault> | ||
3 | Date: Wed, 11 Jan 2017 16:13:50 +0000 | ||
4 | Subject: [PATCH] * libtiff/tif_jpeg.c: validate BitsPerSample in | ||
5 | JPEGSetupEncode() to avoid undefined behaviour caused by invalid shift | ||
6 | exponent. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2648 | ||
7 | |||
8 | Upstream-Status: Backport | ||
9 | |||
10 | CVE: CVE-2017-7601 | ||
11 | Signed-off-by: Rajkumar Veer <rveer@mvista.com> | ||
12 | Index: tiff-4.0.7/ChangeLog | ||
13 | =================================================================== | ||
14 | --- tiff-4.0.7.orig/ChangeLog 2017-04-25 18:21:32.856116417 +0530 | ||
15 | +++ tiff-4.0.7/ChangeLog 2017-04-25 18:35:31.904129477 +0530 | ||
16 | @@ -1,4 +1,3 @@ | ||
17 | - | ||
18 | 2017-01-12 Even Rouault <even.rouault at spatialys.com> | ||
19 | |||
20 | * libtiff/tif_ojpeg.c: fix leak in OJPEGReadHeaderInfoSecTablesQTable, | ||
21 | @@ -9,6 +8,12 @@ | ||
22 | |||
23 | 2017-01-11 Even Rouault <even.rouault at spatialys.com> | ||
24 | |||
25 | + * libtiff/tif_jpeg.c: validate BitsPerSample in JPEGSetupEncode() to avoid | ||
26 | + undefined behaviour caused by invalid shift exponent. | ||
27 | + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2648 | ||
28 | + | ||
29 | +2017-01-11 Even Rouault <even.rouault at spatialys.com> | ||
30 | + | ||
31 | * libtiff/tif_dirread.c: avoid division by floating point 0 in | ||
32 | TIFFReadDirEntryCheckedRational() and TIFFReadDirEntryCheckedSrational(), | ||
33 | and return 0 in that case (instead of infinity as before presumably) | ||
34 | Index: tiff-4.0.7/libtiff/tif_jpeg.c | ||
35 | =================================================================== | ||
36 | --- tiff-4.0.7.orig/libtiff/tif_jpeg.c 2017-04-25 18:21:32.744116415 +0530 | ||
37 | +++ tiff-4.0.7/libtiff/tif_jpeg.c 2017-04-25 18:38:02.200131817 +0530 | ||
38 | @@ -1632,7 +1632,13 @@ | ||
39 | "Invalig horizontal/vertical sampling value"); | ||
40 | return (0); | ||
41 | } | ||
42 | - | ||
43 | + if( td->td_bitspersample > 16 ) | ||
44 | + { | ||
45 | + TIFFErrorExt(tif->tif_clientdata, module, | ||
46 | + "BitsPerSample %d not allowed for JPEG", | ||
47 | + td->td_bitspersample); | ||
48 | + return (0); | ||
49 | + } | ||
50 | /* | ||
51 | * A ReferenceBlackWhite field *must* be present since the | ||
52 | * default value is inappropriate for YCbCr. Fill in the | ||