diff options
author | Yi Zhao <yi.zhao@windriver.com> | 2017-08-18 14:55:11 +0800 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2017-08-28 11:06:02 +0200 |
commit | a7f02b1fe59e1c35e0abfe5f716df0fcd8b9d204 (patch) | |
tree | 5924ee10d0af275e07e3b5a01baf0180416b6236 | |
parent | 2ee20c389a3db6e1bb633e06ffd2ade43a70e14d (diff) | |
download | meta-openembedded-a7f02b1fe59e1c35e0abfe5f716df0fcd8b9d204.tar.gz |
gd: update to 2.2.4
* Remove the following patches which already merged in upstream:
fix-gcc-unused-functions.patch
.gitignore-the-new-test-case.patch
CVE-2016-10166.patch
CVE-2016-10167.patch
CVE-2016-10168.patch
CVE-2016-6906-1.patch
CVE-2016-6906-2.patch
Fix-290-TGA-RLE-decoding-is-broken.patch
* Update LICENSE's MD5 check sum.
The COPYING file has been update with the following commits in
upstream:
commit f863b3c2d300ff5344f6752e5813b0d6985e79c4
Resolve #282: COPYING vs. docs/naturaldocs/license.txt
commit 9ccdaedbd9a2cfd1c8a9a258c09af161e796bd41
Sync COPYING and docs/naturaldocs/license.txt
These two commits updated the copyright statement regarding the
authorship of gd and adjust the format.
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r-- | meta-oe/recipes-support/gd/files/fix-gcc-unused-functions.patch | 43 | ||||
-rw-r--r-- | meta-oe/recipes-support/gd/gd/.gitignore-the-new-test-case.patch | 24 | ||||
-rw-r--r-- | meta-oe/recipes-support/gd/gd/CVE-2016-10166.patch | 60 | ||||
-rw-r--r-- | meta-oe/recipes-support/gd/gd/CVE-2016-10167.patch | 48 | ||||
-rw-r--r-- | meta-oe/recipes-support/gd/gd/CVE-2016-10168.patch | 38 | ||||
-rw-r--r-- | meta-oe/recipes-support/gd/gd/CVE-2016-6906-1.patch | 167 | ||||
-rw-r--r-- | meta-oe/recipes-support/gd/gd/CVE-2016-6906-2.patch | 135 | ||||
-rw-r--r-- | meta-oe/recipes-support/gd/gd/Fix-290-TGA-RLE-decoding-is-broken.patch | 359 | ||||
-rw-r--r-- | meta-oe/recipes-support/gd/gd_2.2.4.bb (renamed from meta-oe/recipes-support/gd/gd_2.2.3.bb) | 27 |
9 files changed, 4 insertions, 897 deletions
diff --git a/meta-oe/recipes-support/gd/files/fix-gcc-unused-functions.patch b/meta-oe/recipes-support/gd/files/fix-gcc-unused-functions.patch deleted file mode 100644 index 02cb5ad75..000000000 --- a/meta-oe/recipes-support/gd/files/fix-gcc-unused-functions.patch +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | gdft.c: remove functions that cause warnings about being unused | ||
2 | |||
3 | Upstream-Status: Backport (Fixed in master branch) | ||
4 | |||
5 | Signed-off-by: Derek Straka <derek@asterius.io> | ||
6 | --- git/src/gdft.c.orig 2016-08-12 10:20:41.418440091 -0400 | ||
7 | +++ git/src/gdft.c 2016-08-12 10:22:34.226442987 -0400 | ||
8 | @@ -139,16 +139,6 @@ | ||
9 | } | ||
10 | #else | ||
11 | |||
12 | -#ifndef HAVE_LIBFONTCONFIG | ||
13 | -static char * font_pattern(char **fontpath, char *fontpattern) | ||
14 | -{ | ||
15 | - (void)fontpath; | ||
16 | - (void)fontpattern; | ||
17 | - | ||
18 | - return "libgd was not built with FontConfig support\n"; | ||
19 | -} | ||
20 | -#endif /* HAVE_LIBFONTCONFIG */ | ||
21 | - | ||
22 | #include "gdcache.h" | ||
23 | /* 2.0.16 Christophe Thomas: starting with FreeType 2.1.6, this is | ||
24 | mandatory, and it has been supported for a long while. */ | ||
25 | @@ -446,16 +436,15 @@ | ||
26 | return (strcmp (a->fontlist, b->fontlist) == 0 && a->flags == b->flags); | ||
27 | } | ||
28 | |||
29 | +#ifdef HAVE_LIBFONTCONFIG | ||
30 | static int useFontConfig(int flag) | ||
31 | { | ||
32 | -#ifdef HAVE_LIBFONTCONFIG | ||
33 | if (fontConfigFlag) { | ||
34 | return (!(flag & gdFTEX_FONTPATHNAME)); | ||
35 | } | ||
36 | -#endif | ||
37 | return flag & gdFTEX_FONTCONFIG; | ||
38 | } | ||
39 | - | ||
40 | +#endif | ||
41 | static void * | ||
42 | fontFetch (char **error, void *key) | ||
43 | { | ||
diff --git a/meta-oe/recipes-support/gd/gd/.gitignore-the-new-test-case.patch b/meta-oe/recipes-support/gd/gd/.gitignore-the-new-test-case.patch deleted file mode 100644 index eab4975cb..000000000 --- a/meta-oe/recipes-support/gd/gd/.gitignore-the-new-test-case.patch +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | From 8520274759cb8f95e483b02a445aff225e13467b Mon Sep 17 00:00:00 2001 | ||
2 | From: "Christoph M. Becker" <cmbecker69@gmx.de> | ||
3 | Date: Tue, 16 Aug 2016 16:00:27 +0200 | ||
4 | Subject: [PATCH] .gitignore the new test case | ||
5 | |||
6 | Upstream-Status: Backport | ||
7 | |||
8 | Signed-off-by: Catalin Enache <catalin.enache@windriver.com> | ||
9 | --- | ||
10 | tests/tga/.gitignore | 1 + | ||
11 | 1 file changed, 1 insertion(+) | ||
12 | |||
13 | diff --git a/tests/tga/.gitignore b/tests/tga/.gitignore | ||
14 | index e88e124..7a659b1 100644 | ||
15 | --- a/tests/tga/.gitignore | ||
16 | +++ b/tests/tga/.gitignore | ||
17 | @@ -4,3 +4,4 @@ | ||
18 | /bug00248 | ||
19 | /bug00248a | ||
20 | /tga_null | ||
21 | +/tga_read | ||
22 | -- | ||
23 | 2.10.2 | ||
24 | |||
diff --git a/meta-oe/recipes-support/gd/gd/CVE-2016-10166.patch b/meta-oe/recipes-support/gd/gd/CVE-2016-10166.patch deleted file mode 100644 index 7ccfbeabc..000000000 --- a/meta-oe/recipes-support/gd/gd/CVE-2016-10166.patch +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | From c92240c1670c20c2f854761d3a89ab61dd158c91 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Christoph M. Becker" <cmbecker69@gmx.de> | ||
3 | Date: Sat, 6 Aug 2016 10:08:53 +0200 | ||
4 | Subject: [PATCH] Fix potential unsigned underflow | ||
5 | |||
6 | No need to decrease `u`, so we don't do it. While we're at it, we also factor | ||
7 | out the overflow check of the loop, what improves performance and readability. | ||
8 | |||
9 | This issue has been reported by Stefan Esser to security@libgd.org. | ||
10 | |||
11 | Upstream-Status: Backport | ||
12 | CVE: CVE-2016-10166 | ||
13 | |||
14 | Signed-off-by: Catalin Enache <catalin.enache@windriver.com> | ||
15 | --- | ||
16 | src/gd_interpolation.c | 19 ++++++++++--------- | ||
17 | 1 file changed, 10 insertions(+), 9 deletions(-) | ||
18 | |||
19 | diff --git a/src/gd_interpolation.c b/src/gd_interpolation.c | ||
20 | index 7e7943d..9944349 100644 | ||
21 | --- a/src/gd_interpolation.c | ||
22 | +++ b/src/gd_interpolation.c | ||
23 | @@ -829,8 +829,13 @@ static inline LineContribType * _gdContributionsAlloc(unsigned int line_length, | ||
24 | { | ||
25 | unsigned int u = 0; | ||
26 | LineContribType *res; | ||
27 | - int overflow_error = 0; | ||
28 | + size_t weights_size; | ||
29 | |||
30 | + if (overflow2(windows_size, sizeof(double))) { | ||
31 | + return NULL; | ||
32 | + } else { | ||
33 | + weights_size = windows_size * sizeof(double); | ||
34 | + } | ||
35 | res = (LineContribType *) gdMalloc(sizeof(LineContribType)); | ||
36 | if (!res) { | ||
37 | return NULL; | ||
38 | @@ -847,15 +852,11 @@ static inline LineContribType * _gdContributionsAlloc(unsigned int line_length, | ||
39 | return NULL; | ||
40 | } | ||
41 | for (u = 0 ; u < line_length ; u++) { | ||
42 | - if (overflow2(windows_size, sizeof(double))) { | ||
43 | - overflow_error = 1; | ||
44 | - } else { | ||
45 | - res->ContribRow[u].Weights = (double *) gdMalloc(windows_size * sizeof(double)); | ||
46 | - } | ||
47 | - if (overflow_error == 1 || res->ContribRow[u].Weights == NULL) { | ||
48 | + res->ContribRow[u].Weights = (double *) gdMalloc(weights_size); | ||
49 | + if (res->ContribRow[u].Weights == NULL) { | ||
50 | unsigned int i; | ||
51 | - u--; | ||
52 | - for (i=0;i<=u;i++) { | ||
53 | + | ||
54 | + for (i=0;i<u;i++) { | ||
55 | gdFree(res->ContribRow[i].Weights); | ||
56 | } | ||
57 | gdFree(res->ContribRow); | ||
58 | -- | ||
59 | 2.10.2 | ||
60 | |||
diff --git a/meta-oe/recipes-support/gd/gd/CVE-2016-10167.patch b/meta-oe/recipes-support/gd/gd/CVE-2016-10167.patch deleted file mode 100644 index 54ef22cb6..000000000 --- a/meta-oe/recipes-support/gd/gd/CVE-2016-10167.patch +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | From 6ab531ef0d82efb9e00236ee5ea23928335d221f Mon Sep 17 00:00:00 2001 | ||
2 | From: Catalin Enache <catalin.enache@windriver.com> | ||
3 | Date: Fri, 7 Apr 2017 12:30:22 +0300 | ||
4 | Subject: [PATCH] Fix DOS vulnerability in gdImageCreateFromGd2Ctx() | ||
5 | |||
6 | We must not pretend that there are image data if there are none. Instead | ||
7 | we fail reading the image file gracefully. | ||
8 | |||
9 | Upstream-Status: Backport | ||
10 | CVE: CVE-2016-10167 | ||
11 | |||
12 | Signed-off-by: Catalin Enache <catalin.enache@windriver.com> | ||
13 | --- | ||
14 | src/gd_gd2.c | 14 ++++++-------- | ||
15 | 1 file changed, 6 insertions(+), 8 deletions(-) | ||
16 | |||
17 | diff --git a/src/gd_gd2.c b/src/gd_gd2.c | ||
18 | index 8df93c1..bae65ea 100644 | ||
19 | --- a/src/gd_gd2.c | ||
20 | +++ b/src/gd_gd2.c | ||
21 | @@ -445,18 +445,16 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2Ctx (gdIOCtxPtr in) | ||
22 | |||
23 | if (im->trueColor) { | ||
24 | if (!gdGetInt (&im->tpixels[y][x], in)) { | ||
25 | - /*printf("EOF while reading\n"); */ | ||
26 | - /*gdImageDestroy(im); */ | ||
27 | - /*return 0; */ | ||
28 | - im->tpixels[y][x] = 0; | ||
29 | + gd_error("gd2: EOF while reading\n"); | ||
30 | + gdImageDestroy(im); | ||
31 | + return NULL; | ||
32 | } | ||
33 | } else { | ||
34 | int ch; | ||
35 | if (!gdGetByte (&ch, in)) { | ||
36 | - /*printf("EOF while reading\n"); */ | ||
37 | - /*gdImageDestroy(im); */ | ||
38 | - /*return 0; */ | ||
39 | - ch = 0; | ||
40 | + gd_error("gd2: EOF while reading\n"); | ||
41 | + gdImageDestroy(im); | ||
42 | + return NULL; | ||
43 | } | ||
44 | im->pixels[y][x] = ch; | ||
45 | } | ||
46 | -- | ||
47 | 2.10.2 | ||
48 | |||
diff --git a/meta-oe/recipes-support/gd/gd/CVE-2016-10168.patch b/meta-oe/recipes-support/gd/gd/CVE-2016-10168.patch deleted file mode 100644 index aef1060c4..000000000 --- a/meta-oe/recipes-support/gd/gd/CVE-2016-10168.patch +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | From 2d37bdc03a6e2b820fe380016f22592a7733e0be Mon Sep 17 00:00:00 2001 | ||
2 | From: Catalin Enache <catalin.enache@windriver.com> | ||
3 | Date: Fri, 7 Apr 2017 12:32:49 +0300 | ||
4 | Subject: [PATCH] Fix #354: Signed Integer Overflow gd_io.c | ||
5 | |||
6 | GD2 stores the number of horizontal and vertical chunks as words (i.e. 2 | ||
7 | byte unsigned). These values are multiplied and assigned to an int when | ||
8 | reading the image, what can cause integer overflows. We have to avoid | ||
9 | that, and also make sure that either chunk count is actually greater | ||
10 | than zero. If illegal chunk counts are detected, we bail out from | ||
11 | reading the image. | ||
12 | |||
13 | Upstream-Status: Backport | ||
14 | CVE: CVE-2016-10168 | ||
15 | |||
16 | Signed-off-by: Catalin Enache <catalin.enache@windriver.com> | ||
17 | --- | ||
18 | src/gd_gd2.c | 4 ++++ | ||
19 | 1 file changed, 4 insertions(+) | ||
20 | |||
21 | diff --git a/src/gd_gd2.c b/src/gd_gd2.c | ||
22 | index bae65ea..9006bd2 100644 | ||
23 | --- a/src/gd_gd2.c | ||
24 | +++ b/src/gd_gd2.c | ||
25 | @@ -151,6 +151,10 @@ _gd2GetHeader (gdIOCtxPtr in, int *sx, int *sy, | ||
26 | GD2_DBG (printf ("%d Chunks vertically\n", *ncy)); | ||
27 | |||
28 | if (gd2_compressed (*fmt)) { | ||
29 | + if (*ncx <= 0 || *ncy <= 0 || *ncx > INT_MAX / *ncy) { | ||
30 | + GD2_DBG(printf ("Illegal chunk counts: %d * %d\n", *ncx, *ncy)); | ||
31 | + goto fail1; | ||
32 | + } | ||
33 | nc = (*ncx) * (*ncy); | ||
34 | |||
35 | GD2_DBG (printf ("Reading %d chunk index entries\n", nc)); | ||
36 | -- | ||
37 | 2.10.2 | ||
38 | |||
diff --git a/meta-oe/recipes-support/gd/gd/CVE-2016-6906-1.patch b/meta-oe/recipes-support/gd/gd/CVE-2016-6906-1.patch deleted file mode 100644 index 97b7f7249..000000000 --- a/meta-oe/recipes-support/gd/gd/CVE-2016-6906-1.patch +++ /dev/null | |||
@@ -1,167 +0,0 @@ | |||
1 | From fb0e0cce0b9f25389ab56604c3547351617e1415 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Christoph M. Becker" <cmbecker69@gmx.de> | ||
3 | Date: Tue, 16 Aug 2016 16:26:19 +0200 | ||
4 | Subject: [PATCH] Fix OOB reads of the TGA decompression buffer | ||
5 | |||
6 | It is possible to craft TGA files which will overflow the decompression | ||
7 | buffer, but not the image's bitmap. Therefore we augment the check for the | ||
8 | bitmap's overflow with a check for the buffer's overflow. | ||
9 | |||
10 | This issue had been reported by Ibrahim El-Sayed to security@libgd.org. | ||
11 | |||
12 | CVE-2016-6906 | ||
13 | |||
14 | Upstream-Status: Backport | ||
15 | CVE: CVE-2016-6906 | ||
16 | |||
17 | Signed-off-by: Catalin Enache <catalin.enache@windriver.com> | ||
18 | --- | ||
19 | src/gd_tga.c | 6 ++++-- | ||
20 | tests/tga/.gitignore | 1 + | ||
21 | tests/tga/CMakeLists.txt | 1 + | ||
22 | tests/tga/Makemodule.am | 2 ++ | ||
23 | tests/tga/heap_overflow.c | 51 ++++++++++++++++++++++++++++++++++++++++++++ | ||
24 | tests/tga/heap_overflow.tga | Bin 0 -> 605 bytes | ||
25 | 6 files changed, 59 insertions(+), 2 deletions(-) | ||
26 | create mode 100644 tests/tga/heap_overflow.c | ||
27 | create mode 100644 tests/tga/heap_overflow.tga | ||
28 | |||
29 | diff --git a/src/gd_tga.c b/src/gd_tga.c | ||
30 | index 8737b04..68e4b17 100644 | ||
31 | --- a/src/gd_tga.c | ||
32 | +++ b/src/gd_tga.c | ||
33 | @@ -300,7 +300,8 @@ int read_image_tga( gdIOCtx *ctx, oTga *tga ) | ||
34 | encoded_pixels = ( ( decompression_buffer[ buffer_caret ] & ~TGA_RLE_FLAG ) + 1 ); | ||
35 | buffer_caret++; | ||
36 | |||
37 | - if ((bitmap_caret + (encoded_pixels * pixel_block_size)) > image_block_size) { | ||
38 | + if ((bitmap_caret + (encoded_pixels * pixel_block_size)) > image_block_size | ||
39 | + || buffer_caret + pixel_block_size > rle_size) { | ||
40 | gdFree( decompression_buffer ); | ||
41 | gdFree( conversion_buffer ); | ||
42 | return -1; | ||
43 | @@ -316,7 +317,8 @@ int read_image_tga( gdIOCtx *ctx, oTga *tga ) | ||
44 | encoded_pixels = decompression_buffer[ buffer_caret ] + 1; | ||
45 | buffer_caret++; | ||
46 | |||
47 | - if ((bitmap_caret + (encoded_pixels * pixel_block_size)) > image_block_size) { | ||
48 | + if ((bitmap_caret + (encoded_pixels * pixel_block_size)) > image_block_size | ||
49 | + || buffer_caret + (encoded_pixels * pixel_block_size) > rle_size) { | ||
50 | gdFree( decompression_buffer ); | ||
51 | gdFree( conversion_buffer ); | ||
52 | return -1; | ||
53 | diff --git a/tests/tga/.gitignore b/tests/tga/.gitignore | ||
54 | index 7a659b1..cf0556b 100644 | ||
55 | --- a/tests/tga/.gitignore | ||
56 | +++ b/tests/tga/.gitignore | ||
57 | @@ -3,5 +3,6 @@ | ||
58 | /bug00247a | ||
59 | /bug00248 | ||
60 | /bug00248a | ||
61 | +/heap_overflow | ||
62 | /tga_null | ||
63 | /tga_read | ||
64 | diff --git a/tests/tga/CMakeLists.txt b/tests/tga/CMakeLists.txt | ||
65 | index 789fb14..11542a0 100644 | ||
66 | --- a/tests/tga/CMakeLists.txt | ||
67 | +++ b/tests/tga/CMakeLists.txt | ||
68 | @@ -5,6 +5,7 @@ LIST(APPEND TESTS_FILES | ||
69 | bug00247a | ||
70 | bug00248 | ||
71 | bug00248a | ||
72 | + heap_overflow | ||
73 | tga_read | ||
74 | ) | ||
75 | |||
76 | diff --git a/tests/tga/Makemodule.am b/tests/tga/Makemodule.am | ||
77 | index a1e6af6..916d707 100644 | ||
78 | --- a/tests/tga/Makemodule.am | ||
79 | +++ b/tests/tga/Makemodule.am | ||
80 | @@ -4,6 +4,7 @@ libgd_test_programs += \ | ||
81 | tga/bug00247a \ | ||
82 | tga/bug00248 \ | ||
83 | tga/bug00248a \ | ||
84 | + tga/heap_overflow \ | ||
85 | tga/tga_null \ | ||
86 | tga/tga_read | ||
87 | |||
88 | @@ -14,6 +15,7 @@ EXTRA_DIST += \ | ||
89 | tga/bug00247a.tga \ | ||
90 | tga/bug00248.tga \ | ||
91 | tga/bug00248a.tga \ | ||
92 | + tga/heap_overflow.tga \ | ||
93 | tga/tga_read_rgb.png \ | ||
94 | tga/tga_read_rgb.tga \ | ||
95 | tga/tga_read_rgb_rle.tga | ||
96 | diff --git a/tests/tga/heap_overflow.c b/tests/tga/heap_overflow.c | ||
97 | new file mode 100644 | ||
98 | index 0000000..0e9a2d0 | ||
99 | --- /dev/null | ||
100 | +++ b/tests/tga/heap_overflow.c | ||
101 | @@ -0,0 +1,51 @@ | ||
102 | +/** | ||
103 | + * Test that the crafted TGA file doesn't trigger OOB reads. | ||
104 | + */ | ||
105 | + | ||
106 | + | ||
107 | +#include "gd.h" | ||
108 | +#include "gdtest.h" | ||
109 | + | ||
110 | + | ||
111 | +static size_t read_test_file(char **buffer, char *basename); | ||
112 | + | ||
113 | + | ||
114 | +int main() | ||
115 | +{ | ||
116 | + gdImagePtr im; | ||
117 | + char *buffer; | ||
118 | + size_t size; | ||
119 | + | ||
120 | + size = read_test_file(&buffer, "heap_overflow.tga"); | ||
121 | + im = gdImageCreateFromTgaPtr(size, (void *) buffer); | ||
122 | + gdTestAssert(im == NULL); | ||
123 | + free(buffer); | ||
124 | + | ||
125 | + return gdNumFailures(); | ||
126 | +} | ||
127 | + | ||
128 | + | ||
129 | +static size_t read_test_file(char **buffer, char *basename) | ||
130 | +{ | ||
131 | + char *filename; | ||
132 | + FILE *fp; | ||
133 | + size_t exp_size, act_size; | ||
134 | + | ||
135 | + filename = gdTestFilePath2("tga", basename); | ||
136 | + fp = fopen(filename, "rb"); | ||
137 | + gdTestAssert(fp != NULL); | ||
138 | + | ||
139 | + fseek(fp, 0, SEEK_END); | ||
140 | + exp_size = ftell(fp); | ||
141 | + fseek(fp, 0, SEEK_SET); | ||
142 | + | ||
143 | + *buffer = malloc(exp_size); | ||
144 | + gdTestAssert(*buffer != NULL); | ||
145 | + act_size = fread(*buffer, sizeof(**buffer), exp_size, fp); | ||
146 | + gdTestAssert(act_size == exp_size); | ||
147 | + | ||
148 | + fclose(fp); | ||
149 | + free(filename); | ||
150 | + | ||
151 | + return act_size; | ||
152 | +} | ||
153 | diff --git a/tests/tga/heap_overflow.tga b/tests/tga/heap_overflow.tga | ||
154 | new file mode 100644 | ||
155 | index 0000000000000000000000000000000000000000..e9bc0ecb2a847ac6edba92dd0ff61167b49002cd | ||
156 | GIT binary patch | ||
157 | literal 605 | ||
158 | zcmZQz;9`IQ9tIu;g&7<$F3o7Yg1qzyh6tefy9wZAs2d<Uh*yuz=?XwW4Qvuv#g2nS | ||
159 | zp93+mT0rVR>T&8(2TGy=f_l)@gSap~$FayUFu(!|SyJIFga^{8fGj~vwq8kkVgvv> | ||
160 | Cavop+ | ||
161 | |||
162 | literal 0 | ||
163 | HcmV?d00001 | ||
164 | |||
165 | -- | ||
166 | 2.10.2 | ||
167 | |||
diff --git a/meta-oe/recipes-support/gd/gd/CVE-2016-6906-2.patch b/meta-oe/recipes-support/gd/gd/CVE-2016-6906-2.patch deleted file mode 100644 index 8b6de9711..000000000 --- a/meta-oe/recipes-support/gd/gd/CVE-2016-6906-2.patch +++ /dev/null | |||
@@ -1,135 +0,0 @@ | |||
1 | From 58b6dde319c301b0eae27d12e2a659e067d80558 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Christoph M. Becker" <cmbecker69@gmx.de> | ||
3 | Date: Tue, 16 Aug 2016 16:26:19 +0200 | ||
4 | Subject: [PATCH] Fix OOB reads of the TGA decompression buffer | ||
5 | |||
6 | It is possible to craft TGA files which will overflow the decompression | ||
7 | buffer, but not the image's bitmap. Therefore we also have to check for | ||
8 | potential decompression buffer overflows. | ||
9 | |||
10 | This issue had been reported by Ibrahim El-Sayed to security@libgd.org; | ||
11 | a modified case exposing an off-by-one error of the first patch had been | ||
12 | provided by Konrad Beckmann. | ||
13 | |||
14 | This commit is an amendment to commit fb0e0cce, so we use CVE-2016-6906 | ||
15 | as well. | ||
16 | |||
17 | Upstream-Status: Backport | ||
18 | CVE: CVE-2016-6906 | ||
19 | |||
20 | Signed-off-by: Catalin Enache <catalin.enache@windriver.com> | ||
21 | --- | ||
22 | src/gd_tga.c | 8 +++++++- | ||
23 | tests/tga/Makemodule.am | 3 ++- | ||
24 | tests/tga/heap_overflow.c | 16 ++++++++++++---- | ||
25 | tests/tga/heap_overflow_1.tga | Bin 0 -> 605 bytes | ||
26 | tests/tga/heap_overflow_2.tga | Bin 0 -> 8746 bytes | ||
27 | 5 files changed, 21 insertions(+), 6 deletions(-) | ||
28 | create mode 100644 tests/tga/heap_overflow_1.tga | ||
29 | create mode 100644 tests/tga/heap_overflow_2.tga | ||
30 | |||
31 | diff --git a/src/gd_tga.c b/src/gd_tga.c | ||
32 | index 68e4b17..f80f0b1 100644 | ||
33 | --- a/src/gd_tga.c | ||
34 | +++ b/src/gd_tga.c | ||
35 | @@ -295,7 +295,13 @@ int read_image_tga( gdIOCtx *ctx, oTga *tga ) | ||
36 | buffer_caret = 0; | ||
37 | |||
38 | while( bitmap_caret < image_block_size ) { | ||
39 | - | ||
40 | + | ||
41 | + if (buffer_caret + pixel_block_size > rle_size) { | ||
42 | + gdFree( decompression_buffer ); | ||
43 | + gdFree( conversion_buffer ); | ||
44 | + return -1; | ||
45 | + } | ||
46 | + | ||
47 | if ((decompression_buffer[buffer_caret] & TGA_RLE_FLAG) == TGA_RLE_FLAG) { | ||
48 | encoded_pixels = ( ( decompression_buffer[ buffer_caret ] & ~TGA_RLE_FLAG ) + 1 ); | ||
49 | buffer_caret++; | ||
50 | diff --git a/tests/tga/Makemodule.am b/tests/tga/Makemodule.am | ||
51 | index 916d707..ab08dbf 100644 | ||
52 | --- a/tests/tga/Makemodule.am | ||
53 | +++ b/tests/tga/Makemodule.am | ||
54 | @@ -15,7 +15,8 @@ EXTRA_DIST += \ | ||
55 | tga/bug00247a.tga \ | ||
56 | tga/bug00248.tga \ | ||
57 | tga/bug00248a.tga \ | ||
58 | - tga/heap_overflow.tga \ | ||
59 | + tga/heap_overflow_1.tga \ | ||
60 | + tga/heap_overflow_2.tga \ | ||
61 | tga/tga_read_rgb.png \ | ||
62 | tga/tga_read_rgb.tga \ | ||
63 | tga/tga_read_rgb_rle.tga | ||
64 | diff --git a/tests/tga/heap_overflow.c b/tests/tga/heap_overflow.c | ||
65 | index 0e9a2d0..ddd4b63 100644 | ||
66 | --- a/tests/tga/heap_overflow.c | ||
67 | +++ b/tests/tga/heap_overflow.c | ||
68 | @@ -1,5 +1,5 @@ | ||
69 | /** | ||
70 | - * Test that the crafted TGA file doesn't trigger OOB reads. | ||
71 | + * Test that crafted TGA files don't trigger OOB reads. | ||
72 | */ | ||
73 | |||
74 | |||
75 | @@ -7,21 +7,29 @@ | ||
76 | #include "gdtest.h" | ||
77 | |||
78 | |||
79 | +static void check_file(char *basename); | ||
80 | static size_t read_test_file(char **buffer, char *basename); | ||
81 | |||
82 | |||
83 | int main() | ||
84 | { | ||
85 | + check_file("heap_overflow_1.tga"); | ||
86 | + check_file("heap_overflow_2.tga"); | ||
87 | + | ||
88 | + return gdNumFailures(); | ||
89 | +} | ||
90 | + | ||
91 | + | ||
92 | +static void check_file(char *basename) | ||
93 | +{ | ||
94 | gdImagePtr im; | ||
95 | char *buffer; | ||
96 | size_t size; | ||
97 | |||
98 | - size = read_test_file(&buffer, "heap_overflow.tga"); | ||
99 | + size = read_test_file(&buffer, basename); | ||
100 | im = gdImageCreateFromTgaPtr(size, (void *) buffer); | ||
101 | gdTestAssert(im == NULL); | ||
102 | free(buffer); | ||
103 | - | ||
104 | - return gdNumFailures(); | ||
105 | } | ||
106 | |||
107 | |||
108 | diff --git a/tests/tga/heap_overflow_1.tga b/tests/tga/heap_overflow_1.tga | ||
109 | new file mode 100644 | ||
110 | index 0000000000000000000000000000000000000000..e9bc0ecb2a847ac6edba92dd0ff61167b49002cd | ||
111 | GIT binary patch | ||
112 | literal 605 | ||
113 | zcmZQz;9`IQ9tIu;g&7<$F3o7Yg1qzyh6tefy9wZAs2d<Uh*yuz=?XwW4Qvuv#g2nS | ||
114 | zp93+mT0rVR>T&8(2TGy=f_l)@gSap~$FayUFu(!|SyJIFga^{8fGj~vwq8kkVgvv> | ||
115 | Cavop+ | ||
116 | |||
117 | literal 0 | ||
118 | HcmV?d00001 | ||
119 | |||
120 | diff --git a/tests/tga/heap_overflow_2.tga b/tests/tga/heap_overflow_2.tga | ||
121 | new file mode 100644 | ||
122 | index 0000000000000000000000000000000000000000..2b681f2df8941d6823aa761be0a7fa3c02c92cbf | ||
123 | GIT binary patch | ||
124 | literal 8746 | ||
125 | zcmeIxF$#b%6a>*<djij4?cuz+Vi5?!RIY)@*eDAQ@`zPSwQE1NTI<YQEqdQG#s5@h | ||
126 | zwDFtAoIjm)CIQa|$z*q(vz}DbnPjrN&RI{Y=}a=&UFWPP)joCZ<31}ey8!(}FZZ71 | ||
127 | zWop>#e)AY=opmMw&j!h4cb&7IRMVMcvb)Y%PpaumGTB|{tS8lUCYkK6bJmk;IzMDC | ||
128 | D4PYIN | ||
129 | |||
130 | literal 0 | ||
131 | HcmV?d00001 | ||
132 | |||
133 | -- | ||
134 | 2.10.2 | ||
135 | |||
diff --git a/meta-oe/recipes-support/gd/gd/Fix-290-TGA-RLE-decoding-is-broken.patch b/meta-oe/recipes-support/gd/gd/Fix-290-TGA-RLE-decoding-is-broken.patch deleted file mode 100644 index 64f5c6296..000000000 --- a/meta-oe/recipes-support/gd/gd/Fix-290-TGA-RLE-decoding-is-broken.patch +++ /dev/null | |||
@@ -1,359 +0,0 @@ | |||
1 | From 4f8e26f2a40ffaa3a5b77be6a49989a1a42e2b83 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Christoph M. Becker" <cmbecker69@gmx.de> | ||
3 | Date: Tue, 16 Aug 2016 14:27:23 +0200 | ||
4 | Subject: [PATCH] Fix #290: TGA RLE decoding is broken | ||
5 | |||
6 | We make it work only, for now. Actually, it doesn't make sense that | ||
7 | `oTga::bitmap` is an `int *` as we're storing only bytes there. If this | ||
8 | will be changed, we can even get rid of the `conversion_buffer` in | ||
9 | `read_image_tga` altogether, and read the image data into the | ||
10 | `decompression_buffer` (if RLE'd) or the `tga->bitmap` (if uncompressed) | ||
11 | directly. | ||
12 | |||
13 | Upstream-Status: Backport | ||
14 | |||
15 | Signed-off-by: Catalin Enache <catalin.enache@windriver.com> | ||
16 | --- | ||
17 | src/gd_tga.c | 18 ++++++++++-------- | ||
18 | tests/tga/CMakeLists.txt | 1 + | ||
19 | tests/tga/Makemodule.am | 8 ++++++-- | ||
20 | tests/tga/tga_read.c | 40 ++++++++++++++++++++++++++++++++++++++++ | ||
21 | tests/tga/tga_read_rgb.png | Bin 0 -> 2349 bytes | ||
22 | tests/tga/tga_read_rgb.tga | Bin 0 -> 90444 bytes | ||
23 | tests/tga/tga_read_rgb_rle.tga | Bin 0 -> 9987 bytes | ||
24 | 7 files changed, 57 insertions(+), 10 deletions(-) | ||
25 | create mode 100644 tests/tga/tga_read.c | ||
26 | create mode 100644 tests/tga/tga_read_rgb.png | ||
27 | create mode 100644 tests/tga/tga_read_rgb.tga | ||
28 | create mode 100644 tests/tga/tga_read_rgb_rle.tga | ||
29 | |||
30 | diff --git a/src/gd_tga.c b/src/gd_tga.c | ||
31 | index ec6781f..8737b04 100644 | ||
32 | --- a/src/gd_tga.c | ||
33 | +++ b/src/gd_tga.c | ||
34 | @@ -207,12 +207,13 @@ int read_image_tga( gdIOCtx *ctx, oTga *tga ) | ||
35 | { | ||
36 | int pixel_block_size = (tga->bits / 8); | ||
37 | int image_block_size = (tga->width * tga->height) * pixel_block_size; | ||
38 | - uint8_t* decompression_buffer = NULL; | ||
39 | + int* decompression_buffer = NULL; | ||
40 | unsigned char* conversion_buffer = NULL; | ||
41 | int buffer_caret = 0; | ||
42 | int bitmap_caret = 0; | ||
43 | int i = 0; | ||
44 | int encoded_pixels; | ||
45 | + int rle_size; | ||
46 | |||
47 | if(overflow2(tga->width, tga->height)) { | ||
48 | return -1; | ||
49 | @@ -266,7 +267,7 @@ int read_image_tga( gdIOCtx *ctx, oTga *tga ) | ||
50 | /*! \brief Read in RLE compressed RGB TGA | ||
51 | * Chunk load the pixel data from an RLE compressed RGB type TGA. | ||
52 | */ | ||
53 | - decompression_buffer = (uint8_t*) gdMalloc(image_block_size * sizeof(uint8_t)); | ||
54 | + decompression_buffer = (int*) gdMalloc(image_block_size * sizeof(int)); | ||
55 | if (decompression_buffer == NULL) { | ||
56 | return -1; | ||
57 | } | ||
58 | @@ -277,7 +278,8 @@ int read_image_tga( gdIOCtx *ctx, oTga *tga ) | ||
59 | return -1; | ||
60 | } | ||
61 | |||
62 | - if (gdGetBuf(conversion_buffer, image_block_size, ctx) != image_block_size) { | ||
63 | + rle_size = gdGetBuf(conversion_buffer, image_block_size, ctx); | ||
64 | + if (rle_size <= 0) { | ||
65 | gdFree(conversion_buffer); | ||
66 | gdFree(decompression_buffer); | ||
67 | return -1; | ||
68 | @@ -285,7 +287,7 @@ int read_image_tga( gdIOCtx *ctx, oTga *tga ) | ||
69 | |||
70 | buffer_caret = 0; | ||
71 | |||
72 | - while( buffer_caret < image_block_size) { | ||
73 | + while( buffer_caret < rle_size) { | ||
74 | decompression_buffer[buffer_caret] = (int)conversion_buffer[buffer_caret]; | ||
75 | buffer_caret++; | ||
76 | } | ||
77 | @@ -298,14 +300,14 @@ int read_image_tga( gdIOCtx *ctx, oTga *tga ) | ||
78 | encoded_pixels = ( ( decompression_buffer[ buffer_caret ] & ~TGA_RLE_FLAG ) + 1 ); | ||
79 | buffer_caret++; | ||
80 | |||
81 | - if ((bitmap_caret + (encoded_pixels * pixel_block_size)) >= image_block_size) { | ||
82 | + if ((bitmap_caret + (encoded_pixels * pixel_block_size)) > image_block_size) { | ||
83 | gdFree( decompression_buffer ); | ||
84 | gdFree( conversion_buffer ); | ||
85 | return -1; | ||
86 | } | ||
87 | |||
88 | for (i = 0; i < encoded_pixels; i++) { | ||
89 | - memcpy(tga->bitmap + bitmap_caret, decompression_buffer + buffer_caret, pixel_block_size); | ||
90 | + memcpy(tga->bitmap + bitmap_caret, decompression_buffer + buffer_caret, pixel_block_size * sizeof(int)); | ||
91 | bitmap_caret += pixel_block_size; | ||
92 | } | ||
93 | buffer_caret += pixel_block_size; | ||
94 | @@ -314,13 +316,13 @@ int read_image_tga( gdIOCtx *ctx, oTga *tga ) | ||
95 | encoded_pixels = decompression_buffer[ buffer_caret ] + 1; | ||
96 | buffer_caret++; | ||
97 | |||
98 | - if ((bitmap_caret + (encoded_pixels * pixel_block_size)) >= image_block_size) { | ||
99 | + if ((bitmap_caret + (encoded_pixels * pixel_block_size)) > image_block_size) { | ||
100 | gdFree( decompression_buffer ); | ||
101 | gdFree( conversion_buffer ); | ||
102 | return -1; | ||
103 | } | ||
104 | |||
105 | - memcpy(tga->bitmap + bitmap_caret, decompression_buffer + buffer_caret, encoded_pixels * pixel_block_size); | ||
106 | + memcpy(tga->bitmap + bitmap_caret, decompression_buffer + buffer_caret, encoded_pixels * pixel_block_size * sizeof(int)); | ||
107 | bitmap_caret += (encoded_pixels * pixel_block_size); | ||
108 | buffer_caret += (encoded_pixels * pixel_block_size); | ||
109 | } | ||
110 | diff --git a/tests/tga/CMakeLists.txt b/tests/tga/CMakeLists.txt | ||
111 | index c3a589c..789fb14 100644 | ||
112 | --- a/tests/tga/CMakeLists.txt | ||
113 | +++ b/tests/tga/CMakeLists.txt | ||
114 | @@ -5,6 +5,7 @@ LIST(APPEND TESTS_FILES | ||
115 | bug00247a | ||
116 | bug00248 | ||
117 | bug00248a | ||
118 | + tga_read | ||
119 | ) | ||
120 | |||
121 | ADD_GD_TESTS() | ||
122 | diff --git a/tests/tga/Makemodule.am b/tests/tga/Makemodule.am | ||
123 | index dff828f..a1e6af6 100644 | ||
124 | --- a/tests/tga/Makemodule.am | ||
125 | +++ b/tests/tga/Makemodule.am | ||
126 | @@ -4,7 +4,8 @@ libgd_test_programs += \ | ||
127 | tga/bug00247a \ | ||
128 | tga/bug00248 \ | ||
129 | tga/bug00248a \ | ||
130 | - tga/tga_null | ||
131 | + tga/tga_null \ | ||
132 | + tga/tga_read | ||
133 | |||
134 | EXTRA_DIST += \ | ||
135 | tga/CMakeLists.txt \ | ||
136 | @@ -12,4 +13,7 @@ EXTRA_DIST += \ | ||
137 | tga/bug00247.tga \ | ||
138 | tga/bug00247a.tga \ | ||
139 | tga/bug00248.tga \ | ||
140 | - tga/bug00248a.tga | ||
141 | + tga/bug00248a.tga \ | ||
142 | + tga/tga_read_rgb.png \ | ||
143 | + tga/tga_read_rgb.tga \ | ||
144 | + tga/tga_read_rgb_rle.tga | ||
145 | diff --git a/tests/tga/tga_read.c b/tests/tga/tga_read.c | ||
146 | new file mode 100644 | ||
147 | index 0000000..310b72f | ||
148 | --- /dev/null | ||
149 | +++ b/tests/tga/tga_read.c | ||
150 | @@ -0,0 +1,40 @@ | ||
151 | +/** | ||
152 | + * Basic test case for reading TGA files. | ||
153 | + */ | ||
154 | + | ||
155 | + | ||
156 | +#include "gd.h" | ||
157 | +#include "gdtest.h" | ||
158 | + | ||
159 | + | ||
160 | +static void assert_equals(char *exp, char *orig); | ||
161 | + | ||
162 | + | ||
163 | +int main() | ||
164 | +{ | ||
165 | + assert_equals("tga_read_rgb.png", "tga_read_rgb.tga"); | ||
166 | + assert_equals("tga_read_rgb.png", "tga_read_rgb_rle.tga"); | ||
167 | + | ||
168 | + return gdNumFailures(); | ||
169 | +} | ||
170 | + | ||
171 | + | ||
172 | +static void assert_equals(char *exp, char *orig) | ||
173 | +{ | ||
174 | + gdImagePtr im; | ||
175 | + FILE *fp; | ||
176 | + char *filename; | ||
177 | + | ||
178 | + fp = gdTestFileOpen2("tga", orig); | ||
179 | + gdTestAssertMsg(fp != NULL, "can't open %s", orig); | ||
180 | + | ||
181 | + im = gdImageCreateFromTga(fp); | ||
182 | + gdTestAssertMsg(im != NULL, "can't read %s", orig); | ||
183 | + fclose(fp); | ||
184 | + | ||
185 | + filename = gdTestFilePath2("tga", exp); | ||
186 | + gdAssertImageEqualsToFile(filename, im); | ||
187 | + gdFree(filename); | ||
188 | + | ||
189 | + gdImageDestroy(im); | ||
190 | +} | ||
191 | diff --git a/tests/tga/tga_read_rgb.png b/tests/tga/tga_read_rgb.png | ||
192 | new file mode 100644 | ||
193 | index 0000000000000000000000000000000000000000..bc468e3d927eaeb77d2f5c3bc35b970457f60f18 | ||
194 | GIT binary patch | ||
195 | literal 2349 | ||
196 | zcmZ`*c{tSX7XOaO7-6K6b&RD_MnXy$nHe#bsVG~TvfZ*vO?Jle8%ar+AySDfStFGh | ||
197 | zG#*)pL0RUPJ(FedBaE?x-*o@D_deZwpZ7WMdCuo~-t)faoX_)~lW+lNCI*p(001C{ | ||
198 | zHOJWSbt_+Pfp_!w<m@>WzS`|-X@&uIeytaE1*v>QB*5J9HUNl9{Spw6`Sc(k6uyJC | ||
199 | zHWeNNLm|3~tCo{U002|57?VrEU+1$sy;a&|;-kbZl`6E_C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7JLB-70qVkSm$9Zt`mahHLT7O^JnNqAAJs0C^n+1uj_E-}S^?&_U=H?;D_ | ||
229 | z1U9UJAz|+7z|Yq(6${A~5fhc}hH5twnKukf#Dn_JnQ$J4-Z$d}*Trq>?aKr2p19c6 | ||
230 | zYJ}r+^s>6aD~mrp;oIUhlig4sM)Jg3=J{K;dp#BCzRu1sU3D1wJl{jA^Y#ShVT+|^ | ||
231 | zUyjiM&wD~v3zy}K!zWm%3cpu#(*)cmxw1+n+C7V|hcZ6h8CZLubXt&J)h$6yflV6> | ||
232 | zOVv_gDb*glO9FLL8x6bqM6(F#pGhGy+jjOyt9-daMWGrJKF{XvnT#^TeYaq2MG)qw | ||
233 | zJ=RV;Mwg*goOa?(wM=EH<#AS$egRj*wnm+Bu4Pb{$-O}GZSiuT1UdBDwv2Rz)b3+L | ||
234 | zRA=nkaWHB7I$T~B%;KynnS0b@3YpKqt$2;qzwLf>DZ4RFCQB!=QQ`Ft&y_PThuDsA | ||
235 | zckawmbFnA9Tl7+Ez%a)>>T+Nh@8UxzrZP`<pHEXVd#|2v=f_b#A@|oAzbk6Q_>|O) | ||
236 | zgw?Xli!)-)xrF2z=thH-TI;|>UVYK64@asT%484CF-pjk+~~wA+Z%fZYua+sDJ<Nf | ||
237 | zfO`bfl}ig_0&C7BCuBa)xZ?-mQO=bQ2N5;>Sw}~|(tM}hK+z>+^8QQhOsTxl+2AJ+ | ||
238 | zX8WjlS|;0WRv7s_Bk=@u$v3GL@qC?&jcNEv<o68kaz!pHOs@;#CSh|{!j&zrsfn8j | ||
239 | z6|o#^6C2NO9!G&u;Q0U5hkpCs|2Z3I$nNY~x}Tl<rOB|1KiB|RQyiuYbv@>9Cook& | ||
240 | |||
241 | literal 0 | ||
242 | HcmV?d00001 | ||
243 | |||
244 | diff --git a/tests/tga/tga_read_rgb.tga b/tests/tga/tga_read_rgb.tga | ||
245 | new file mode 100644 | ||
246 | index 0000000000000000000000000000000000000000..5f11f5a080f3424dff6ff368db6af140a5777e23 | ||
247 | GIT binary patch | ||
248 | literal 90444 | ||
249 | zcmeI4Kab?b5yc6Af(;c(13`fU*%&xb;tQC_*aPhI`Y#kR+DO4FyO7x>23DD|fPu*! | ||
250 | zc$3RVz$FeASlIpmlR7c>{0XS{cwI!Xhn!*0&G0z9w?L_y)m6=&?%yLhCt|YfC)vBd | ||
251 | z@3Mbp-(`!RR#lbBv<6~842S_SAO^&M7!U(uKn#chF(3xSfEW-1Vn7Ut0Wly3#DEwO | ||
252 | z17bi7hygJm2E>3E5CdYM&A?}$ex4m_TFdrYYCYz+9zh#Fz&|9|x2zKn^W#B#+TPQk | ||
253 | zkGJqug1wSH+UqE;=D8ly$2|8{dOgm*N*~8rNAWn%b(B8lxv$dearRaEIL<nX$9b-! | ||
254 | z^fAwUm0pjtuhPeH)=@mpa~-9RdG4$9dYpZgK8~}F;&GnqD1FRxU!~XM?5p%~oOKkB | ||
255 | z^IXTEkMH5{66|-Z6BF}fVs88T*I)i3JJhoOSJ|O9w{_I#nWx?l)duSh)duUtlh$At | ||
256 | z17Cjm-|T(t=^t5ksQGyXeY}RR66}rB$6N4TCD<$JL)!2RcC~{xmhcaW#u{p)fITEy | ||
257 | zttmer=|ik~9;VU``gjIkB^qnU`Ab-pXwrv%OZ+UJZKV%gx2JNgp5i>D59woyTux<9 | ||
258 | z(uedh6&9yB59vetm?D=`nUnM(eN2VLDb7RskUpl!<y7V*eMlcuVR4G{kUpf3DRMcL | ||
259 | zIY}SV$5dFH;yfm%k4wB~a-Co=-1}Dr-lw`wu&?y~m97o@G#T{q3H)`Uv4-!7EMeD) | ||
260 | zw)K9=Z~mTThuUAV|7C~TzV%W6$E~45nY6k?xn!MZFO2s+{6m8MjdfuTKfpgE*thW< | ||
261 | z{Cw2@xOHLsAGrJk{yNcELpGPN>qM)WwmHy;dAx?N66{Tw1IK#{s}k%La$6ep^HE#+ | ||
262 | za9lo1VAA+y4Y_=oz@+gjedzt&v$!^qahUWWUeAKpvG42Bhn^$GX6~HMCw)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E5CdXB42S_SAO^&M7!U(uKn#chF(3xSfEW-1 | ||
306 | pVn7Ut0Wly3rpJK2`Txh?|LN;LKmWt?-@f?SH@|xR>#u*F{Rp+*(8>S+ | ||
307 | |||
308 | literal 0 | ||
309 | HcmV?d00001 | ||
310 | |||
311 | diff --git a/tests/tga/tga_read_rgb_rle.tga b/tests/tga/tga_read_rgb_rle.tga | ||
312 | new file mode 100644 | ||
313 | index 0000000000000000000000000000000000000000..ce845ad0c3da65205af25854d64568b1cf0921e3 | ||
314 | GIT binary patch | ||
315 | literal 9987 | ||
316 | zcmeI2J!~9R5Xbk<L5NgWrh*l6K@rf2A`LFK334O|$EPT_a+TuJx!kjzIGiJ2I<P>x | ||
317 | ziiRRbk%9(oq!dtCIspYA&6UugGcC>X|IOQdZ+$+;#>5ek&eFVnJ3DVa{%>aX?a5Je | ||
318 | zF>-%5qwk}eQT$4wzvw%Lr!o5$L%T1%_;U0&GrMhYD|*=1u+QBMI7bBz5GWAXUI?5o | ||
319 | z4)=h152)YuP~W$``}B?1quuDQ!tKvI-d*GdmoNVj?N0AU(FV5-mWdwpH55x49>GD6 | ||
320 | z=%BBmXlU4mV>@qJ8fX!<cQoubnZc3TbVtK}?@1Y0!9an5mD0dE28xA&sM>=CL?@={ | ||
321 | z0-|RLqE&j)8olUxtrw;AqBVNamHEBs60Ks5R&l9p6>VC@T4)u!Z+{g<yLY2MYn^Q1 | ||
322 | zd9ELFE4tU$u)n0?3plJ1J?v}PZ)msyr`8V<5?$KSu-0S-M?&o#4QoBb4;grXfdT`M | ||
323 | zN=c*-Fi>D%n-xb5tYDzPz)HDn9RtO}K-2&bfLTDa$ReF=%5-@43+;@(Xqh_Lqg5;e | ||
324 | zg}THltzs{<ie37oodrXq8PIa=9O>E>BBIs4hP5RP*Wqxy6Qz9`Y(v8pI6+HwtX$ra | ||
325 | zy1k}`<+7Ep?x=h3^=RRT3_QR<fq_Rg0|yu=Ft9z}zzPNm46Kv})-g~l4EUq{0-{A0 | ||
326 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meta-oe/recipes-support/gd/gd_2.2.3.bb b/meta-oe/recipes-support/gd/gd_2.2.4.bb index 562170694..4932bb7b6 100644 --- a/meta-oe/recipes-support/gd/gd_2.2.3.bb +++ b/meta-oe/recipes-support/gd/gd_2.2.4.bb | |||
@@ -9,20 +9,14 @@ HOMEPAGE = "http://libgd.bitbucket.org/" | |||
9 | 9 | ||
10 | SECTION = "libs" | 10 | SECTION = "libs" |
11 | LICENSE = "GD" | 11 | LICENSE = "GD" |
12 | LIC_FILES_CHKSUM = "file://COPYING;md5=c97638cafd3581eb87abd37332137669" | 12 | LIC_FILES_CHKSUM = "file://COPYING;md5=07384b3aa2e0d39afca0d6c40286f545" |
13 | |||
13 | DEPENDS = "freetype libpng jpeg zlib tiff" | 14 | DEPENDS = "freetype libpng jpeg zlib tiff" |
14 | 15 | ||
15 | SRC_URI = "git://github.com/libgd/libgd.git;branch=GD-2.2 \ | 16 | SRC_URI = "git://github.com/libgd/libgd.git;branch=GD-2.2 \ |
16 | file://fix-gcc-unused-functions.patch \ | 17 | " |
17 | file://CVE-2016-10166.patch \ | ||
18 | file://CVE-2016-10167.patch \ | ||
19 | file://CVE-2016-10168.patch \ | ||
20 | file://.gitignore-the-new-test-case.patch \ | ||
21 | file://Fix-290-TGA-RLE-decoding-is-broken.patch;apply=no \ | ||
22 | file://CVE-2016-6906-1.patch;apply=no \ | ||
23 | file://CVE-2016-6906-2.patch;apply=no" | ||
24 | 18 | ||
25 | SRCREV = "46ceef5970bf3a847ff61d1bdde7501d66c11d0c" | 19 | SRCREV = "de09874b15a4c88772db35ced842330f5de23e76" |
26 | 20 | ||
27 | S = "${WORKDIR}/git" | 21 | S = "${WORKDIR}/git" |
28 | 22 | ||
@@ -39,19 +33,6 @@ EXTRA_OECONF += " --disable-rpath \ | |||
39 | 33 | ||
40 | EXTRA_OEMAKE = 'LDFLAGS="${LDFLAGS}"' | 34 | EXTRA_OEMAKE = 'LDFLAGS="${LDFLAGS}"' |
41 | 35 | ||
42 | do_git_apply () { | ||
43 | cd ${S} | ||
44 | if [ ! -f tests/tga/tga_read_rgb.png ]; then | ||
45 | git apply ${S}/../Fix-290-TGA-RLE-decoding-is-broken.patch | ||
46 | git apply ${S}/../CVE-2016-6906-1.patch | ||
47 | git apply ${S}/../CVE-2016-6906-2.patch | ||
48 | fi | ||
49 | } | ||
50 | |||
51 | do_patch_append() { | ||
52 | bb.build.exec_func('do_git_apply', d) | ||
53 | } | ||
54 | |||
55 | do_install_append() { | 36 | do_install_append() { |
56 | # cleanup buildpaths from gdlib.pc | 37 | # cleanup buildpaths from gdlib.pc |
57 | sed -i -e 's#${STAGING_DIR_HOST}##g' ${D}${libdir}/pkgconfig/gdlib.pc | 38 | sed -i -e 's#${STAGING_DIR_HOST}##g' ${D}${libdir}/pkgconfig/gdlib.pc |