diff --git a/CVE-2025-47273-Add-a-check-to-ensure-the-name-resolves-relative-to-.patch b/CVE-2025-47273-Add-a-check-to-ensure-the-name-resolves-relative-to-.patch new file mode 100644 index 0000000000000000000000000000000000000000..bf8acad0178588327a8e14b6607e87643c4d8783 --- /dev/null +++ b/CVE-2025-47273-Add-a-check-to-ensure-the-name-resolves-relative-to-.patch @@ -0,0 +1,29 @@ +From 250a6d17978f9f6ac3ac887091f2d32886fbbb0b Mon Sep 17 00:00:00 2001 +From: "Jason R. Coombs" +Date: Sat, 19 Apr 2025 13:03:47 -0400 +Subject: [PATCH] Add a check to ensure the name resolves relative to the + tmpdir. + +Closes #4946 +--- + setuptools/package_index.py | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/setuptools/package_index.py b/setuptools/package_index.py +index ae50db5..f278018 100644 +--- a/setuptools/package_index.py ++++ b/setuptools/package_index.py +@@ -829,6 +829,10 @@ class PackageIndex(Environment): + + filename = os.path.join(tmpdir, name) + ++ # ensure path resolves within the tmpdir ++ if not filename.startswith(str(tmpdir)): ++ raise ValueError(f"Invalid filename {filename}") ++ + return self._download_vcs(url, filename) or self._download_other(url, filename) + + +-- +2.39.3 + diff --git a/python-setuptools.spec b/python-setuptools.spec index 8411224575b2376a1c650d2dd65dd9c12aaf747d..65b0e3897af6549f11cad8d07264ea238cb86c61 100644 --- a/python-setuptools.spec +++ b/python-setuptools.spec @@ -12,12 +12,13 @@ Summary: Easily download, build, install, upgrade, and uninstall Python packages Name: python-setuptools Version: 68.0.0 -Release: 4%{?dist} +Release: 5%{?dist} License: MIT and (BSD or ASL 2.0) URL: https://github.com/pypa/setuptools Source0: %{pypi_source %{srcname} %{version}} Patch0001: backport-CVE-2024-6345.patch +Patch0002: CVE-2025-47273-Add-a-check-to-ensure-the-name-resolves-relative-to-.patch Patch3001: Remove-optional-or-unpackaged-test-deps.patch Patch3002: Adjust-the-setup.py-install-deprecation-message.patch @@ -170,6 +171,10 @@ PYTHONPATH=$(pwd) %pytest \ %endif %changelog +* Fri May 23 2025 Shuo Wang - 68.0.0-5 +- fix CVE-2025-47273 +- Add a check to ensure the name resolves relative to the tmpdir + * Thu Sep 26 2024 OpenCloudOS Release Engineering - 68.0.0-4 - Rebuilt for clarifying the packages requirement in BaseOS and AppStream