-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
python3-wheel: fix for CVE-2022-40898
Source: poky MR: 124663 Type: Integration Disposition: Merged from poky ChangeID: fd36d26 Description: An issue discovered in Python Packaging Authority (PyPA) Wheel 0.37.1 and earlier allows remote attackers to cause a denial of service via attacker controlled input to wheel cli. CVE: CVE-2022-40898 Upstream-Status: Backport [pypa/wheel@88f02bc] (From OE-Core rev: 0974291e545aec68755dfb634c75dca37cca1ea9) Signed-off-by: Narpat Mali <[email protected]> Signed-off-by: Richard Purdie <[email protected]> Signed-off-by: Jeremy A. Puhlman <[email protected]>
- Loading branch information
Showing
2 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
...pes-devtools/python/python3-wheel/0001-Fixed-potential-DoS-attack-via-WHEEL_INFO_RE.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
From a9a0d67a663f20b69903751c23851dd4cd6b49d4 Mon Sep 17 00:00:00 2001 | ||
From: Narpat Mali <[email protected]> | ||
Date: Wed, 11 Jan 2023 07:45:57 +0000 | ||
Subject: [PATCH] Fixed potential DoS attack via WHEEL_INFO_RE | ||
|
||
CVE: CVE-2022-40898 | ||
|
||
Upstream-Status: Backport [https://github.com/pypa/wheel/commit/88f02bc335d5404991e532e7f3b0fc80437bf4e0] | ||
|
||
Signed-off-by: Narpat Mali <[email protected]> | ||
--- | ||
src/wheel/wheelfile.py | 4 ++-- | ||
1 file changed, 2 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/src/wheel/wheelfile.py b/src/wheel/wheelfile.py | ||
index 21e7361..ff06edf 100644 | ||
--- a/src/wheel/wheelfile.py | ||
+++ b/src/wheel/wheelfile.py | ||
@@ -27,8 +27,8 @@ else: | ||
# Non-greedy matching of an optional build number may be too clever (more | ||
# invalid wheel filenames will match). Separate regex for .dist-info? | ||
WHEEL_INFO_RE = re.compile( | ||
- r"""^(?P<namever>(?P<name>.+?)-(?P<ver>.+?))(-(?P<build>\d[^-]*))? | ||
- -(?P<pyver>.+?)-(?P<abi>.+?)-(?P<plat>.+?)\.whl$""", | ||
+ r"""^(?P<namever>(?P<name>[^-]+?)-(?P<ver>[^-]+?))(-(?P<build>\d[^-]*))? | ||
+ -(?P<pyver>[^-]+?)-(?P<abi>[^-]+?)-(?P<plat>[^.]+?)\.whl$""", | ||
re.VERBOSE) | ||
|
||
|
||
-- | ||
2.32.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters