diff options
Diffstat (limited to 'meta-oe')
| -rw-r--r-- | meta-oe/recipes-devtools/giflib/files/CVE-2022-28506.patch | 40 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/giflib/files/add_suffix_to_convert_binary_used_in_Makefile.patch | 42 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/giflib/giflib_5.2.2.bb (renamed from meta-oe/recipes-devtools/giflib/giflib_5.2.1.bb) | 7 |
3 files changed, 46 insertions, 43 deletions
diff --git a/meta-oe/recipes-devtools/giflib/files/CVE-2022-28506.patch b/meta-oe/recipes-devtools/giflib/files/CVE-2022-28506.patch deleted file mode 100644 index 221e10811a..0000000000 --- a/meta-oe/recipes-devtools/giflib/files/CVE-2022-28506.patch +++ /dev/null | |||
| @@ -1,40 +0,0 @@ | |||
| 1 | From 368f28c0034ecfb6dd4b3412af4cc589a56e0611 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Matej Muzila <mmuzila@redhat.com> | ||
| 3 | Date: Mon, 30 May 2022 09:04:27 +0200 | ||
| 4 | Subject: [PATCH] Fix heap-buffer overflow (CVE-2022-28506) | ||
| 5 | |||
| 6 | There is a heap buffer overflow in DumpScreen2RGB() in gif2rgb.c. This | ||
| 7 | occurs when a crafted gif file, where size of color table is < 256 but | ||
| 8 | image data contains pixels with color code highier than size of color | ||
| 9 | table. This causes oferflow of ColorMap->Colors array. | ||
| 10 | |||
| 11 | Fix the issue by checking if value of each pixel is within bounds of | ||
| 12 | given color table. If the value is out of color table, print error | ||
| 13 | message and exit. | ||
| 14 | |||
| 15 | Fixes: #159 | ||
| 16 | |||
| 17 | Upstream-Status: Backport [https://sourceforge.net/p/giflib/code/ci/5b74cdd9c1285514eaa4675347ba3eea81d32c65/] | ||
| 18 | Signed-off-by: nikhil r <nikhil.r@kpit.com> | ||
| 19 | --- | ||
| 20 | gif2rgb.c | 5 +++++ | ||
| 21 | 1 file changed, 5 insertions(+) | ||
| 22 | |||
| 23 | diff --git a/gif2rgb.c b/gif2rgb.c | ||
| 24 | index 8d7c0ff..d9a469f 100644 | ||
| 25 | --- a/gif2rgb.c | ||
| 26 | +++ b/gif2rgb.c | ||
| 27 | @@ -294,6 +294,11 @@ static void DumpScreen2RGB(char *FileName, int OneFileFlag, | ||
| 28 | GifRow = ScreenBuffer[i]; | ||
| 29 | GifQprintf("\b\b\b\b%-4d", ScreenHeight - i); | ||
| 30 | for (j = 0, BufferP = Buffer; j < ScreenWidth; j++) { | ||
| 31 | + /* Check if color is within color palete */ | ||
| 32 | + if (GifRow[j] >= ColorMap->ColorCount) | ||
| 33 | + { | ||
| 34 | + GIF_EXIT(GifErrorString(D_GIF_ERR_IMAGE_DEFECT)); | ||
| 35 | + } | ||
| 36 | ColorMapEntry = &ColorMap->Colors[GifRow[j]]; | ||
| 37 | *BufferP++ = ColorMapEntry->Red; | ||
| 38 | *BufferP++ = ColorMapEntry->Green; | ||
| 39 | -- | ||
| 40 | 2.25.1 | ||
diff --git a/meta-oe/recipes-devtools/giflib/files/add_suffix_to_convert_binary_used_in_Makefile.patch b/meta-oe/recipes-devtools/giflib/files/add_suffix_to_convert_binary_used_in_Makefile.patch new file mode 100644 index 0000000000..a01b28ac6d --- /dev/null +++ b/meta-oe/recipes-devtools/giflib/files/add_suffix_to_convert_binary_used_in_Makefile.patch | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | Subject: Modify binary name "convert" to "convert.im7" | ||
| 2 | |||
| 3 | The change is needed to resolve the below compilation error | ||
| 4 | after giflib version upgrade. Log data follows: | ||
| 5 | | DEBUG: Executing shell function do_compile | ||
| 6 | | NOTE: make -j 8 | ||
| 7 | | make -C doc | ||
| 8 | | make[1]: Entering directory '../giflib/5.2.2/giflib-5.2.2/doc' | ||
| 9 | | convert ../pic/gifgrid.gif -resize 50x50 giflib-logo.gif | ||
| 10 | | make[1]: convert: No such file or directory | ||
| 11 | | make[1]: *** [Makefile:46: giflib-logo.gif] Error 127 | ||
| 12 | | make[1]: Leaving directory '../giflib/5.2.2/giflib-5.2.2/doc' | ||
| 13 | | make: *** [Makefile:93: all] Error 2 | ||
| 14 | | ERROR: oe_runmake failed | ||
| 15 | |||
| 16 | Added dependency on ImageMagick which includes "convert" utility, | ||
| 17 | to ensure availability of required tool during compilation process. | ||
| 18 | |||
| 19 | This patch updates the binary name used in Makefile from | ||
| 20 | "convert" to "convert.im7" for resizing the logo image used in HTML | ||
| 21 | documentation as Imagemagick installs binary in this format. | ||
| 22 | |||
| 23 | Below commits justify the cause of adding the suffix to binaries | ||
| 24 | provided by ImageMagic package: | ||
| 25 | https://git.openembedded.org/meta-openembedded/commit/meta-oe/recipes-support/imagemagick?id=dcbb49f707e7ad9bf755dd3275ffc442154b8144 | ||
| 26 | https://git.openembedded.org/meta-openembedded/commit/meta-oe/recipes-support/imagemagick?id=6e0c24e9b3f9d430dec57f61f8c12c74bca5375d | ||
| 27 | |||
| 28 | Signed-off-by: Bhabu Bindu <bhabubindu@kpit.com> | ||
| 29 | Upstream-Status: Inappropriate [OE specific] | ||
| 30 | |||
| 31 | =================================================================== | ||
| 32 | --- a/doc/Makefile | ||
| 33 | +++ b/doc/Makefile | ||
| 34 | @@ -43,7 +43,7 @@ | ||
| 35 | |||
| 36 | # Logo image file for HTML docs | ||
| 37 | giflib-logo.gif: ../pic/gifgrid.gif | ||
| 38 | - convert $^ -resize 50x50 $@ | ||
| 39 | + convert.im7 $^ -resize 50x50 $@ | ||
| 40 | |||
| 41 | # Philosophical choice: the website gets the internal manual pages | ||
| 42 | allhtml: $(XMLALL:.xml=.html) giflib-logo.gif | ||
diff --git a/meta-oe/recipes-devtools/giflib/giflib_5.2.1.bb b/meta-oe/recipes-devtools/giflib/giflib_5.2.2.bb index 011ca1ffb7..7d8a175fe3 100644 --- a/meta-oe/recipes-devtools/giflib/giflib_5.2.1.bb +++ b/meta-oe/recipes-devtools/giflib/giflib_5.2.2.bb | |||
| @@ -5,12 +5,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=ae11c61b04b2917be39b11f78d71519a" | |||
| 5 | 5 | ||
| 6 | CVE_PRODUCT = "giflib_project:giflib" | 6 | CVE_PRODUCT = "giflib_project:giflib" |
| 7 | 7 | ||
| 8 | DEPENDS = "xmlto-native" | 8 | DEPENDS = "xmlto-native imagemagick-native" |
| 9 | 9 | ||
| 10 | SRC_URI = "${SOURCEFORGE_MIRROR}/giflib/${BP}.tar.gz \ | 10 | SRC_URI = "${SOURCEFORGE_MIRROR}/giflib/${BP}.tar.gz \ |
| 11 | file://CVE-2022-28506.patch" | 11 | file://add_suffix_to_convert_binary_used_in_Makefile.patch" |
| 12 | |||
| 13 | SRC_URI[sha256sum] = "be7ffbd057cadebe2aa144542fd90c6838c6a083b5e8a9048b8ee3b66b29d5fb" | ||
| 12 | 14 | ||
| 13 | SRC_URI[sha256sum] = "31da5562f44c5f15d63340a09a4fd62b48c45620cd302f77a6d9acf0077879bd" | ||
| 14 | 15 | ||
| 15 | do_install() { | 16 | do_install() { |
| 16 | # using autotools's default will end up in /usr/local | 17 | # using autotools's default will end up in /usr/local |
