summaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python/python3-waitress/CVE-2024-49769-6.patch
diff options
context:
space:
mode:
authorGyorgy Sarvari <skandigraun@gmail.com>2026-01-07 10:27:47 +0100
committerGyorgy Sarvari <skandigraun@gmail.com>2026-01-08 22:03:03 +0100
commit1bd2effd23f752dc53eafb8032c8874fd36f872d (patch)
treeb20559f32d72eb87cc8f3c1c350e93212d209f7d /meta-python/recipes-devtools/python/python3-waitress/CVE-2024-49769-6.patch
parent1ea440cd62d4fc1a0cd4d391bef16cc0ee894458 (diff)
downloadmeta-openembedded-1bd2effd23f752dc53eafb8032c8874fd36f872d.tar.gz
python3-waitress: patch CVE-2024-49769
Details: https://nvd.nist.gov/vuln/detail/CVE-2024-49769 Pick the patch that is referenced in the NVD report (which is a merge commit. The patches here are the individual patches from that merge). Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-waitress/CVE-2024-49769-6.patch')
-rw-r--r--meta-python/recipes-devtools/python/python3-waitress/CVE-2024-49769-6.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-waitress/CVE-2024-49769-6.patch b/meta-python/recipes-devtools/python/python3-waitress/CVE-2024-49769-6.patch
new file mode 100644
index 0000000000..dedfa0d41c
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-waitress/CVE-2024-49769-6.patch
@@ -0,0 +1,41 @@
1From 4a5ce98ecaed785a14781700106d60c4072c9b87 Mon Sep 17 00:00:00 2001
2From: Delta Regeer <bertjw@regeer.org>
3Date: Sun, 3 Mar 2024 16:37:12 -0700
4Subject: [PATCH] When closing the socket, set it to None
5
6This avoids calling close() twice on the same socket if self.close() or
7self.handle_close() is called multiple times
8
9CVE: CVE-2024-49769
10Upstream-Status: Backport [https://github.com/Pylons/waitress/commit/9d99c89ae4aa8449313eea210a5ec9f3994a87b2]
11Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
12---
13 src/waitress/wasyncore.py | 8 +++++++-
14 1 file changed, 7 insertions(+), 1 deletion(-)
15
16diff --git a/src/waitress/wasyncore.py b/src/waitress/wasyncore.py
17index 117f78a..f0cd23e 100644
18--- a/src/waitress/wasyncore.py
19+++ b/src/waitress/wasyncore.py
20@@ -437,6 +437,8 @@ class dispatcher:
21 if why.args[0] not in (ENOTCONN, EBADF):
22 raise
23
24+ self.socket = None
25+
26 # log and log_info may be overridden to provide more sophisticated
27 # logging and warning methods. In general, log is for 'hit' logging
28 # and 'log_info' is for informational, warning and error logging.
29@@ -487,7 +489,11 @@ class dispatcher:
30 # handle_expt_event() is called if there might be an error on the
31 # socket, or if there is OOB data
32 # check for the error condition first
33- err = self.socket.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR)
34+ err = (
35+ self.socket.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR)
36+ if self.socket is not None
37+ else 1
38+ )
39 if err != 0:
40 # we can get here when select.select() says that there is an
41 # exceptional condition on the socket