7zip: upgrade 26.05 -> 26.06
PATCH 1/16 7zip: upgrade 26.05 -> 26.06
From: Ankur Tyagi <[email protected]>
Changelog:
https://github.com/ip7z/7zip/releases/tag/26.06
---
meta-oe/recipes-extended/7zip/{7zip_26.05.bb => 7zip_26.06.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta-oe/recipes-extended/7zip/{7zip_26.05.bb => 7zip_26.06.bb} (98%)meta-oe/recipes-extended/7zip/7zip_26.06.bb renamed from meta-oe/recipes-extended/7zip/7zip_26.05.bb +1 -1
@@ -12,7 +12,7 @@ SRC_URI = "git://github.com/ip7z/7zip.git;protocol=https;branch=main;tag=${PV} \ file://0001-Remove-treating-warning-as-errors.patch \ file://7z_wrapper.sh \ " -SRCREV = "b88c6bc09339de32f7d18bbab900686b244f42ba" +SRCREV = "d3296e39e1f1f92c7b41c0c3848e65640428d42d" UPSTREAM_CHECK_URI = "https://github.com/ip7z/7zip/releases/latest"
PATCH 2/16 apitrace: patch CVE-2026-126050
From: Ankur Tyagi <[email protected]>
Details:
https://nvd.nist.gov/vuln/detail/cve-2026-126050
--- .../apitrace/apitrace/CVE-2026-126050.patch | 39 +++++++++++++++++++ .../apitrace/apitrace_14.0.bb | 1 + 2 files changed, 40 insertions(+) create mode 100644 meta-oe/recipes-devtools/apitrace/apitrace/CVE-2026-126050.patch
meta-oe/recipes-devtools/apitrace/apitrace/CVE-2026-126050.patch new file +39 -0
@@ -0,0 +1,39 @@ +From a7c7db06b56f22235eeea2da608ef84dd401f3b6 Mon Sep 17 00:00:00 2001 +From: Deus Rex research team <[email protected]> +Date: Tue, 10 Nov 2026 13:05:32 +0000 +Subject: [PATCH] trace: Fix heap out-of-bounds write in + SnappyFile::flushReadCache(). + +The Snappy trace reader takes each chunk's compressed length from a +4-byte field in the file and reads that many bytes into +m_compressedCache, a heap buffer allocated once with a fixed size of +snappy::MaxCompressedLength(1 MiB) = 1223370 bytes. The length is never +compared with that size, so a .trace file that declares and supplies a +longer chunk makes the read write past the end of the buffer. + +(cherry picked from commit 3890c5a448addfd75ccbe1bd09e3075de6fb3395) +CVE: CVE-2026-126050.patch +Upstream-Status: Backport [https://github.com/apitrace/apitrace/commit/3890c5a448addfd75ccbe1bd09e3075de6fb3395] +Signed-off-by: Ankur Tyagi <[email protected]> +--- + lib/trace/trace_file_snappy.cpp | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/lib/trace/trace_file_snappy.cpp b/lib/trace/trace_file_snappy.cpp +index 5b60ec9d..9b0a681d 100644 +--- a/lib/trace/trace_file_snappy.cpp ++++ b/lib/trace/trace_file_snappy.cpp +@@ -224,6 +224,13 @@ void SnappyFile::flushReadCache(size_t skipLength) + return; + } + ++ if (compressedLength > snappy::MaxCompressedLength(SNAPPY_CHUNK_SIZE)) { ++ std::cerr << "error: invalid compressed chunk length in trace\n"; ++ m_stream.setstate(std::ios_base::failbit); ++ createCache(0); ++ return; ++ } ++ + m_stream.read((char*)m_compressedCache, compressedLength); + if (m_stream.fail()) { + std::cerr << "warning: unexpected end of file while reading trace\n";
meta-oe/recipes-devtools/apitrace/apitrace_14.0.bb +1 -0
@@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=aeb969185a143c3c25130bc2c3ef9a50 \ SRCREV = "18cfd388ac47a9e00978b34d6c20341f3e2cdb56" SRC_URI = "gitsm://github.com/${BPN}/${BPN}.git;branch=master;protocol=https;tag=${PV} \ file://0001-zstd-disable-the-x86-64-BMI2-assembly-fast-loops.patch \ + file://CVE-2026-126050.patch \ " DEPENDS += "zlib libpng python3-native"
PATCH 3/16 cockpit: mark CVE-2024-2947 fixed
In reply to [email protected]From: Ankur Tyagi <[email protected]>
Commit[1] also identified by Debian[2]
Details:
https://nvd.nist.gov/vuln/detail/cve-2024-2947
[1]https://github.com/cockpit-project/cockpit/commit/9c4cc9b6df632082538b53bdc8ee9ec1c5cad4da [2]https://security-tracker.debian.org/tracker/CVE-2024-2947
--- meta-webserver/recipes-webadmin/cockpit/cockpit_366.1.bb | 1 + 1 file changed, 1 insertion(+)
meta-webserver/recipes-webadmin/cockpit/cockpit_366.1.bb +1 -0
@@ -202,3 +202,4 @@ do_install:append() { } CVE_PRODUCT = "cockpit-project:cockpit" +CVE_STATUS[CVE-2024-2947] = "fixed-version: fixed since v314"
PATCH 4/16 brotli: set CVE_PRODUCT to "google:brotli"
In reply to [email protected]From: Ankur Tyagi <[email protected]>
cve-check class is setting default CVE_PRODUCT to 'brotli' which ignores the CVEs from NVD Database.
Reference:
CVE-2026-111497
https://nvd.nist.gov/vuln/detail/cve-2026-111497
--- meta-oe/recipes-extended/brotli/brotli_1.2.1.bb | 2 ++ 1 file changed, 2 insertions(+)
meta-oe/recipes-extended/brotli/brotli_1.2.1.bb +2 -0
@@ -20,3 +20,5 @@ do_install:append () { } BBCLASSEXTEND = "native nativesdk" + +CVE_PRODUCT = "google:brotli"
PATCH 5/16 ettercap: patch CVEs CVE-2026-125400 - CVE-2026-125406
In reply to [email protected]From: Ankur Tyagi <[email protected]>
Also backport commits[1][2][3] to cherry pick commit identified by NVD.
Details:
https://nvd.nist.gov/vuln/detail/cve-2026-125400
[1]https://github.com/Ettercap/ettercap/commit/593a11ff49e61293fcf4ed24f8b017df0aeac6fd [2]https://github.com/Ettercap/ettercap/commit/feeae6fa366e01a3dd9f1857ec6aae847b2ae00c [3]https://github.com/Ettercap/ettercap/commit/ffd9e06c3cdab9c056f7e729b5083ed81126315e
--- .../ettercap/ettercap_0.8.4.1.bb | 4 + .../ettercap/files/CVE-2026-125400-06_1.patch | 121 +++ .../ettercap/files/CVE-2026-125400-06_2.patch | 149 ++++ .../ettercap/files/CVE-2026-125400-06_3.patch | 92 ++ .../ettercap/files/CVE-2026-125400-06_4.patch | 807 ++++++++++++++++++ 5 files changed, 1173 insertions(+) create mode 100644 meta-networking/recipes-support/ettercap/files/CVE-2026-125400-06_1.patch create mode 100644 meta-networking/recipes-support/ettercap/files/CVE-2026-125400-06_2.patch create mode 100644 meta-networking/recipes-support/ettercap/files/CVE-2026-125400-06_3.patch create mode 100644 meta-networking/recipes-support/ettercap/files/CVE-2026-125400-06_4.patch
meta-networking/recipes-support/ettercap/ettercap_0.8.4.1.bb +4 -0
@@ -23,6 +23,10 @@ RDEPENDS:${PN} += "bash ethtool libgcc" SRC_URI = "gitsm://github.com/Ettercap/ettercap;branch=master;protocol=https;tag=v${PV} \ file://0001-ec.h-do-not-strip-a-pre-existing-_GNU_SOURCE-define.patch \ + file://CVE-2026-125400-06_1.patch \ + file://CVE-2026-125400-06_2.patch \ + file://CVE-2026-125400-06_3.patch \ + file://CVE-2026-125400-06_4.patch \ " SRCREV = "0dc8409779f3a09cbfff4434b9a4d7b33480d88d"
meta-networking/recipes-support/ettercap/files/CVE-2026-125400-06_1.patch new file +121 -0
121 lines not on this page · raw message
meta-networking/recipes-support/ettercap/files/CVE-2026-125400-06_2.patch new file +149 -0
149 lines not on this page · raw message
meta-networking/recipes-support/ettercap/files/CVE-2026-125400-06_3.patch new file +92 -0
92 lines not on this page · raw message
meta-networking/recipes-support/ettercap/files/CVE-2026-125400-06_4.patch new file +807 -0
807 lines not on this page · raw message
PATCH 6/16 mpv: patch CVE-2026-123095
In reply to [email protected]From: Ankur Tyagi <[email protected]>
Details:
https://nvd.nist.gov/vuln/detail/cve-2026-123095
--- .../mplayer/mpv/CVE-2026-123095.patch | 35 +++++++++++++++++++ .../recipes-multimedia/mplayer/mpv_0.41.0.bb | 4 ++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-multimedia/mplayer/mpv/CVE-2026-123095.patch
meta-oe/recipes-multimedia/mplayer/mpv/CVE-2026-123095.patch new file +35 -0
@@ -0,0 +1,35 @@ +From 29025d6211cbbceb5e74c3619ddec9dc2fb20ed7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]> +Date: Wed, 4 Nov 2026 20:28:57 +0100 +Subject: [PATCH] ytdl_hook: reject playlist entry URLs with control characters + +The entries are joined into a memory:// M3U playlist, one URL per line. +A URL with a line break became several entries, and only the first line +went through url_is_safe(). The other lines were loaded with the origin +of the opened URL, so any protocol was allowed. Skip any URLs with +control characters. + +Fixes: e6e6b0dcc7 +Fixes: GHSA-p99g-m25w-x8xv +(cherry picked from commit c3096515dcd26c14004f985538b5aa41db613856) +CVE: CVE-2026-123095 +Upstream-Status: Backport [https://github.com/mpv-player/mpv/commit/c3096515dcd26c14004f985538b5aa41db613856] +Signed-off-by: Ankur Tyagi <[email protected]> +--- + player/lua/ytdl_hook.lua | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua +index 65ef859595..2b0edb193a 100644 +--- a/player/lua/ytdl_hook.lua ++++ b/player/lua/ytdl_hook.lua +@@ -1111,6 +1111,9 @@ local function run_ytdl_hook(url) + -- links without protocol as returned by --flat-playlist + if not site then + msg.error("Playlist entry does not have unique URL, can't add it.") ++ elseif site:find("%c") then ++ -- a line break would add entries to the playlist ++ msg.error("Playlist entry URL contains control characters, can't add it.") + elseif not site:find("://") then + -- youtube extractor provides only IDs, + -- others come prefixed with the extractor name and ":"
meta-oe/recipes-multimedia/mplayer/mpv_0.41.0.bb +3 -1
@@ -23,7 +23,9 @@ LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=570a9b3749dd0463a1778803b12a6dce" LICENSE_FLAGS = "commercial" SRCREV = "41f6a645068483470267271e1d09966ca3b9f413" -SRC_URI = "git://github.com/mpv-player/mpv;name=mpv;branch=release/${@oe.utils.trim_version('${PV}', 2)};protocol=https;tag=v${PV}" +SRC_URI = "git://github.com/mpv-player/mpv;name=mpv;branch=release/${@oe.utils.trim_version('${PV}', 2)};protocol=https;tag=v${PV} \ + file://CVE-2026-123095.patch \ +" inherit meson pkgconfig mime-xdg
PATCH 7/16 tinyproxy: patch CVE-2026-125371
In reply to [email protected]From: Ankur Tyagi <[email protected]>
Details:
https://nvd.nist.gov/vuln/detail/cve-2026-125371
--- .../tinyproxy/tinyproxy/CVE-2026-125371.patch | 70 +++++++++++++++++++ .../tinyproxy/tinyproxy_1.11.3.bb | 1 + 2 files changed, 71 insertions(+) create mode 100644 meta-networking/recipes-support/tinyproxy/tinyproxy/CVE-2026-125371.patch
meta-networking/recipes-support/tinyproxy/tinyproxy/CVE-2026-125371.patch new file +70 -0
@@ -0,0 +1,70 @@ +From 8c8463fb1a0bf7db82d3dfc6f363d5b339e96cd3 Mon Sep 17 00:00:00 2001 +From: rofl0r <[email protected]> +Date: Tue, 15 Sep 2026 06:42:05 +0000 +Subject: [PATCH] acl: use hostspec parser to disallow suffix hostname matches + +the existing ad-hoc parsing in acl.c allowed an attacker to +use e.g. an "untrusted.net" domain name to access a reachable +tinyproxy instance if it had an allow list entry for "trusted.net". + +exploiting it would require that the attacker has prior knowledge +of the instance's configuration or is damn good at guessing and +well-budgeted to register lots of potentially matching domains. + +fix by re-using the existing hardened hostspec parser. + +closes #627 + +(cherry picked from commit 3991ac8f98c6a9f05b3265018b812dbf2ca92c28) +CVE: CVE-2026-125371 +Upstream-Status: Backport [https://github.com/tinyproxy/tinyproxy/commit/3991ac8f98c6a9f05b3265018b812dbf2ca92c28] +Signed-off-by: Ankur Tyagi <[email protected]> +--- + src/acl.c | 25 +++++++++---------------- + 1 file changed, 9 insertions(+), 16 deletions(-) + +diff --git a/src/acl.c b/src/acl.c +index 2d141ba..db526db 100644 +--- a/src/acl.c ++++ b/src/acl.c +@@ -105,7 +105,6 @@ acl_string_processing (struct acl_s *acl, const char *ip_address, + { + int match; + struct addrinfo hints, *res, *ressave; +- size_t test_length, match_length; + char ipbuf[512]; + + assert (acl && acl->h.type == HST_STRING); +@@ -153,23 +152,17 @@ STRING_TEST: + return -1; + } + +- test_length = strlen (string_addr); +- match_length = strlen (acl->h.address.string); +- + /* +- * If the string length is shorter than AC string, return a -1 so +- * that the "driver" will skip onto the next control in the list. ++ * compare the reverse-resolved client hostname against the ACL ++ * entry, using the shared hostspec matcher so that hostname ++ * entries are matched at label boundaries: plain entries match ++ * the whole hostname exactly, and leading-dot entries match the ++ * apex host plus every subdomain below it. This prevents ++ * suffix-collision bypasses, e.g. "Allow trusted.net" must not ++ * admit "untrusted.net" (GH issue #627). + */ +- if (test_length < match_length) +- return -1; +- +- if (strcasecmp +- (string_addr + (test_length - match_length), +- acl->h.address.string) == 0) { +- if (acl->access == ACL_DENY) +- return 0; +- else +- return 1; ++ if (hostspec_match (string_addr, &acl->h) != 0) { ++ return acl->access != ACL_DENY; + } + + /* Indicate that no tests succeeded, so skip to next control. */
meta-networking/recipes-support/tinyproxy/tinyproxy_1.11.3.bb +1 -0
@@ -13,6 +13,7 @@ SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.gz file://CVE-2026-54387.patch \ file://CVE-2026-55202.patch \ file://CVE-2026-54388.patch \ + file://CVE-2026-125371.patch \ " SRC_URI[sha256sum] = "9bcf46db1a2375ff3e3d27a41982f1efec4706cce8899ff9f33323a8218f7592"
PATCH 8/16 webmin: patch CVE-2026-125391
In reply to [email protected]From: Ankur Tyagi <[email protected]>
Details:
https://nvd.nist.gov/vuln/detail/cve-2026-125391
--- .../webmin/files/CVE-2026-125391.patch | 37 +++++++++++++++++++ .../recipes-webadmin/webmin/webmin_2.653.bb | 1 + 2 files changed, 38 insertions(+) create mode 100644 meta-webserver/recipes-webadmin/webmin/files/CVE-2026-125391.patch
meta-webserver/recipes-webadmin/webmin/files/CVE-2026-125391.patch new file +37 -0
@@ -0,0 +1,37 @@ +From 86791cd2bd1848b3967dc86ae0909493e768db7e Mon Sep 17 00:00:00 2001 +From: Ilia Ross <[email protected]> +Date: Sun, 8 Nov 2026 17:38:12 +0100 +Subject: [PATCH] Fix Samba account option command injection + +(cherry picked from commit 18cab89b1fc74ab7e8b1b8b90bbccbe5aba99154) +CVE: CVE-2026-125391 +Upstream-Status: Backport [https://github.com/webmin/webmin/commit/18cab89b1fc74ab7e8b1b8b90bbccbe5aba99154] +Signed-off-by: Ankur Tyagi <[email protected]> +--- + samba/samba-lib.pl | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/samba/samba-lib.pl b/samba/samba-lib.pl +index bafd03b8b..2bd90ba26 100755 +--- a/samba/samba-lib.pl ++++ b/samba/samba-lib.pl +@@ -656,7 +656,8 @@ if ($has_pdbedit) { + "cd / && $config{'pdbedit'} -a -s $config{'smb_conf'} -t -u ". + quotemeta($user->{'name'}). + ($config{'sync_gid'} ? " -g $config{'sync_gid'}" : ""). +- " -c '[".join("", @opts)."]' $ws <$temp 2>&1"); ++ " -c ".quotemeta("[".join("", @opts)."]"). ++ " $ws <$temp 2>&1"); + $? && &error("$config{'pdbedit'} failed : <pre>$out</pre>"); + } + else { +@@ -700,7 +701,8 @@ if ($has_pdbedit) { + $out = &backquote_logged( + "cd / && $config{'pdbedit'} -r -s $config{'smb_conf'} -u ". + quotemeta($_[0]->{'name'}). +- " -c '[".join("", @opts)."]' 2>&1"); ++ " -c ".quotemeta("[".join("", @opts)."]"). ++ " 2>&1"); + $? && &error("$config{'pdbedit'} failed : <pre>$out</pre>"); + } + }
meta-webserver/recipes-webadmin/webmin/webmin_2.653.bb +1 -0
@@ -17,6 +17,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/webadmin/webmin-${PV}.tar.gz \ file://media-tomb.patch \ file://mysql-config-fix.patch \ file://webmin.service \ + file://CVE-2026-125391.patch \ " SRC_URI[sha256sum] = "9acc680d3d45cee876f36fc8810ce68bb6e44a0365e245a4298a180e0d016696" UPSTREAM_CHECK_URI = "http://www.webmin.com/download.html"
PATCH 9/16 webmin: patch CVE-2026-125392
In reply to [email protected]From: Ankur Tyagi <[email protected]>
Details:
https://nvd.nist.gov/vuln/detail/cve-2026-125392
--- .../webmin/files/CVE-2026-125392.patch | 26 +++++++++++++++++++ .../recipes-webadmin/webmin/webmin_2.653.bb | 1 + 2 files changed, 27 insertions(+) create mode 100644 meta-webserver/recipes-webadmin/webmin/files/CVE-2026-125392.patch
meta-webserver/recipes-webadmin/webmin/files/CVE-2026-125392.patch new file +26 -0
@@ -0,0 +1,26 @@ +From 261c858c1f09b734add7239b835c1085eab3106c Mon Sep 17 00:00:00 2001 +From: Jamie Cameron <[email protected]> +Date: Sun, 8 Nov 2026 17:20:57 -0800 +Subject: [PATCH] Add HTML escaping in all-records mode + +(cherry picked from commit 224cbd91467c98c3147df695fe9abc8149183356) +CVE: CVE-2026-125392 +Upstream-Status: Backport [https://github.com/webmin/webmin/commit/224cbd91467c98c3147df695fe9abc8149183356] +Signed-off-by: Ankur Tyagi <[email protected]> +--- + bind8/edit_recs.cgi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/bind8/edit_recs.cgi b/bind8/edit_recs.cgi +index 2141c0a12..627143b37 100755 +--- a/bind8/edit_recs.cgi ++++ b/bind8/edit_recs.cgi +@@ -268,7 +268,7 @@ for(my $i=0; $i<@_; $i++) { + if (length($joined) > 80) { + $joined = substr($joined, 0, 80)." ..."; + } +- push(@cols, $joined); ++ push(@cols, &html_escape($joined)); + } + if ($config{'allow_comments'} && $in{'type'} ne "WKS") { + push(@cols, &html_escape($r->{'comment'}));
meta-webserver/recipes-webadmin/webmin/webmin_2.653.bb +1 -0
@@ -18,6 +18,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/webadmin/webmin-${PV}.tar.gz \ file://mysql-config-fix.patch \ file://webmin.service \ file://CVE-2026-125391.patch \ + file://CVE-2026-125392.patch \ " SRC_URI[sha256sum] = "9acc680d3d45cee876f36fc8810ce68bb6e44a0365e245a4298a180e0d016696" UPSTREAM_CHECK_URI = "http://www.webmin.com/download.html"
PATCH 10/16 python3-aiohttp: patch CVE-2026-111063
In reply to [email protected]From: Ankur Tyagi <[email protected]>
Details:
https://nvd.nist.gov/vuln/detail/cve-2026-111063
--- .../python3-aiohttp/CVE-2026-111063.patch | 136 ++++++++++++++++++ .../python/python3-aiohttp_3.14.3.bb | 2 + 2 files changed, 138 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-111063.patch
meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-111063.patch new file +136 -0
@@ -0,0 +1,136 @@ +From 2dcbe838baee9938cdf4f0b7a8c682b92913bb76 Mon Sep 17 00:00:00 2001 +From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> +Date: Sun, 27 Sep 2026 21:27:34 +0100 +Subject: [PATCH] [PR #13830/e11d2836 backport][3.14] Fix secure shared cookie + (#13832) + +**This is a backport of PR #13830 as merged into master +(e11d2836203a21bec59095498e578d37801027e7).** + +Co-authored-by: Sam Bull <[email protected]> +(cherry picked from commit 999c356d61e966faffa97b06ab0d0455226d36c5) + +CVE: CVE-2026-111063 +Upstream-Status: Backport [https://github.com/aio-libs/aiohttp/commit/999c356d61e966faffa97b06ab0d0455226d36c5] + +Signed-off-by: Ankur Tyagi <[email protected]> +--- + CHANGES/13830.bugfix.rst | 1 + + aiohttp/cookiejar.py | 3 +++ + docs/client_reference.rst | 3 ++- + docs/spelling_wordlist.txt | 1 + + tests/test_client_functional.py | 9 +++++++-- + tests/test_cookiejar.py | 28 ++++++++++++++++++++++++++++ + 6 files changed, 42 insertions(+), 3 deletions(-) + create mode 100644 CHANGES/13830.bugfix.rst + +diff --git a/CHANGES/13830.bugfix.rst b/CHANGES/13830.bugfix.rst +new file mode 100644 +index 000000000..2a3976924 +--- /dev/null ++++ b/CHANGES/13830.bugfix.rst +@@ -0,0 +1 @@ ++Fixed ``CookieJar.filter_cookies()`` sending shared cookies (cookies without a ``Domain`` attribute) marked ``Secure`` over unencrypted connections -- by :user:`Dreamsorcerer`. +diff --git a/aiohttp/cookiejar.py b/aiohttp/cookiejar.py +index 2b9722470..0d2f3e05c 100644 +--- a/aiohttp/cookiejar.py ++++ b/aiohttp/cookiejar.py +@@ -478,6 +478,9 @@ class CookieJar(AbstractCookieJar): + # Send shared cookie + key = ("", "") + for c in self._cookies[key].values(): ++ if is_not_secure and c["secure"]: ++ continue ++ + # Check cache first + if c.key in self._morsel_cache[key]: + filtered[c.key] = self._morsel_cache[key][c.key] +diff --git a/docs/client_reference.rst b/docs/client_reference.rst +index 734201128..a237fb64b 100644 +--- a/docs/client_reference.rst ++++ b/docs/client_reference.rst +@@ -2544,7 +2544,8 @@ Utilities + :param ~yarl.URL response_url: URL of response, ``None`` for *shared + cookies*. Regular cookies are coupled with server's URL and + are sent only to this server, shared ones are sent in every +- client request. ++ client request (except that shared cookies marked ``Secure`` ++ are only sent over encrypted connections). + + .. method:: filter_cookies(request_url) + +diff --git a/docs/spelling_wordlist.txt b/docs/spelling_wordlist.txt +index 24561f52d..88638bf12 100644 +--- a/docs/spelling_wordlist.txt ++++ b/docs/spelling_wordlist.txt +@@ -369,6 +369,7 @@ un + unawaited + unclosed + undercounting ++unencrypted + unescaped + unhandled + unicode +diff --git a/tests/test_client_functional.py b/tests/test_client_functional.py +index 9470876d0..639ca4606 100644 +--- a/tests/test_client_functional.py ++++ b/tests/test_client_functional.py +@@ -2909,12 +2909,17 @@ async def test_morsel_with_attributes(aiohttp_client) -> None: + c = http.cookies.Morsel() + c.set("test3", "456", "456") + c["httponly"] = True +- c["secure"] = True + c["max-age"] = 1000 + ++ # A Secure shared cookie must be withheld entirely: the test server ++ # is plain http, so it must not reach the handler at all. ++ c2: http.cookies.Morsel[str] = http.cookies.Morsel() ++ c2.set("test4", "789", "789") ++ c2["secure"] = True ++ + app = web.Application() + app.router.add_get("/", handler) +- client = await aiohttp_client(app, cookies={"test2": c}) ++ client = await aiohttp_client(app, cookies={"test2": c, "test4": c2}) + + async with client.get("/") as resp: + assert 200 == resp.status +diff --git a/tests/test_cookiejar.py b/tests/test_cookiejar.py +index 9276ff252..9f279801b 100644 +--- a/tests/test_cookiejar.py ++++ b/tests/test_cookiejar.py +@@ -1206,6 +1206,34 @@ async def test_treat_as_secure_origin() -> None: + assert len(filtered_cookies) == 1 + + ++async def test_treat_as_secure_origin_sends_secure_shared_cookie() -> None: ++ endpoint = URL("http://127.0.0.1/") ++ ++ jar = CookieJar(unsafe=True, treat_as_secure_origin=[endpoint]) ++ jar.update_cookies(SimpleCookie("shared-secure-cookie=first; Secure;")) ++ ++ filtered_cookies = jar.filter_cookies(request_url=endpoint) ++ assert "shared-secure-cookie" in filtered_cookies ++ ++ ++async def test_filter_cookies_with_secure_shared_cookie() -> None: ++ """Secure shared cookies (no Domain attribute) must not be sent over cleartext.""" ++ jar = CookieJar() ++ jar.update_cookies( ++ SimpleCookie("shared-secure-cookie=first; Secure; shared-cookie=second;") ++ ) ++ ++ filtered = jar.filter_cookies(URL("http://example.com/")) ++ assert set(filtered.keys()) == {"shared-cookie"} ++ ++ filtered = jar.filter_cookies(URL("https://example.com/")) ++ assert set(filtered.keys()) == {"shared-cookie", "shared-secure-cookie"} ++ ++ # The morsel cached by the https request must not bypass the Secure check. ++ filtered = jar.filter_cookies(URL("http://example.com/")) ++ assert set(filtered.keys()) == {"shared-cookie"} ++ ++ + async def test_filter_cookies_does_not_leak_memory() -> None: + """Test that filter_cookies doesn't create empty cookie entries. +
meta-python/recipes-devtools/python/python3-aiohttp_3.14.3.bb +2 -0
@@ -6,6 +6,8 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b5e9e27554f71f0f132919037cb967b2" SRC_URI[sha256sum] = "9491196535a88924a60afd5b5f434b5b203b6cc616250878dbdb223a8f7844bc" +SRC_URI += "file://CVE-2026-111063.patch" + CVE_PRODUCT = "aiohttp:aiohttp" CVE_STATUS_GROUPS = "CVE_AIOHTTP_FIX_3_13_4" CVE_AIOHTTP_FIX_3_13_4[status] = "fixed-version: fixed in 3.13.4"
PATCH 11/16 python3-aiohttp: patch CVE-2026-111065
In reply to [email protected]From: Ankur Tyagi <[email protected]>
Details:
https://nvd.nist.gov/vuln/detail/cve-2026-111065
--- .../python3-aiohttp/CVE-2026-111065.patch | 172 ++++++++++++++++++ .../python/python3-aiohttp_3.14.3.bb | 4 +- 2 files changed, 175 insertions(+), 1 deletion(-) create mode 100644 meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-111065.patch
meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-111065.patch new file +172 -0
@@ -0,0 +1,172 @@ +From 16a92b236b34f86d3873e29292b78159dd3ff19f Mon Sep 17 00:00:00 2001 +From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> +Date: Wed, 9 Sep 2026 14:43:30 +0100 +Subject: [PATCH] [PR #13677/9e08ba02 backport][3.14] Fix cookie overflow + (#13679) + +**This is a backport of PR #13677 as merged into master +(9e08ba02abe573ce9e4cc541d4e3c3646adb43a7).** + +--------- + +Co-authored-by: Sam Bull <[email protected]> +(cherry picked from commit 9dd8eaf4e31f1237ef2c1574a8c82a739fca5805) + +CVE: CVE-2026-111065 +Upstream-Status: Backport [https://github.com/aio-libs/aiohttp/commit/9dd8eaf4e31f1237ef2c1574a8c82a739fca5805] + +Signed-off-by: Ankur Tyagi <[email protected]> +--- + CHANGES/13677.bugfix.rst | 1 + + aiohttp/client.py | 5 ++++ + aiohttp/cookiejar.py | 10 ++++++- + tests/test_client_functional.py | 46 ++++++++++++++++++++++++++++++++- + tests/test_cookiejar.py | 22 ++++++++++++++++ + 5 files changed, 82 insertions(+), 2 deletions(-) + create mode 100644 CHANGES/13677.bugfix.rst + +diff --git a/CHANGES/13677.bugfix.rst b/CHANGES/13677.bugfix.rst +new file mode 100644 +index 000000000..bea67cba7 +--- /dev/null ++++ b/CHANGES/13677.bugfix.rst +@@ -0,0 +1 @@ ++Fixed a possible ``OverflowError`` on cookies and a connection not being closed properly -- by :user:`Dreamsorcerer`. +diff --git a/aiohttp/client.py b/aiohttp/client.py +index 12f236d6c..df9fbd8c9 100644 +--- a/aiohttp/client.py ++++ b/aiohttp/client.py +@@ -697,6 +697,7 @@ class ClientSession: + + timer = tm.timer() + req: ClientRequest | None = None ++ resp: ClientResponse | None = None + try: + with timer: + # https://www.rfc-editor.org/rfc/rfc9112.html#name-retrying-requests +@@ -1020,6 +1021,10 @@ class ClientSession: + handle.cancel() + handle = None + ++ if resp is not None: ++ # A failure occurred after the response was received. ++ resp.close() ++ + if req is not None and req._body is not None: + await req._body.close() + +diff --git a/aiohttp/cookiejar.py b/aiohttp/cookiejar.py +index 0d2f3e05c..b949cc118 100644 +--- a/aiohttp/cookiejar.py ++++ b/aiohttp/cookiejar.py +@@ -425,7 +425,15 @@ class CookieJar(AbstractCookieJar): + if max_age := cookie["max-age"]: + try: + delta_seconds = int(max_age) +- max_age_expiration = min(time.time() + delta_seconds, self.MAX_TIME) ++ # https://datatracker.ietf.org/doc/html/rfc6265#section-5.2.2 ++ if delta_seconds <= 0: ++ max_age_expiration = 0.0 ++ else: ++ # Cap first to protect against OverflowError on next line. ++ delta_seconds = min(delta_seconds, self.MAX_TIME) ++ max_age_expiration = min( ++ time.time() + delta_seconds, self.MAX_TIME ++ ) + self._expire_cookie(max_age_expiration, domain, path, name) + except ValueError: + cookie["max-age"] = "" +diff --git a/tests/test_client_functional.py b/tests/test_client_functional.py +index 639ca4606..f07104b81 100644 +--- a/tests/test_client_functional.py ++++ b/tests/test_client_functional.py +@@ -15,7 +15,7 @@ import tarfile + import time + import zipfile + import zlib +-from collections.abc import AsyncIterator, Awaitable, Callable ++from collections.abc import AsyncIterator, Awaitable, Callable, Sequence + from contextlib import suppress + from typing import Any, NoReturn + from unittest import mock +@@ -3050,6 +3050,50 @@ async def test_set_cookies_max_age_overflow(aiohttp_client) -> None: + assert int(cookie["max-age"]) == int(overflow) + + ++async def test_connection_released_when_cookie_processing_fails( ++ aiohttp_client: AiohttpClient, ++) -> None: ++ class EvilJar(aiohttp.CookieJar): ++ def update_cookies_from_headers( ++ self, headers: Sequence[str], response_url: URL ++ ) -> None: ++ raise RuntimeError("boom") ++ ++ hold = asyncio.Event() ++ ++ async def hostile(request: web.Request) -> web.StreamResponse: ++ ret = web.StreamResponse() ++ ret.content_length = 2 ++ ret.set_cookie("sid", "x") ++ await ret.prepare(request) ++ await ret.write(b"x") ++ await hold.wait() ++ assert False ++ ++ async def clean(request: web.Request) -> web.Response: ++ return web.Response() ++ ++ app = web.Application() ++ app.router.add_get("/hostile", hostile) ++ app.router.add_get("/clean", clean) ++ connector = aiohttp.TCPConnector(limit=1) ++ client = await aiohttp_client(app, connector=connector, cookie_jar=EvilJar()) ++ ++ try: ++ for _ in range(2): ++ with pytest.raises(RuntimeError, match="boom") as excinfo: ++ await client.get("/hostile") ++ assert not connector._acquired ++ del excinfo ++ ++ # The single connector slot is free again: an unaffected request ++ # succeeds instead of waiting forever for a connection. ++ async with client.get("/clean") as resp: ++ assert resp.status == 200 ++ finally: ++ hold.set() ++ ++ + async def test_request_conn_error() -> None: + client = aiohttp.ClientSession() + with pytest.raises(aiohttp.ClientConnectionError): +diff --git a/tests/test_cookiejar.py b/tests/test_cookiejar.py +index 9f279801b..be6da2a5f 100644 +--- a/tests/test_cookiejar.py ++++ b/tests/test_cookiejar.py +@@ -2069,3 +2069,25 @@ async def test_cookie_jar_unsafe_property() -> None: + + jar_unsafe = CookieJar(unsafe=True) + assert jar_unsafe.unsafe is True ++ ++ ++async def test_update_cookies_max_age_beyond_float_range_is_clamped() -> None: ++ """A hostile Max-Age larger than float max must clamp, not raise OverflowError.""" ++ url = URL("https://example.com/") ++ jar = CookieJar() ++ ++ jar.update_cookies_from_headers([f"sid=x; Max-Age={'9' * 309}"], url) ++ ++ assert "sid" in jar.filter_cookies(url) ++ assert jar._expirations[("example.com", "", "sid")] == CookieJar.MAX_TIME ++ ++ ++async def test_update_cookies_negative_max_age_beyond_float_range_expires() -> None: ++ """A negative Max-Age below float min must expire the cookie, not raise.""" ++ url = URL("https://example.com/") ++ jar = CookieJar() ++ ++ jar.update_cookies_from_headers([f"sid=x; Max-Age=-{'9' * 309}"], url) ++ ++ assert "sid" not in jar.filter_cookies(url) ++ assert len(jar) == 0
meta-python/recipes-devtools/python/python3-aiohttp_3.14.3.bb +3 -1
@@ -6,7 +6,9 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b5e9e27554f71f0f132919037cb967b2" SRC_URI[sha256sum] = "9491196535a88924a60afd5b5f434b5b203b6cc616250878dbdb223a8f7844bc" -SRC_URI += "file://CVE-2026-111063.patch" +SRC_URI += "file://CVE-2026-111063.patch \ + file://CVE-2026-111065.patch \ +" CVE_PRODUCT = "aiohttp:aiohttp" CVE_STATUS_GROUPS = "CVE_AIOHTTP_FIX_3_13_4"
PATCH 12/16 python3-aiohttp: patch CVE-2026-111066
In reply to [email protected]From: Ankur Tyagi <[email protected]>
Details:
https://nvd.nist.gov/vuln/detail/cve-2026-111066
--- .../python3-aiohttp/CVE-2026-111066.patch | 382 ++++++++++++++++++ .../python/python3-aiohttp_3.14.3.bb | 1 + 2 files changed, 383 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-111066.patch
meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-111066.patch new file +382 -0
@@ -0,0 +1,382 @@ +From a45985a1dba1aaacad2b12724b450496a6ab0903 Mon Sep 17 00:00:00 2001 +From: Sam Bull <[email protected]> +Date: Tue, 18 Aug 2026 21:54:45 +0100 +Subject: [PATCH] Reduce number of file descriptors needed in multipart + messages (#13426) (#13475) + +(cherry picked from commit c92ed4c48dafd40d5ed4c86587af9e081ac7d971) +(cherry picked from commit 2d94633b7f1b4c1ba07d647b629a8440652b2d09) + +CVE: CVE-2026-111066 +Upstream-Status: Backport [https://github.com/aio-libs/aiohttp/commit/2d94633b7f1b4c1ba07d647b629a8440652b2d09] + +Signed-off-by: Ankur Tyagi <[email protected]> +--- + CHANGES/13426.bugfix.rst | 1 + + aiohttp/web_request.py | 91 ++++++++++++++----- + tests/test_web_functional.py | 166 ++++++++++++++++++++++++++++++++++- + 3 files changed, 234 insertions(+), 24 deletions(-) + create mode 100644 CHANGES/13426.bugfix.rst + +diff --git a/CHANGES/13426.bugfix.rst b/CHANGES/13426.bugfix.rst +new file mode 100644 +index 000000000..8b9ee295f +--- /dev/null ++++ b/CHANGES/13426.bugfix.rst +@@ -0,0 +1 @@ ++Switched multipart handling to use spooled temporary files to reduce number of file descriptors needed -- by :user:`Dreamsorcerer`. +diff --git a/aiohttp/web_request.py b/aiohttp/web_request.py +index ca925e2ac..eaed708eb 100644 +--- a/aiohttp/web_request.py ++++ b/aiohttp/web_request.py +@@ -3,13 +3,13 @@ import datetime + import io + import re + import string +-import tempfile ++import sys + import types + import warnings + from collections.abc import Iterator, Mapping, MutableMapping + from re import Pattern + from types import MappingProxyType +-from typing import TYPE_CHECKING, Any, Final, Optional, TypeVar, cast, overload ++from typing import IO, TYPE_CHECKING, Any, Final, Optional, TypeVar, cast, overload + from urllib.parse import parse_qsl + + import attr +@@ -54,6 +54,30 @@ from .typedefs import ( + from .web_exceptions import HTTPRequestEntityTooLarge, NotAppKeyWarning + from .web_response import StreamResponse + ++if sys.version_info >= (3, 11): ++ from tempfile import SpooledTemporaryFile ++else: ++ import tempfile ++ ++ class SpooledTemporaryFile(tempfile.SpooledTemporaryFile[bytes], io.IOBase): ++ """Make the spooled file satisfy the documented `FileField.file` type. ++ ++ `tempfile.SpooledTemporaryFile` only became an `io.IOBase` subclass in ++ 3.11 (python/cpython#70363), and never grew the three capability ++ predicates before then. Both underlying files (`io.BytesIO` before ++ rollover, a `w+b` temp file after) are readable, writable and seekable. ++ """ ++ ++ def readable(self) -> bool: ++ return True ++ ++ def writable(self) -> bool: ++ return True ++ ++ def seekable(self) -> bool: ++ return True ++ ++ + __all__ = ("BaseRequest", "FileField", "Request") + + +@@ -66,11 +90,18 @@ if TYPE_CHECKING: + _T = TypeVar("_T") + + ++# Multipart file parts are buffered in memory and only spilled to a temporary ++# file once they outgrow this size. A temp file per part would let a body made ++# of many tiny parts exhaust the process's file descriptors; spooling bounds ++# that at ``client_max_size // _FILE_SPOOL_MAX_SIZE`` descriptors per request. ++_FILE_SPOOL_MAX_SIZE: Final[int] = 1024**2 ++ ++ + @attr.s(auto_attribs=True, frozen=True, slots=True) + class FileField: + name: str + filename: str +- file: io.BufferedReader ++ file: IO[bytes] + content_type: str + headers: CIMultiDictProxy[str] + +@@ -754,8 +785,13 @@ class BaseRequest(MutableMapping[str | RequestKey[Any], Any], HeadersMixin): + multipart = await self.multipart() + max_size = self._client_max_size + +- size = 0 ++ payload = self._payload + while (field := await multipart.next()) is not None: ++ # This check is needed for empty payloads, which still add ++ # overhead without entering the loop and the check below. ++ if 0 < max_size < payload.total_bytes: ++ raise HTTPRequestEntityTooLarge(max_size) ++ + field_ct = field.headers.get(hdrs.CONTENT_TYPE) + + if isinstance(field, BodyPartReader): +@@ -767,20 +803,35 @@ class BaseRequest(MutableMapping[str | RequestKey[Any], Any], HeadersMixin): + # present. + # https://tools.ietf.org/html/rfc7578#section-4.4 + if field.filename: +- # store file in temp file +- tmp = await self._loop.run_in_executor( +- None, tempfile.TemporaryFile +- ) ++ tmp = SpooledTemporaryFile(_FILE_SPOOL_MAX_SIZE) ++ # rolled means the temp file now uses the disk, at ++ # which point we want to run in the executor. ++ rolled = False + while chunk := await field.read_chunk(size=DEFAULT_CHUNK_SIZE): ++ # Bounds one part, mid-read. ++ if 0 < max_size < payload.total_bytes: ++ if rolled: ++ await self._loop.run_in_executor(None, tmp.close) ++ else: ++ tmp.close() ++ raise HTTPRequestEntityTooLarge(max_size) + async for decoded_chunk in field.decode_iter(chunk): +- await self._loop.run_in_executor( +- None, tmp.write, decoded_chunk ++ # Update before writing, so we know if next ++ # write is going to hit the disk. ++ rolled = rolled or ( ++ tmp.tell() + len(decoded_chunk) ++ > _FILE_SPOOL_MAX_SIZE + ) +- size += len(decoded_chunk) +- if 0 < max_size < size: +- await self._loop.run_in_executor(None, tmp.close) +- raise HTTPRequestEntityTooLarge(max_size) +- await self._loop.run_in_executor(None, tmp.seek, 0) ++ if rolled: ++ await self._loop.run_in_executor( ++ None, tmp.write, decoded_chunk ++ ) ++ else: ++ tmp.write(decoded_chunk) ++ if rolled: ++ await self._loop.run_in_executor(None, tmp.seek, 0) ++ else: ++ tmp.seek(0) + + if field_ct is None: + field_ct = "application/octet-stream" +@@ -788,7 +839,7 @@ class BaseRequest(MutableMapping[str | RequestKey[Any], Any], HeadersMixin): + ff = FileField( + field.name, + field.filename, +- cast(io.BufferedReader, tmp), ++ tmp, + field_ct, + field.headers, + ) +@@ -797,8 +848,7 @@ class BaseRequest(MutableMapping[str | RequestKey[Any], Any], HeadersMixin): + # deal with ordinary data + raw_data = bytearray() + while chunk := await field.read_chunk(): +- size += len(chunk) +- if 0 < max_size < size: ++ if 0 < max_size < payload.total_bytes: + raise HTTPRequestEntityTooLarge(max_size) + raw_data.extend(chunk) + +@@ -865,10 +915,7 @@ class BaseRequest(MutableMapping[str | RequestKey[Any], Any], HeadersMixin): + if self._post is None or self.content_type != "multipart/form-data": + return + +- # NOTE: Release file descriptors for the +- # NOTE: `tempfile.Temporaryfile`-created `_io.BufferedRandom` +- # NOTE: instances of files sent within multipart request body +- # NOTE: via HTTP POST request. ++ # Release the temp files created within multipart request body. + for file_name, file_field_object in self._post.items(): + if isinstance(file_field_object, FileField): + file_field_object.file.close() +diff --git a/tests/test_web_functional.py b/tests/test_web_functional.py +index d126347aa..78304a72c 100644 +--- a/tests/test_web_functional.py ++++ b/tests/test_web_functional.py +@@ -1,6 +1,8 @@ + import asyncio ++import base64 + import io + import json ++import os + import pathlib + import socket + import sys +@@ -31,6 +33,7 @@ from aiohttp.pytest_plugin import AiohttpClient, AiohttpServer + from aiohttp.streams import StreamReader + from aiohttp.typedefs import Handler + from aiohttp.web_protocol import MAX_MSG_QUEUE_SIZE, RequestHandler ++from aiohttp.web_request import _FILE_SPOOL_MAX_SIZE + + try: + import brotlicffi as brotli +@@ -2072,8 +2075,167 @@ async def test_post_max_client_size_for_file(aiohttp_client) -> None: + await resp.release() + + +-async def test_response_with_bodypart(aiohttp_client) -> None: +- async def handler(request): ++def _multipart_file_parts(count: int, body: bytes = b"") -> bytes: ++ """Raw multipart/form-data body of ``count`` file parts, boundary ``b``.""" ++ return ( ++ b"".join( ++ b'--b\r\nContent-Disposition: form-data; name="f%d"; ' ++ b'filename="x"\r\n\r\n' % index + body + b"\r\n" ++ for index in range(count) ++ ) ++ + b"--b--\r\n" ++ ) ++ ++ ++async def test_post_max_client_size_counts_multipart_headers( ++ aiohttp_client: AiohttpClient, ++) -> None: ++ async def handler(request: web.Request) -> NoReturn: ++ await request.post() ++ assert False ++ ++ app = web.Application(client_max_size=1) ++ app.router.add_post("/", handler) ++ client = await aiohttp_client(app) ++ ++ body = _multipart_file_parts(55) ++ assert len(body) > 1 ++ async with client.post( ++ "/", data=body, headers={CONTENT_TYPE: "multipart/form-data; boundary=b"} ++ ) as resp: ++ assert resp.status == 413 ++ ++ [email protected]( ++ "max_size", ++ (_FILE_SPOOL_MAX_SIZE, 2 * _FILE_SPOOL_MAX_SIZE), ++ ids=("spooled", "rolled-over"), ++) ++async def test_post_max_client_size_within_single_part( ++ aiohttp_client: AiohttpClient, max_size: int ++) -> None: ++ async def handler(request: web.Request) -> NoReturn: ++ await request.post() ++ assert False ++ ++ app = web.Application(client_max_size=max_size) ++ app.router.add_post("/", handler) ++ client = await aiohttp_client(app) ++ ++ # A sole oversized part is never followed by a boundary, so only the ++ # per-chunk check can reject it, and it must do so before buffering. The ++ # larger limit lets the part reach the disk first, so the spool is then ++ # closed off the event loop too. ++ data = FormData() ++ with io.BytesIO(b"x" * (3 * _FILE_SPOOL_MAX_SIZE)) as file_handle: ++ data.add_field("file", file_handle, filename="x.bin") ++ async with client.post("/", data=data) as resp: ++ assert resp.status == 413 ++ ++ [email protected]("filename", (b"", b'; filename="x"'), ids=("field", "file")) ++async def test_post_max_client_size_counts_undecoded_bytes( ++ aiohttp_client: AiohttpClient, filename: bytes ++) -> None: ++ async def handler(request: web.Request) -> NoReturn: ++ await request.post() ++ assert False ++ ++ limit = 64 * 1024 ++ app = web.Application(client_max_size=limit) ++ app.router.add_post("/", handler) ++ client = await aiohttp_client(app) ++ ++ # base64 decodes to exactly the limit but arrives 4/3 larger. The limit is ++ # on the request body, so both kinds of part must reject it alike. ++ encoded = base64.b64encode(b"A" * limit) ++ assert len(encoded) > limit ++ body = ( ++ b'--b\r\nContent-Disposition: form-data; name="f"' + filename + b"\r\n" ++ b"Content-Transfer-Encoding: base64\r\n\r\n" + encoded + b"\r\n--b--\r\n" ++ ) ++ async with client.post( ++ "/", data=body, headers={CONTENT_TYPE: "multipart/form-data; boundary=b"} ++ ) as resp: ++ assert resp.status == 413 ++ ++ [email protected](not os.path.isdir("/dev/fd"), reason="needs /dev/fd to count fds") [email protected]( ++ ("parts", "part_body", "expected_fds"), ++ ( ++ (55, b"payload", 0), ++ (1, b"x" * (_FILE_SPOOL_MAX_SIZE + 1), 1), ++ ), ++ ids=("many-small-parts", "one-oversized-part"), ++) ++async def test_post_file_fields_descriptor_cost( ++ aiohttp_client: AiohttpClient, parts: int, part_body: bytes, expected_fds: int ++) -> None: ++ """Only a part past the spool size may cost a descriptor.""" ++ ++ async def handler(request: web.Request) -> web.Response: ++ before = set(await asyncio.to_thread(os.listdir, "/dev/fd")) ++ data = await request.post() ++ after = set(await asyncio.to_thread(os.listdir, "/dev/fd")) ++ assert len(data) == parts ++ return web.Response(text=str(len(after - before))) ++ ++ app = web.Application(client_max_size=8 * 1024**2) ++ app.router.add_post("/", handler) ++ client = await aiohttp_client(app) ++ ++ with io.BytesIO(_multipart_file_parts(parts, part_body)) as body: ++ async with client.post( ++ "/", ++ data=body, ++ headers={CONTENT_TYPE: "multipart/form-data; boundary=b"}, ++ ) as resp: ++ assert resp.status == 200 ++ assert await resp.text() == str(expected_fds) ++ ++ [email protected]( ++ "size", ++ ( ++ 0, ++ 1, ++ _FILE_SPOOL_MAX_SIZE - 1, ++ _FILE_SPOOL_MAX_SIZE, ++ _FILE_SPOOL_MAX_SIZE + 1, ++ ), ++) ++async def test_post_file_field_spool_rollover( ++ aiohttp_client: AiohttpClient, size: int ++) -> None: ++ """A part is byte-identical either side of the spool/temp-file boundary.""" ++ payload = (b"0123456789abcdef" * (size // 16 + 1))[:size] ++ ++ async def handler(request: web.Request) -> web.Response: ++ field = (await request.post())["file"] ++ assert isinstance(field, aiohttp.web_request.FileField) ++ assert isinstance(field.file, io.IOBase) ++ assert field.file.readable() ++ assert field.file.writable() ++ assert field.file.seekable() ++ content = await asyncio.to_thread(field.file.read) ++ assert len(content) == size ++ assert content == payload ++ return web.Response() ++ ++ app = web.Application(client_max_size=8 * 1024**2) ++ app.router.add_post("/", handler) ++ client = await aiohttp_client(app) ++ ++ data = FormData() ++ with io.BytesIO(payload) as file_handle: ++ data.add_field("file", file_handle, filename="x.bin") ++ async with client.post("/", data=data) as resp: ++ assert resp.status == 200 ++ ++ ++async def test_response_with_bodypart(aiohttp_client: AiohttpClient) -> None: ++ async def handler(request: web.Request) -> web.Response: + reader = await request.multipart() + part = await reader.next() + return web.Response(body=part)
meta-python/recipes-devtools/python/python3-aiohttp_3.14.3.bb +1 -0
@@ -8,6 +8,7 @@ SRC_URI[sha256sum] = "9491196535a88924a60afd5b5f434b5b203b6cc616250878dbdb223a8f SRC_URI += "file://CVE-2026-111063.patch \ file://CVE-2026-111065.patch \ + file://CVE-2026-111066.patch \ " CVE_PRODUCT = "aiohttp:aiohttp"
PATCH 13/16 python3-aiohttp: patch CVE-2026-111748
In reply to [email protected]From: Ankur Tyagi <[email protected]>
Details:
https://nvd.nist.gov/vuln/detail/cve-2026-111748
--- .../python3-aiohttp/CVE-2026-111748.patch | 170 ++++++++++++++++++ .../python/python3-aiohttp_3.14.3.bb | 1 + 2 files changed, 171 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-111748.patch
meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-111748.patch new file +170 -0
@@ -0,0 +1,170 @@ +From 75abab9fcf5382fb46947fe9f53142f6aa60abbc Mon Sep 17 00:00:00 2001 +From: Sam Bull <[email protected]> +Date: Sun, 27 Sep 2026 18:11:00 +0100 +Subject: [PATCH] Use protocol scheme for absolute-form requests (#13821) + (#13827) (#13828) + +(cherry picked from commit a921cfd0fec28d5a9e5bf8d6f4372b8fa63c49df) +(cherry picked from commit 93d91e37e7c6035d09e89646b3de737735ed91b5) +(cherry picked from commit 6d4e7b01f9b951aa084a75d7356e907d4ee80411) + +CVE: CVE-2026-111748 +Upstream-Status: Backport [https://github.com/aio-libs/aiohttp/commit/6d4e7b01f9b951aa084a75d7356e907d4ee80411] + +Dropped tests changes during the backport + +Signed-off-by: Ankur Tyagi <[email protected]> +--- + CHANGES/13821.bugfix.rst | 1 + + aiohttp/_cparser.pxd | 3 ++- + aiohttp/_http_parser.pyx | 29 +++++++++++++++++++++++++---- + aiohttp/http_parser.py | 26 ++++++++++++++++++++++---- + aiohttp/web_request.py | 7 ++++++- + 5 files changed, 56 insertions(+), 10 deletions(-) + create mode 100644 CHANGES/13821.bugfix.rst + +diff --git a/CHANGES/13821.bugfix.rst b/CHANGES/13821.bugfix.rst +new file mode 100644 +index 000000000..f35418d2d +--- /dev/null ++++ b/CHANGES/13821.bugfix.rst +@@ -0,0 +1 @@ ++Fixed the web server trusting the scheme of an absolute-form request-target -- by :user:`Dreamsorcerer`. +diff --git a/aiohttp/_cparser.pxd b/aiohttp/_cparser.pxd +index 903f35c45..3a427002d 100644 +--- a/aiohttp/_cparser.pxd ++++ b/aiohttp/_cparser.pxd +@@ -67,7 +67,8 @@ cdef extern from "llhttp.h": + HTTP_RESPONSE + + enum llhttp_method: +- HTTP_CONNECT ++ HTTP_CONNECT, ++ HTTP_OPTIONS + + void llhttp_settings_init(llhttp_settings_t* settings) + void llhttp_init(llhttp_t* parser, llhttp_type type, +diff --git a/aiohttp/_http_parser.pyx b/aiohttp/_http_parser.pyx +index 0fe6084e5..4660a0c90 100644 +--- a/aiohttp/_http_parser.pyx ++++ b/aiohttp/_http_parser.pyx +@@ -722,12 +722,20 @@ cdef class HttpRequestParser(HttpParser): + return + self._path = self._buf.decode('utf-8', 'surrogateescape') + try: +- idx3 = len(self._path) + if self._cparser.method == cparser.HTTP_CONNECT: + # authority-form, + # https://datatracker.ietf.org/doc/html/rfc7230#section-5.3.3 +- self._url = URL.build(authority=self._path, encoded=True) +- elif idx3 > 1 and self._path[0] == '/': ++ try: ++ self._url = URL.build(authority=self._path, encoded=True) ++ host = self._url.raw_host ++ except ValueError: ++ host = None ++ if host is None: ++ raise InvalidURLError( ++ self._path.encode(errors="surrogateescape") ++ .decode("latin1") ++ ) ++ elif self._path[0] == '/': + # origin-form, + # https://datatracker.ietf.org/doc/html/rfc7230#section-5.3.1 + idx1 = self._path.find("?") +@@ -758,10 +766,23 @@ cdef class HttpRequestParser(HttpParser): + fragment=fragment, + encoded=True, + ) ++ elif self._path == '*' and self._cparser.method == cparser.HTTP_OPTIONS: ++ # asterisk-form, ++ self._url = URL(self._path, encoded=True) + else: + # absolute-form for proxy maybe, + # https://datatracker.ietf.org/doc/html/rfc7230#section-5.3.2 +- self._url = URL(self._path, encoded=True) ++ try: ++ self._url = URL(self._path, encoded=True) ++ host = self._url.raw_host ++ except ValueError: ++ host = None ++ # https://www.rfc-editor.org/rfc/rfc9110#section-4.2.1-4 ++ if host is None: ++ raise InvalidURLError( ++ self._path.encode(errors="surrogateescape") ++ .decode("latin1") ++ ) + finally: + PyByteArray_Resize(self._buf, 0) + +diff --git a/aiohttp/http_parser.py b/aiohttp/http_parser.py +index 0c9fd086b..678aee020 100644 +--- a/aiohttp/http_parser.py ++++ b/aiohttp/http_parser.py +@@ -685,7 +685,18 @@ class HttpRequestParser(HttpParser[RawRequestMessage]): + if method == "CONNECT": + # authority-form, + # https://datatracker.ietf.org/doc/html/rfc7230#section-5.3.3 +- url = URL.build(authority=path, encoded=True) ++ try: ++ url = URL.build(authority=path, encoded=True) ++ host = url.raw_host ++ except ValueError: ++ # Duplicated so mypy understands that url must be defined below. ++ raise InvalidURLError( ++ path.encode(errors="surrogateescape").decode("latin1") ++ ) ++ if host is None: ++ raise InvalidURLError( ++ path.encode(errors="surrogateescape").decode("latin1") ++ ) + elif path.startswith("/"): + # origin-form, + # https://datatracker.ietf.org/doc/html/rfc7230#section-5.3.1 +@@ -708,9 +719,16 @@ class HttpRequestParser(HttpParser[RawRequestMessage]): + else: + # absolute-form for proxy maybe, + # https://datatracker.ietf.org/doc/html/rfc7230#section-5.3.2 +- url = URL(path, encoded=True) +- if url.scheme == "": +- # not absolute-form ++ try: ++ url = URL(path, encoded=True) ++ host = url.raw_host ++ except ValueError: ++ # Duplicated so mypy understands that url must be defined below. ++ raise InvalidURLError( ++ path.encode(errors="surrogateescape").decode("latin1") ++ ) ++ # https://www.rfc-editor.org/rfc/rfc9110#section-4.2.1-4 ++ if host is None: + raise InvalidURLError( + path.encode(errors="surrogateescape").decode("latin1") + ) +diff --git a/aiohttp/web_request.py b/aiohttp/web_request.py +index eaed708eb..5f6c92333 100644 +--- a/aiohttp/web_request.py ++++ b/aiohttp/web_request.py +@@ -196,8 +196,14 @@ class BaseRequest(MutableMapping[str | RequestKey[Any], Any], HeadersMixin): + self._cache: dict[str, Any] = {} + url = message.url + if url.absolute: ++ if scheme is None and url.scheme: ++ # Absolute URL is peer-controlled, use the protocol. ++ scheme = "https" if protocol.ssl_context else "http" + if scheme is not None: ++ # Authority-form (CONNECT) has no scheme: leave the target ++ # unchanged unless clone(scheme=...) overrides it. + url = url.with_scheme(scheme) ++ self._cache["scheme"] = scheme + if host is not None: + url = url.with_host(host) + # absolute URL is given, +@@ -205,7 +211,6 @@ class BaseRequest(MutableMapping[str | RequestKey[Any], Any], HeadersMixin): + # all other properties should be good + self._cache["url"] = url + self._cache["host"] = url.host +- self._cache["scheme"] = url.scheme + self._rel_url = url.relative() + else: + self._rel_url = url
meta-python/recipes-devtools/python/python3-aiohttp_3.14.3.bb +1 -0
@@ -9,6 +9,7 @@ SRC_URI[sha256sum] = "9491196535a88924a60afd5b5f434b5b203b6cc616250878dbdb223a8f SRC_URI += "file://CVE-2026-111063.patch \ file://CVE-2026-111065.patch \ file://CVE-2026-111066.patch \ + file://CVE-2026-111748.patch \ " CVE_PRODUCT = "aiohttp:aiohttp"
PATCH 14/16 python3-aiohttp: patch CVE-2026-111749
In reply to [email protected]From: Ankur Tyagi <[email protected]>
Details:
https://nvd.nist.gov/vuln/detail/cve-2026-111749
--- .../python3-aiohttp/CVE-2026-111749.patch | 262 ++++++++++++++++++ .../python/python3-aiohttp_3.14.3.bb | 1 + 2 files changed, 263 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-111749.patch
meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-111749.patch new file +262 -0
@@ -0,0 +1,262 @@ +From 66405536d4410c7456a52d2b6780e827f4e56d44 Mon Sep 17 00:00:00 2001 +From: Sam Bull <[email protected]> +Date: Wed, 9 Sep 2026 02:21:06 +0100 +Subject: [PATCH] Fix host-only state on cookie expiration (#13674) (#13676) + +(cherry picked from commit 9332972cfcb0f5a2b6677e7307819ab8f13b5d09) +(cherry picked from commit 6a07c171ef9f3be583e2907dcd1931372efca8d6) + +CVE: CVE-2026-111749 +Upstream-Status: Backport [https://github.com/aio-libs/aiohttp/commit/6a07c171ef9f3be583e2907dcd1931372efca8d6] + +Signed-off-by: Ankur Tyagi <[email protected]> +--- + CHANGES/13674.bugfix.rst | 1 + + aiohttp/abc.py | 2 +- + aiohttp/cookiejar.py | 29 ++++++++-------- + docs/client_reference.rst | 10 ++++-- + tests/test_client_session.py | 2 +- + tests/test_cookiejar.py | 64 ++++++++++++++++++++++++++++++++++-- + 6 files changed, 89 insertions(+), 19 deletions(-) + create mode 100644 CHANGES/13674.bugfix.rst + +diff --git a/CHANGES/13674.bugfix.rst b/CHANGES/13674.bugfix.rst +new file mode 100644 +index 000000000..5152bceae +--- /dev/null ++++ b/CHANGES/13674.bugfix.rst +@@ -0,0 +1 @@ ++Fixed host-only cookie state being lost on expiration -- by :user:`Dreamsorcerer`. +diff --git a/aiohttp/abc.py b/aiohttp/abc.py +index b67287318..74ca7216e 100644 +--- a/aiohttp/abc.py ++++ b/aiohttp/abc.py +@@ -181,7 +181,7 @@ class AbstractCookieJar(Sized, IterableBase): + + @property + @abstractmethod +- def host_only_cookies(self) -> frozenset[tuple[str, str]]: ++ def host_only_cookies(self) -> frozenset[tuple[str, str, str]]: + """Return the host-only cookies stored in this jar.""" + + @abstractmethod +diff --git a/aiohttp/cookiejar.py b/aiohttp/cookiejar.py +index b949cc118..1af02144e 100644 +--- a/aiohttp/cookiejar.py ++++ b/aiohttp/cookiejar.py +@@ -134,7 +134,8 @@ class CookieJar(AbstractCookieJar): + self._morsel_cache: defaultdict[tuple[str, str], dict[str, Morsel[str]]] = ( + defaultdict(dict) + ) +- self._host_only_cookies: set[tuple[str, str]] = set() ++ # Cookie identity is (domain, path, name). ++ self._host_only_cookies: set[tuple[str, str, str]] = set() + self._unsafe = unsafe + self._quote_cookie = quote_cookie + if treat_as_secure_origin is None: +@@ -166,7 +167,7 @@ class CookieJar(AbstractCookieJar): + return MappingProxyType(self._cookies) + + @property +- def host_only_cookies(self) -> frozenset[tuple[str, str]]: ++ def host_only_cookies(self) -> frozenset[tuple[str, str, str]]: + """Return the host-only cookies stored in this jar.""" + return frozenset(self._host_only_cookies) + +@@ -195,7 +196,7 @@ class CookieJar(AbstractCookieJar): + if attr_val: + morsel_data[attr] = attr_val + # Persist or it reloads as a domain cookie and leaks to subdomains. +- if (domain, name) in self._host_only_cookies: ++ if (domain, path, name) in self._host_only_cookies: + morsel_data["host_only"] = True + if (exp := self._expirations.get((domain, path, name))) is not None: + morsel_data["expires_timestamp"] = exp +@@ -358,7 +359,7 @@ class CookieJar(AbstractCookieJar): + + def _delete_cookies(self, to_del: list[tuple[str, str, str]]) -> None: + for domain, path, name in to_del: +- self._host_only_cookies.discard((domain, name)) ++ self._host_only_cookies.discard((domain, path, name)) + self._cookies[(domain, path)].pop(name, None) + self._morsel_cache[(domain, path)].pop(name, None) + self._expirations.pop((domain, path, name), None) +@@ -395,18 +396,12 @@ class CookieJar(AbstractCookieJar): + domain = "" + del cookie["domain"] + +- if not domain and hostname is not None: +- # Set the cookie's domain to the response hostname +- # and set its host-only-flag +- self._host_only_cookies.add((hostname, name)) +- domain = cookie["domain"] = hostname +- + if domain and domain[0] == ".": + # Remove leading dot + domain = domain[1:] + cookie["domain"] = domain + +- if hostname and not self._is_domain_match(domain, hostname): ++ if domain and hostname and not self._is_domain_match(domain, hostname): + # Setting cookies for different domains is not allowed + continue + +@@ -422,6 +417,14 @@ class CookieJar(AbstractCookieJar): + cookie["path"] = path + path = path.rstrip("/") + ++ if not domain and hostname is not None: ++ self._host_only_cookies.add((hostname, path, name)) ++ domain = cookie["domain"] = hostname ++ else: ++ # A cookie with an explicit Domain attribute replaces any ++ # host-only cookie with the same (domain, path, name) identity. ++ self._host_only_cookies.discard((domain, path, name)) ++ + if max_age := cookie["max-age"]: + try: + delta_seconds = int(max_age) +@@ -522,7 +525,7 @@ class CookieJar(AbstractCookieJar): + for name, cookie in self._cookies[p].items(): + domain = cookie["domain"] + +- if (domain, name) in self._host_only_cookies and domain != hostname: ++ if domain != hostname and p + (name,) in self._host_only_cookies: + continue + + # Skip edge case when the cookie has a trailing slash but request doesn't. +@@ -672,7 +675,7 @@ class DummyCookieJar(AbstractCookieJar): + return MappingProxyType({}) + + @property +- def host_only_cookies(self) -> frozenset[tuple[str, str]]: ++ def host_only_cookies(self) -> frozenset[tuple[str, str, str]]: + """Return an empty frozenset.""" + return frozenset() + +diff --git a/docs/client_reference.rst b/docs/client_reference.rst +index a237fb64b..476e6e81f 100644 +--- a/docs/client_reference.rst ++++ b/docs/client_reference.rst +@@ -2611,11 +2611,17 @@ Utilities + + .. attribute:: host_only_cookies + +- A :class:`frozenset` of ``(domain, name)`` tuples indicating which +- cookies are host-only (not sent to subdomains). ++ A :class:`frozenset` of ``(domain, path, name)`` tuples indicating ++ which cookies are host-only (not sent to subdomains). + + .. versionadded:: 3.14 + ++ .. versionchanged:: 3.14.4 ++ ++ The tuples gained the *path* element; host-only state is tracked ++ per ``(domain, path, name)`` cookie identity so that same-named ++ cookies on other paths cannot affect it. ++ + + .. class:: DummyCookieJar(*, loop=None) + +diff --git a/tests/test_client_session.py b/tests/test_client_session.py +index 6b3516879..4481a4bf8 100644 +--- a/tests/test_client_session.py ++++ b/tests/test_client_session.py +@@ -758,7 +758,7 @@ async def test_cookie_jar_usage(loop: Any, aiohttp_client: Any) -> None: + return MappingProxyType({}) + + @property +- def host_only_cookies(self) -> frozenset[tuple[str, str]]: ++ def host_only_cookies(self) -> frozenset[tuple[str, str, str]]: + return frozenset() + + def clear(self, predicate: abc.ClearCookiePredicate | None = None) -> None: +diff --git a/tests/test_cookiejar.py b/tests/test_cookiejar.py +index be6da2a5f..4fd2959e1 100644 +--- a/tests/test_cookiejar.py ++++ b/tests/test_cookiejar.py +@@ -878,7 +878,45 @@ async def test_cookie_jar_host_only_cookies_property() -> None: + + host_only = jar.host_only_cookies + assert isinstance(host_only, frozenset) +- assert ("example.com", "hostonly") in host_only ++ assert ("example.com", "", "hostonly") in host_only ++ ++ ++async def test_host_only_marker_survives_same_name_expiry_on_other_path() -> None: ++ """Expiring a same-name cookie on another path must not clear host-only state.""" ++ jar = CookieJar() ++ origin = URL("http://auth.example.com/") ++ subdomain = URL("http://evil.auth.example.com/") ++ ++ jar.update_cookies_from_headers(["sid=secret; Path=/"], origin) ++ assert "sid" not in jar.filter_cookies(subdomain) ++ ++ # Attacker-controlled descendant expires a same-name cookie on its own path. ++ jar.update_cookies_from_headers( ++ ["sid=gone; Domain=auth.example.com; Path=/attacker; Max-Age=0"], ++ subdomain, ++ ) ++ ++ assert ("auth.example.com", "", "sid") in jar.host_only_cookies ++ assert "sid" not in jar.filter_cookies(subdomain) ++ assert jar.filter_cookies(origin)["sid"].value == "secret" ++ ++ ++async def test_explicit_domain_replacement_clears_host_only_marker() -> None: ++ """A replacing cookie with an explicit Domain is a domain cookie.""" ++ jar = CookieJar() ++ origin = URL("http://example.com/") ++ subdomain = URL("http://sub.example.com/") ++ ++ jar.update_cookies_from_headers(["sid=hostonly; Path=/"], origin) ++ assert ("example.com", "", "sid") in jar.host_only_cookies ++ assert "sid" not in jar.filter_cookies(subdomain) ++ ++ jar.update_cookies_from_headers( ++ ["sid=domainwide; Domain=example.com; Path=/"], origin ++ ) ++ ++ assert jar.host_only_cookies == frozenset() ++ assert jar.filter_cookies(subdomain)["sid"].value == "domainwide" + + + async def test_cookie_jar_cookies_property_immutable() -> None: +@@ -1857,7 +1895,7 @@ async def test_save_load_json_preserves_host_only_scope(tmp_path: Path) -> None: + jar_load = CookieJar() + jar_load.load(file_path=file_path) + +- assert jar_load.host_only_cookies == frozenset({("auth.example.com", "sid")}) ++ assert jar_load.host_only_cookies == frozenset({("auth.example.com", "", "sid")}) + assert "sid" not in jar_load.filter_cookies(subdomain) + assert "sid" in jar_load.filter_cookies(issuer) + +@@ -1882,6 +1920,28 @@ async def test_save_load_json_domain_cookie_still_matches_subdomain( + assert "sid" in jar_load.filter_cookies(subdomain) + + ++async def test_save_load_json_host_only_per_path(tmp_path: Path) -> None: ++ """Verify save/load keeps host-only state per (domain, path, name).""" ++ file_path = tmp_path / "per_path.json" ++ origin = URL("https://example.com/") ++ subdomain = URL("https://sub.example.com/") ++ ++ jar_save = CookieJar() ++ jar_save.update_cookies_from_headers( ++ ["sid=hostonly; Path=/", "sid=domainwide; Domain=example.com; Path=/api"], ++ origin, ++ ) ++ jar_save.save(file_path=file_path) ++ ++ jar_load = CookieJar() ++ jar_load.load(file_path=file_path) ++ ++ assert jar_load.host_only_cookies == frozenset({("example.com", "", "sid")}) ++ assert "sid" not in jar_load.filter_cookies(subdomain) ++ filtered = jar_load.filter_cookies(URL("https://sub.example.com/api/x")) ++ assert filtered["sid"].value == "domainwide" ++ ++ + async def test_save_load_json_preserves_max_age_deadline(tmp_path: Path) -> None: + """Verify save/load restores the absolute deadline without resetting it.""" + file_path = tmp_path / "max_age.json"
meta-python/recipes-devtools/python/python3-aiohttp_3.14.3.bb +1 -0
@@ -10,6 +10,7 @@ SRC_URI += "file://CVE-2026-111063.patch \ file://CVE-2026-111065.patch \ file://CVE-2026-111066.patch \ file://CVE-2026-111748.patch \ + file://CVE-2026-111749.patch \ " CVE_PRODUCT = "aiohttp:aiohttp"
PATCH 15/16 python3-aiohttp: patch CVE-2026-111750
In reply to [email protected]From: Ankur Tyagi <[email protected]>
Details:
https://nvd.nist.gov/vuln/detail/cve-2026-111750
--- .../python3-aiohttp/CVE-2026-111750.patch | 82 +++++++++++++++++++ .../python/python3-aiohttp_3.14.3.bb | 1 + 2 files changed, 83 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-111750.patch
meta-python/recipes-devtools/python/python3-aiohttp/CVE-2026-111750.patch new file +82 -0
@@ -0,0 +1,82 @@ +From 18e23a890422e952b0fdbf09e02794adda56c120 Mon Sep 17 00:00:00 2001 +From: Sam Bull <[email protected]> +Date: Wed, 9 Sep 2026 01:25:13 +0100 +Subject: [PATCH] Fix head request parsing (#13671) (#13673) + +(cherry picked from commit 5789546e37fe35af27d0a2f840870b22bc15bfc4) +(cherry picked from commit 9b27347e61454d9f8ca2055f4c67a37dee336e83) + +CVE: CVE-2026-111750 +Upstream-Status: Backport [https://github.com/aio-libs/aiohttp/commit/9b27347e61454d9f8ca2055f4c67a37dee336e83] + +Signed-off-by: Ankur Tyagi <[email protected]> +--- + CHANGES/13671.bugfix.rst | 1 + + aiohttp/http_parser.py | 6 +++++- + tests/test_http_parser.py | 27 ++++++++++++++++++++++++++- + 3 files changed, 32 insertions(+), 2 deletions(-) + create mode 100644 CHANGES/13671.bugfix.rst + +diff --git a/CHANGES/13671.bugfix.rst b/CHANGES/13671.bugfix.rst +new file mode 100644 +index 000000000..e6fbc7000 +--- /dev/null ++++ b/CHANGES/13671.bugfix.rst +@@ -0,0 +1 @@ ++Fixed pure-Python request parser not reading a body in a ``HEAD`` request -- by :user:`Dreamsorcerer`. +diff --git a/aiohttp/http_parser.py b/aiohttp/http_parser.py +index 678aee020..947060c9a 100644 +--- a/aiohttp/http_parser.py ++++ b/aiohttp/http_parser.py +@@ -433,8 +433,12 @@ class HttpParser(abc.ABC, Generic[_MsgT]): + + assert self.protocol is not None + # calculate payload ++ # https://www.rfc-editor.org/info/rfc9112/#name-message-body-length ++ # https://www.rfc-editor.org/info/rfc9110/#section-9.3.1-6 ++ # EMPTY_BODY_METHODS should only apply to responses. ++ # self.method is None on request parser. + empty_body = code in EMPTY_BODY_STATUS_CODES or bool( +- method and method in EMPTY_BODY_METHODS ++ self.method and self.method in EMPTY_BODY_METHODS + ) + if not empty_body and ( + (length is not None and length > 0) or msg.chunked +diff --git a/tests/test_http_parser.py b/tests/test_http_parser.py +index fcc1b6018..e9d40532b 100644 +--- a/tests/test_http_parser.py ++++ b/tests/test_http_parser.py +@@ -2181,7 +2181,32 @@ def test_http_request_chunked_payload_and_next_message(parser) -> None: + assert not payload2.is_eof() + + +-def test_http_request_chunked_payload_chunks(parser) -> None: ++def test_http_request_parser_head_with_content_length_payload( ++ parser: HttpRequestParser, ++) -> None: ++ smuggled = b"GET /smuggled HTTP/1.1\r\nHost: a\r\n\r\n" ++ text = ( ++ b"HEAD /test HTTP/1.1\r\nHost: a\r\nContent-Length: %d\r\n\r\n" % len(smuggled) ++ + smuggled ++ + b"POST /next HTTP/1.1\r\nHost: a\r\nContent-Length: 0\r\n\r\n" ++ ) ++ messages, upgraded, tail = parser.feed_data(text) ++ ++ assert len(messages) == 2 ++ msg, payload = messages[0] ++ assert msg.method == "HEAD" ++ assert b"".join(payload._buffer) == smuggled ++ assert payload.is_eof() ++ ++ msg2, payload2 = messages[1] ++ assert msg2.method == "POST" ++ assert msg2.path == "/next" ++ assert payload2.is_eof() ++ assert not upgraded ++ assert not tail ++ ++ ++def test_http_request_chunked_payload_chunks(parser: HttpRequestParser) -> None: + text = b"GET /test HTTP/1.1\r\nHost: a\r\ntransfer-encoding: chunked\r\n\r\n" + msg, payload = parser.feed_data(text)[0][0] +
meta-python/recipes-devtools/python/python3-aiohttp_3.14.3.bb +1 -0
@@ -11,6 +11,7 @@ SRC_URI += "file://CVE-2026-111063.patch \ file://CVE-2026-111066.patch \ file://CVE-2026-111748.patch \ file://CVE-2026-111749.patch \ + file://CVE-2026-111750.patch \ " CVE_PRODUCT = "aiohttp:aiohttp"
PATCH 16/16 python3-filelock: upgrade 4.0.4 -> 4.0.12
In reply to [email protected]From: Ankur Tyagi <[email protected]>
Changelog:
https://py-filelock.readthedocs.io/en/latest/changelog.html#release-4-0-5
https://py-filelock.readthedocs.io/en/latest/changelog.html#release-4-0-6
https://py-filelock.readthedocs.io/en/latest/changelog.html#release-4-0-7
https://py-filelock.readthedocs.io/en/latest/changelog.html#release-4-0-8
https://py-filelock.readthedocs.io/en/latest/changelog.html#release-4-0-9
https://py-filelock.readthedocs.io/en/latest/changelog.html#release-4-0-10
https://py-filelock.readthedocs.io/en/latest/changelog.html#release-4-0-11
https://py-filelock.readthedocs.io/en/latest/changelog.html#release-4-0-12
---
.../{python3-filelock_4.0.4.bb => python3-filelock_4.0.12.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta-python/recipes-devtools/python/{python3-filelock_4.0.4.bb => python3-filelock_4.0.12.bb} (93%)meta-python/recipes-devtools/python/python3-filelock_4.0.12.bb renamed from meta-python/recipes-devtools/python/python3-filelock_4.0.4.bb +1 -1
@@ -9,7 +9,7 @@ CVE_PRODUCT = "tox-dev:filelock" SRC_URI += "file://run-ptest" -SRC_URI[sha256sum] = "90999ed63a26ccf86b93b959ab10cf1017f422d816be454ed54cbed263e71ab5" +SRC_URI[sha256sum] = "cf42711a7ac791818b299fab0332a088c65aeeefa36290de98db92c434303b0c" BBCLASSEXTEND = "native nativesdk"