summaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python/python3-virtualenv
diff options
context:
space:
mode:
authorGyorgy Sarvari <skandigraun@gmail.com>2026-02-07 11:33:57 +0100
committerAnuj Mittal <anuj.mittal@oss.qualcomm.com>2026-02-12 13:38:12 +0530
commit48a89c6f95300d9c9dacd85c11e3ba7800e53108 (patch)
tree1344eff1ee11fcc08f94f0429a9f5a78d5ad6045 /meta-python/recipes-devtools/python/python3-virtualenv
parentf29101aa4ed9918fac19fa20f2c895d0c778a457 (diff)
downloadmeta-openembedded-48a89c6f95300d9c9dacd85c11e3ba7800e53108.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/python3-virtualenv')
-rw-r--r--meta-python/recipes-devtools/python/python3-virtualenv/CVE-2026-22702.patch60
1 files changed, 60 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..ef9922ab55
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-virtualenv/CVE-2026-22702.patch
@@ -0,0 +1,60 @@
1From c43b7ce784de42511f80b45d741715646cc4fa44 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Bern=C3=A1t=20G=C3=A1bor?= <gaborjbernat@gmail.com>
3Date: Fri, 9 Jan 2026 10:19:39 -0800
4Subject: [PATCH] Merge pull request #3013 from gaborbernat/fix-sec
5
6CVE: CVE-2026-22702
7Upstream-Status: Backport [https://github.com/pypa/virtualenv/commit/dec4cec5d16edaf83a00a658f32d1e032661cebc]
8Signed-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
14diff --git a/src/virtualenv/app_data/__init__.py b/src/virtualenv/app_data/__init__.py
15index 148c941..301a00f 100644
16--- a/src/virtualenv/app_data/__init__.py
17+++ b/src/virtualenv/app_data/__init__.py
18@@ -34,12 +34,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- logging.debug("created app data folder %s", folder)
26- except OSError as exception:
27- logging.info("could not create app data folder %s due to %r", folder, exception)
28+ try:
29+ os.makedirs(folder, exist_ok=True)
30+ logging.debug("created app data folder %s", folder)
31+ except OSError as exception:
32+ logging.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)
36diff --git a/src/virtualenv/util/lock.py b/src/virtualenv/util/lock.py
37index b4dc66a..a28b32f 100644
38--- a/src/virtualenv/util/lock.py
39+++ b/src/virtualenv/util/lock.py
40@@ -15,9 +15,8 @@ from filelock import FileLock, Timeout
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@@ -109,7 +108,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)