diff options
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-eventlet')
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-eventlet/CVE-2025-58068.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-eventlet/CVE-2025-58068.patch b/meta-python/recipes-devtools/python/python3-eventlet/CVE-2025-58068.patch new file mode 100644 index 0000000000..3fc7cb1b54 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-eventlet/CVE-2025-58068.patch | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | From 4e151d13a160e4d2a98dc77d32e5c3fe2c42f2b9 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: sebsrt <s@sebsrt.xyz> | ||
| 3 | Date: Mon, 11 Aug 2025 11:46:28 +0200 | ||
| 4 | Subject: [PATCH] Fix request smuggling vulnerability by discarding trailers | ||
| 5 | (#1062) | ||
| 6 | |||
| 7 | The WSGI parser is vulnerable to a request smuggling vulnerability due to not parsing trailer sections of an HTTP request. This patch fix that by discarding trailers. | ||
| 8 | |||
| 9 | CVE: CVE-2025-58068 | ||
| 10 | Upstream-Status: Backport [https://github.com/eventlet/eventlet/commit/0bfebd1117d392559e25b4bfbfcc941754de88fb] | ||
| 11 | Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> | ||
| 12 | --- | ||
| 13 | eventlet/wsgi.py | 8 +++++++- | ||
| 14 | 1 file changed, 7 insertions(+), 1 deletion(-) | ||
| 15 | |||
| 16 | diff --git a/eventlet/wsgi.py b/eventlet/wsgi.py | ||
| 17 | index 7ef0254..fb0d805 100644 | ||
| 18 | --- a/eventlet/wsgi.py | ||
| 19 | +++ b/eventlet/wsgi.py | ||
| 20 | @@ -154,6 +154,12 @@ class Input(object): | ||
| 21 | read = b'' | ||
| 22 | self.position += len(read) | ||
| 23 | return read | ||
| 24 | + | ||
| 25 | + def _discard_trailers(self, rfile): | ||
| 26 | + while True: | ||
| 27 | + line = rfile.readline() | ||
| 28 | + if not line or line in (b'\r\n', b'\n', b''): | ||
| 29 | + break | ||
| 30 | |||
| 31 | def _chunked_read(self, rfile, length=None, use_readline=False): | ||
| 32 | if self.should_send_hundred_continue: | ||
| 33 | @@ -204,7 +210,7 @@ class Input(object): | ||
| 34 | raise ChunkReadError(err) | ||
| 35 | self.position = 0 | ||
| 36 | if self.chunk_length == 0: | ||
| 37 | - rfile.readline() | ||
| 38 | + self._discard_trailers(rfile) | ||
| 39 | except greenio.SSL.ZeroReturnError: | ||
| 40 | pass | ||
| 41 | return b''.join(response) | ||
