diff options
| author | Vijay Anusuri <vanusuri@mvista.com> | 2026-03-11 12:05:13 +0530 |
|---|---|---|
| committer | Paul Barker <paul@pbarker.dev> | 2026-03-25 17:34:13 +0000 |
| commit | 49bfa3f8e0d12fde399b45b1690c89c9a0489224 (patch) | |
| tree | b5794c76dc0347c2d8686af7df8d9e66d7e323c3 | |
| parent | 195c9264bb066d3d5f343789f357b20ee5fed1b5 (diff) | |
| download | poky-49bfa3f8e0d12fde399b45b1690c89c9a0489224.tar.gz | |
python3-pip: Fix CVE-2026-1703
Pick patch according to [1]
[1] https://security-tracker.debian.org/tracker/CVE-2026-1703
[2] https://nvd.nist.gov/vuln/detail/CVE-2026-1703
[3] https://github.com/pypa/pip/pull/13777
(From OE-Core rev: 29c72a4729a42f75af47b6a7e04c9d52155e3c1f)
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Paul Barker <paul@pbarker.dev>
| -rw-r--r-- | meta/recipes-devtools/python/python3-pip/CVE-2026-1703.patch | 37 | ||||
| -rw-r--r-- | meta/recipes-devtools/python/python3-pip_24.0.bb | 4 |
2 files changed, 40 insertions, 1 deletions
diff --git a/meta/recipes-devtools/python/python3-pip/CVE-2026-1703.patch b/meta/recipes-devtools/python/python3-pip/CVE-2026-1703.patch new file mode 100644 index 0000000000..1470b7c541 --- /dev/null +++ b/meta/recipes-devtools/python/python3-pip/CVE-2026-1703.patch | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | From 4c651b70d60ed91b13663bcda9b3ed41748d0124 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Seth Michael Larson <seth@python.org> | ||
| 3 | Date: Fri, 30 Jan 2026 09:49:11 -0600 | ||
| 4 | Subject: [PATCH] Use os.path.commonpath() instead of commonprefix() | ||
| 5 | |||
| 6 | Upstream-Status: Backport [https://github.com/pypa/pip/commit/4c651b70d60ed91b13663bcda9b3ed41748d0124] | ||
| 7 | CVE: CVE-2026-1703 | ||
| 8 | Signed-off-by: Vijay Anusuri <vanusuri@mvista.com> | ||
| 9 | --- | ||
| 10 | news/+1ee322a1.bugfix.rst | 1 + | ||
| 11 | src/pip/_internal/utils/unpacking.py | 2 +- | ||
| 12 | 2 files changed, 2 insertions(+), 1 deletion(-) | ||
| 13 | create mode 100644 news/+1ee322a1.bugfix.rst | ||
| 14 | |||
| 15 | diff --git a/news/+1ee322a1.bugfix.rst b/news/+1ee322a1.bugfix.rst | ||
| 16 | new file mode 100644 | ||
| 17 | index 0000000..edb1b32 | ||
| 18 | --- /dev/null | ||
| 19 | +++ b/news/+1ee322a1.bugfix.rst | ||
| 20 | @@ -0,0 +1 @@ | ||
| 21 | +Use a path-segment prefix comparison, not char-by-char. | ||
| 22 | diff --git a/src/pip/_internal/utils/unpacking.py b/src/pip/_internal/utils/unpacking.py | ||
| 23 | index 78b5c13..0b26525 100644 | ||
| 24 | --- a/src/pip/_internal/utils/unpacking.py | ||
| 25 | +++ b/src/pip/_internal/utils/unpacking.py | ||
| 26 | @@ -81,7 +81,7 @@ def is_within_directory(directory: str, target: str) -> bool: | ||
| 27 | abs_directory = os.path.abspath(directory) | ||
| 28 | abs_target = os.path.abspath(target) | ||
| 29 | |||
| 30 | - prefix = os.path.commonprefix([abs_directory, abs_target]) | ||
| 31 | + prefix = os.path.commonpath([abs_directory, abs_target]) | ||
| 32 | return prefix == abs_directory | ||
| 33 | |||
| 34 | |||
| 35 | -- | ||
| 36 | 2.43.0 | ||
| 37 | |||
diff --git a/meta/recipes-devtools/python/python3-pip_24.0.bb b/meta/recipes-devtools/python/python3-pip_24.0.bb index be4a29500a..12a5e1cc3c 100644 --- a/meta/recipes-devtools/python/python3-pip_24.0.bb +++ b/meta/recipes-devtools/python/python3-pip_24.0.bb | |||
| @@ -31,7 +31,9 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=63ec52baf95163b597008bb46db68030 \ | |||
| 31 | 31 | ||
| 32 | inherit pypi python_setuptools_build_meta | 32 | inherit pypi python_setuptools_build_meta |
| 33 | 33 | ||
| 34 | SRC_URI += "file://no_shebang_mangling.patch" | 34 | SRC_URI += "file://no_shebang_mangling.patch \ |
| 35 | file://CVE-2026-1703.patch \ | ||
| 36 | " | ||
| 35 | 37 | ||
| 36 | SRC_URI[sha256sum] = "ea9bd1a847e8c5774a5777bb398c19e80bcd4e2aa16a4b301b718fe6f593aba2" | 38 | SRC_URI[sha256sum] = "ea9bd1a847e8c5774a5777bb398c19e80bcd4e2aa16a4b301b718fe6f593aba2" |
| 37 | 39 | ||
