Skip to contentSkip to conversation

python3-twisted: Fix CVE-2024-41671

PATCH New ssambu 1 participant 1 message Apr 23, 2025

lore
Share & tools
lore

ssambu

author
#0 lore raw

PATCH 1/1 python3-twisted: Fix CVE-2024-41671

From: Soumya Sambu <[email protected]>

Twisted is an event-based framework for internet applications, supporting Python 3.6+. The HTTP 1.0 and 1.1 server provided by twisted.web could process pipelined HTTP requests out-of-order, possibly resulting in information disclosure. This vulnerability is fixed in 24.7.0rc1.

References:
https://nvd.nist.gov/vuln/detail/CVE-2024-41671
https://ubuntu.com/security/CVE-2024-41671

Upstream patches:
https://github.com/twisted/twisted/commit/f1cb4e616e9f23b4dd044a6db44365060950c64f
https://github.com/twisted/twisted/commit/ef2c755e9e9d57d58132af790bd2fd2b957b3fb1

---
 .../python3-twisted/CVE-2024-41671-0001.patch |  33 +++
 .../python3-twisted/CVE-2024-41671-0002.patch | 196 ++++++++++++++++++
 .../python/python3-twisted_22.2.0.bb          |   3 +
 3 files changed, 232 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python3-twisted/CVE-2024-41671-0001.patch
 create mode 100644 meta-python/recipes-devtools/python/python3-twisted/CVE-2024-41671-0002.patch
meta-python/recipes-devtools/python/python3-twisted/CVE-2024-41671-0001.patch new file +33 -0
new file mode 100644
index 0000000000..a5bffbd5a5
@@ -0,0 +1,33 @@
+From f1cb4e616e9f23b4dd044a6db44365060950c64f Mon Sep 17 00:00:00 2001
+From: Tom Most <[email protected]>
+Date: Mon, 22 Jul 2024 22:21:10 -0700
+Subject: [PATCH] Use chunking in the pipelining tests
+
+CVE: CVE-2024-41671
+
+Upstream-Status: Backport [https://github.com/twisted/twisted/commit/f1cb4e616e9f23b4dd044a6db44365060950c64f]
+
+Signed-off-by: Soumya Sambu <[email protected]>
+---
+ src/twisted/web/test/test_http.py | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/twisted/web/test/test_http.py b/src/twisted/web/test/test_http.py
+index 7ffea4e..5d88ff1 100644
+--- a/src/twisted/web/test/test_http.py
++++ b/src/twisted/web/test/test_http.py
+@@ -575,9 +575,11 @@ class PipeliningBodyTests(unittest.TestCase, ResponseTestMixin):
+         b"Content-Length: 10\r\n"
+         b"\r\n"
+         b"0123456789POST / HTTP/1.1\r\n"
+-        b"Content-Length: 10\r\n"
++        b"Transfer-Encoding: chunked\r\n"
+         b"\r\n"
++        b"a\r\n"
+         b"0123456789"
++        b"0\r\n"
+     )
+
+     expectedResponses = [
+--
+2.40.0
meta-python/recipes-devtools/python/python3-twisted/CVE-2024-41671-0002.patch new file +196 -0

196 lines not on this page · raw message

meta-python/recipes-devtools/python/python3-twisted_22.2.0.bb +3 -0
index c55c86ea50..da83f0123a 100644
@@ -11,6 +11,9 @@ SRC_URI[sha256sum] = "57f32b1f6838facb8c004c89467840367ad38e9e535f8252091345dba5
 
 PYPI_PACKAGE = "Twisted"
 
+SRC_URI += "file://CVE-2024-41671-0001.patch \
+            file://CVE-2024-41671-0002.patch"
+
 inherit pypi python_setuptools_build_meta
 
 do_install:append() {
Signature · 1 line
2.40.0