diff options
author | Lee Chee Yang <chee.yang.lee@intel.com> | 2023-11-22 16:55:45 +0800 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2023-12-01 04:14:18 -1000 |
commit | d3f1ae99a7e3f758421f5e761910f9281a3fec8e (patch) | |
tree | e2c82e478e6f8fa36b359f69721d43773b38f4fc /meta/recipes-devtools/python | |
parent | d843ae7d5da0617079cb5ef0bd5a6b51518b02d6 (diff) | |
download | poky-d3f1ae99a7e3f758421f5e761910f9281a3fec8e.tar.gz |
python3-setuptools: fix CVE-2022-40897
import patch from ubuntu setuptools_45.2.0-1ubuntu0.1 .
(From OE-Core rev: a939696d7c70c42e404ec30a9d75e5ea4f742c78)
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/recipes-devtools/python')
-rw-r--r-- | meta/recipes-devtools/python/python-setuptools.inc | 2 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python3-setuptools/CVE-2022-40897.patch | 29 |
2 files changed, 31 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python-setuptools.inc b/meta/recipes-devtools/python/python-setuptools.inc index 29be852f66..5faf62bc3a 100644 --- a/meta/recipes-devtools/python/python-setuptools.inc +++ b/meta/recipes-devtools/python/python-setuptools.inc | |||
@@ -8,6 +8,8 @@ PYPI_PACKAGE_EXT = "zip" | |||
8 | 8 | ||
9 | inherit pypi | 9 | inherit pypi |
10 | 10 | ||
11 | SRC_URI += " file://CVE-2022-40897.patch " | ||
12 | |||
11 | SRC_URI_append_class-native = " file://0001-conditionally-do-not-fetch-code-by-easy_install.patch" | 13 | SRC_URI_append_class-native = " file://0001-conditionally-do-not-fetch-code-by-easy_install.patch" |
12 | 14 | ||
13 | SRC_URI[md5sum] = "0c956eea142af9c2b02d72e3c042af30" | 15 | SRC_URI[md5sum] = "0c956eea142af9c2b02d72e3c042af30" |
diff --git a/meta/recipes-devtools/python/python3-setuptools/CVE-2022-40897.patch b/meta/recipes-devtools/python/python3-setuptools/CVE-2022-40897.patch new file mode 100644 index 0000000000..9150cea07e --- /dev/null +++ b/meta/recipes-devtools/python/python3-setuptools/CVE-2022-40897.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From 43a9c9bfa6aa626ec2a22540bea28d2ca77964be Mon Sep 17 00:00:00 2001 | ||
2 | From: "Jason R. Coombs" <jaraco@jaraco.com> | ||
3 | Date: Fri, 4 Nov 2022 13:47:53 -0400 | ||
4 | Subject: [PATCH] Limit the amount of whitespace to search/backtrack. Fixes | ||
5 | #3659. | ||
6 | |||
7 | CVE: CVE-2022-40897 | ||
8 | Upstream-Status: Backport [ | ||
9 | Upstream : https://github.com/pypa/setuptools/commit/43a9c9bfa6aa626ec2a22540bea28d2ca77964be | ||
10 | Import from Ubuntu: http://archive.ubuntu.com/ubuntu/pool/main/s/setuptools/setuptools_45.2.0-1ubuntu0.1.debian.tar.xz | ||
11 | ] | ||
12 | Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> | ||
13 | |||
14 | --- | ||
15 | setuptools/package_index.py | 2 +- | ||
16 | setuptools/tests/test_packageindex.py | 1 - | ||
17 | 2 files changed, 1 insertion(+), 2 deletions(-) | ||
18 | |||
19 | --- setuptools-45.2.0.orig/setuptools/package_index.py | ||
20 | +++ setuptools-45.2.0/setuptools/package_index.py | ||
21 | @@ -215,7 +215,7 @@ def unique_values(func): | ||
22 | return wrapper | ||
23 | |||
24 | |||
25 | -REL = re.compile(r"""<([^>]*\srel\s*=\s*['"]?([^'">]+)[^>]*)>""", re.I) | ||
26 | +REL = re.compile(r"""<([^>]*\srel\s{0,10}=\s{0,10}['"]?([^'" >]+)[^>]*)>""", re.I) | ||
27 | # this line is here to fix emacs' cruddy broken syntax highlighting | ||
28 | |||
29 | |||