diff options
| author | Gyorgy Sarvari <skandigraun@gmail.com> | 2026-02-05 07:59:51 +0100 |
|---|---|---|
| committer | Anuj Mittal <anuj.mittal@oss.qualcomm.com> | 2026-02-19 08:20:26 +0530 |
| commit | 87ce1e904bdce19592815a73ba5c4cbe87316c6f (patch) | |
| tree | 83b7c2b2eb2eefb47d7eca09acee263ef514e4bb /meta-python/recipes-devtools/python | |
| parent | ea9fb97f53ae61851c26316275ad89a101d20a93 (diff) | |
| download | meta-openembedded-87ce1e904bdce19592815a73ba5c4cbe87316c6f.tar.gz | |
python3-virtualenv: patch CVE-2026-22702
Details: https://nvd.nist.gov/vuln/detail/CVE-2026-22702
Backport the patch that is referenced by the NVD advisory.
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Anuj Mittal <anuj.mittal@oss.qualcomm.com>
Diffstat (limited to 'meta-python/recipes-devtools/python')
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-virtualenv/CVE-2026-22702.patch | 60 | ||||
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-virtualenv_20.35.4.bb | 1 |
2 files changed, 61 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-virtualenv/CVE-2026-22702.patch b/meta-python/recipes-devtools/python/python3-virtualenv/CVE-2026-22702.patch new file mode 100644 index 0000000000..a0b6d80a42 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-virtualenv/CVE-2026-22702.patch | |||
| @@ -0,0 +1,60 @@ | |||
| 1 | From 2e9f44a74a8adbaf641475c58f1cfa1bb7ab15e1 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Bern=C3=A1t=20G=C3=A1bor?= <gaborjbernat@gmail.com> | ||
| 3 | Date: Fri, 9 Jan 2026 10:19:39 -0800 | ||
| 4 | Subject: [PATCH] Merge pull request #3013 from gaborbernat/fix-sec | ||
| 5 | |||
| 6 | CVE: CVE-2026-22702 | ||
| 7 | Upstream-Status: Backport [https://github.com/pypa/virtualenv/commit/dec4cec5d16edaf83a00a658f32d1e032661cebc] | ||
| 8 | Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> | ||
| 9 | --- | ||
| 10 | src/virtualenv/app_data/__init__.py | 11 +++++------ | ||
| 11 | src/virtualenv/util/lock.py | 7 +++---- | ||
| 12 | 2 files changed, 8 insertions(+), 10 deletions(-) | ||
| 13 | |||
| 14 | diff --git a/src/virtualenv/app_data/__init__.py b/src/virtualenv/app_data/__init__.py | ||
| 15 | index d7f1480..7a9d38e 100644 | ||
| 16 | --- a/src/virtualenv/app_data/__init__.py | ||
| 17 | +++ b/src/virtualenv/app_data/__init__.py | ||
| 18 | @@ -36,12 +36,11 @@ def make_app_data(folder, **kwargs): | ||
| 19 | if is_read_only: | ||
| 20 | return ReadOnlyAppData(folder) | ||
| 21 | |||
| 22 | - if not os.path.isdir(folder): | ||
| 23 | - try: | ||
| 24 | - os.makedirs(folder) | ||
| 25 | - LOGGER.debug("created app data folder %s", folder) | ||
| 26 | - except OSError as exception: | ||
| 27 | - LOGGER.info("could not create app data folder %s due to %r", folder, exception) | ||
| 28 | + try: | ||
| 29 | + os.makedirs(folder, exist_ok=True) | ||
| 30 | + LOGGER.debug("created app data folder %s", folder) | ||
| 31 | + except OSError as exception: | ||
| 32 | + LOGGER.info("could not create app data folder %s due to %r", folder, exception) | ||
| 33 | |||
| 34 | if os.access(folder, os.W_OK): | ||
| 35 | return AppDataDiskFolder(folder) | ||
| 36 | diff --git a/src/virtualenv/util/lock.py b/src/virtualenv/util/lock.py | ||
| 37 | index b250e03..82c8eed 100644 | ||
| 38 | --- a/src/virtualenv/util/lock.py | ||
| 39 | +++ b/src/virtualenv/util/lock.py | ||
| 40 | @@ -17,9 +17,8 @@ LOGGER = logging.getLogger(__name__) | ||
| 41 | class _CountedFileLock(FileLock): | ||
| 42 | def __init__(self, lock_file) -> None: | ||
| 43 | parent = os.path.dirname(lock_file) | ||
| 44 | - if not os.path.isdir(parent): | ||
| 45 | - with suppress(OSError): | ||
| 46 | - os.makedirs(parent) | ||
| 47 | + with suppress(OSError): | ||
| 48 | + os.makedirs(parent, exist_ok=True) | ||
| 49 | |||
| 50 | super().__init__(lock_file) | ||
| 51 | self.count = 0 | ||
| 52 | @@ -117,7 +116,7 @@ class ReentrantFileLock(PathLockBase): | ||
| 53 | # a lock, but that lock might then become expensive, and it's not clear where that lock should live. | ||
| 54 | # Instead here we just ignore if we fail to create the directory. | ||
| 55 | with suppress(OSError): | ||
| 56 | - os.makedirs(str(self.path)) | ||
| 57 | + os.makedirs(str(self.path), exist_ok=True) | ||
| 58 | |||
| 59 | try: | ||
| 60 | lock.acquire(0.0001) | ||
diff --git a/meta-python/recipes-devtools/python/python3-virtualenv_20.35.4.bb b/meta-python/recipes-devtools/python/python3-virtualenv_20.35.4.bb index 28444f12c4..e40aa98863 100644 --- a/meta-python/recipes-devtools/python/python3-virtualenv_20.35.4.bb +++ b/meta-python/recipes-devtools/python/python3-virtualenv_20.35.4.bb | |||
| @@ -6,6 +6,7 @@ HOMEPAGE = "https://github.com/pypa/virtualenv" | |||
| 6 | LICENSE = "MIT" | 6 | LICENSE = "MIT" |
| 7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=0ce089158cf60a8ab6abb452b6405538" | 7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=0ce089158cf60a8ab6abb452b6405538" |
| 8 | 8 | ||
| 9 | SRC_URI += "file://CVE-2026-22702.patch" | ||
| 9 | SRC_URI[sha256sum] = "643d3914d73d3eeb0c552cbb12d7e82adf0e504dbf86a3182f8771a153a1971c" | 10 | SRC_URI[sha256sum] = "643d3914d73d3eeb0c552cbb12d7e82adf0e504dbf86a3182f8771a153a1971c" |
| 10 | 11 | ||
| 11 | BBCLASSEXTEND = "native nativesdk" | 12 | BBCLASSEXTEND = "native nativesdk" |
