diff options
author | Shubham Kulkarni <skulkarni@mvista.com> | 2023-02-03 16:42:09 +0530 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2023-02-22 11:24:23 -0500 |
commit | eadcdb97d43d083b8b614e203c19bda5469678c8 (patch) | |
tree | 0d1ebfb63b1dd64867240fb4c06a325dcb610951 | |
parent | 1172ebfa20a1353b33ad954eee8aff9c03ee35a8 (diff) | |
download | meta-openembedded-eadcdb97d43d083b8b614e203c19bda5469678c8.tar.gz |
python3-pillow: Security fix for CVE-2022-45198
Fix for CVE-2022-45198: Improper Handling of Highly Compressed GIF Data
Backport from https://github.com/python-pillow/Pillow/commit/884437f8a2b953a0abd2a3b130a87fcfb438092e
Signed-off-by: Shubham Kulkarni <skulkarni@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r-- | meta-python/recipes-devtools/python/python3-pillow/0001-CVE-2022-45198.patch | 26 | ||||
-rw-r--r-- | meta-python/recipes-devtools/python/python3-pillow_6.2.1.bb | 1 |
2 files changed, 27 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-pillow/0001-CVE-2022-45198.patch b/meta-python/recipes-devtools/python/python3-pillow/0001-CVE-2022-45198.patch new file mode 100644 index 0000000000..0f0cfa7804 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-pillow/0001-CVE-2022-45198.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | From 7df88fc2319852ace202a650703d631200080e3b Mon Sep 17 00:00:00 2001 | ||
2 | From: Andrew Murray <radarhere@users.noreply.github.com> | ||
3 | Date: Thu, 30 Jun 2022 12:47:35 +1000 | ||
4 | Subject: [PATCH] Added GIF decompression bomb check | ||
5 | |||
6 | Upstream-Status: Backport [https://github.com/python-pillow/Pillow/commit/884437f8a2b953a0abd2a3b130a87fcfb438092e] | ||
7 | CVE: CVE-2022-45198 | ||
8 | Signed-off-by: Shubham Kulkarni <skulkarni@mvista.com> | ||
9 | --- | ||
10 | src/PIL/GifImagePlugin.py | 1 + | ||
11 | 1 file changed, 1 insertion(+) | ||
12 | |||
13 | diff --git a/src/PIL/GifImagePlugin.py b/src/PIL/GifImagePlugin.py | ||
14 | index 9d8e96f..c477fdd 100644 | ||
15 | --- a/src/PIL/GifImagePlugin.py | ||
16 | +++ b/src/PIL/GifImagePlugin.py | ||
17 | @@ -238,6 +238,7 @@ class GifImageFile(ImageFile.ImageFile): | ||
18 | x1, y1 = x0 + i16(s[4:]), y0 + i16(s[6:]) | ||
19 | if x1 > self.size[0] or y1 > self.size[1]: | ||
20 | self._size = max(x1, self.size[0]), max(y1, self.size[1]) | ||
21 | + Image._decompression_bomb_check(self._size) | ||
22 | self.dispose_extent = x0, y0, x1, y1 | ||
23 | flags = i8(s[8]) | ||
24 | |||
25 | -- | ||
26 | 2.7.4 | ||
diff --git a/meta-python/recipes-devtools/python/python3-pillow_6.2.1.bb b/meta-python/recipes-devtools/python/python3-pillow_6.2.1.bb index 80b7e941ae..35330cac6d 100644 --- a/meta-python/recipes-devtools/python/python3-pillow_6.2.1.bb +++ b/meta-python/recipes-devtools/python/python3-pillow_6.2.1.bb | |||
@@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=55c0f320370091249c1755c0d2b48e89" | |||
8 | SRC_URI = "git://github.com/python-pillow/Pillow.git;branch=6.2.x;protocol=https \ | 8 | SRC_URI = "git://github.com/python-pillow/Pillow.git;branch=6.2.x;protocol=https \ |
9 | file://0001-support-cross-compiling.patch \ | 9 | file://0001-support-cross-compiling.patch \ |
10 | file://0001-explicitly-set-compile-options.patch \ | 10 | file://0001-explicitly-set-compile-options.patch \ |
11 | file://0001-CVE-2022-45198.patch \ | ||
11 | " | 12 | " |
12 | SRCREV ?= "6e0f07bbe38def22d36ee176b2efd9ea74b453a6" | 13 | SRCREV ?= "6e0f07bbe38def22d36ee176b2efd9ea74b453a6" |
13 | 14 | ||