diff options
Diffstat (limited to 'meta-python/recipes-devtools/python')
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-aiohttp/CVE-2025-69225.patch | 49 | ||||
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-aiohttp_3.12.15.bb | 4 |
2 files changed, 52 insertions, 1 deletions
diff --git a/meta-python/recipes-devtools/python/python3-aiohttp/CVE-2025-69225.patch b/meta-python/recipes-devtools/python/python3-aiohttp/CVE-2025-69225.patch new file mode 100644 index 0000000000..77b39d22dc --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-aiohttp/CVE-2025-69225.patch | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | From a4be27fe28e6cd833fa3045cca10404472d6878d Mon Sep 17 00:00:00 2001 | ||
| 2 | From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> | ||
| 3 | Date: Sat, 3 Jan 2026 00:39:41 +0000 | ||
| 4 | Subject: [PATCH] Reject non-ascii digits in Range header (#11903) | ||
| 5 | |||
| 6 | **This is a backport of PR #11887 as merged into master | ||
| 7 | (7a067d1905e1eeb921a50010dd0004990dbb3bf0).** | ||
| 8 | |||
| 9 | Co-authored-by: Sam Bull <git@sambull.org> | ||
| 10 | |||
| 11 | CVE: CVE-2025-69225 | ||
| 12 | Upstream-Status: Backport [https://github.com/aio-libs/aiohttp/commit/c7b7a044f88c71cefda95ec75cdcfaa4792b3b96] | ||
| 13 | Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> | ||
| 14 | --- | ||
| 15 | aiohttp/web_request.py | 2 +- | ||
| 16 | tests/test_web_request.py | 7 +++++++ | ||
| 17 | 2 files changed, 8 insertions(+), 1 deletion(-) | ||
| 18 | |||
| 19 | diff --git a/aiohttp/web_request.py b/aiohttp/web_request.py | ||
| 20 | index 0bc69b7..6e09027 100644 | ||
| 21 | --- a/aiohttp/web_request.py | ||
| 22 | +++ b/aiohttp/web_request.py | ||
| 23 | @@ -607,7 +607,7 @@ class BaseRequest(MutableMapping[str, Any], HeadersMixin): | ||
| 24 | if rng is not None: | ||
| 25 | try: | ||
| 26 | pattern = r"^bytes=(\d*)-(\d*)$" | ||
| 27 | - start, end = re.findall(pattern, rng)[0] | ||
| 28 | + start, end = re.findall(pattern, rng, re.ASCII)[0] | ||
| 29 | except IndexError: # pattern was not found in header | ||
| 30 | raise ValueError("range not in acceptable format") | ||
| 31 | |||
| 32 | diff --git a/tests/test_web_request.py b/tests/test_web_request.py | ||
| 33 | index e706e18..da80ca9 100644 | ||
| 34 | --- a/tests/test_web_request.py | ||
| 35 | +++ b/tests/test_web_request.py | ||
| 36 | @@ -243,6 +243,13 @@ def test_range_to_slice_tail_stop() -> None: | ||
| 37 | assert req.content[req.http_range] == payload[-500:] | ||
| 38 | |||
| 39 | |||
| 40 | +def test_range_non_ascii() -> None: | ||
| 41 | + # ५ = DEVANAGARI DIGIT FIVE | ||
| 42 | + req = make_mocked_request("GET", "/", headers=CIMultiDict([("RANGE", "bytes=4-५")])) | ||
| 43 | + with pytest.raises(ValueError, match="range not in acceptable format"): | ||
| 44 | + req.http_range | ||
| 45 | + | ||
| 46 | + | ||
| 47 | def test_non_keepalive_on_http10() -> None: | ||
| 48 | req = make_mocked_request("GET", "/", version=HttpVersion(1, 0)) | ||
| 49 | assert not req.keep_alive | ||
diff --git a/meta-python/recipes-devtools/python/python3-aiohttp_3.12.15.bb b/meta-python/recipes-devtools/python/python3-aiohttp_3.12.15.bb index 4341e128a5..9a45eecb8c 100644 --- a/meta-python/recipes-devtools/python/python3-aiohttp_3.12.15.bb +++ b/meta-python/recipes-devtools/python/python3-aiohttp_3.12.15.bb | |||
| @@ -4,7 +4,9 @@ HOMEPAGE = "https://github.com/aio-libs/aiohttp" | |||
| 4 | LICENSE = "Apache-2.0" | 4 | LICENSE = "Apache-2.0" |
| 5 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=748073912af33aa59430d3702aa32d41" | 5 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=748073912af33aa59430d3702aa32d41" |
| 6 | 6 | ||
| 7 | SRC_URI += "file://CVE-2025-69224.patch" | 7 | SRC_URI += "file://CVE-2025-69224.patch \ |
| 8 | file://CVE-2025-69225.patch \ | ||
| 9 | " | ||
| 8 | SRC_URI[sha256sum] = "4fc61385e9c98d72fcdf47e6dd81833f47b2f77c114c29cd64a361be57a763a2" | 10 | SRC_URI[sha256sum] = "4fc61385e9c98d72fcdf47e6dd81833f47b2f77c114c29cd64a361be57a763a2" |
| 9 | 11 | ||
| 10 | inherit python_setuptools_build_meta pypi | 12 | inherit python_setuptools_build_meta pypi |
