summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-networking/recipes-support/tinyproxy/tinyproxy/CVE-2022-40468.patch33
-rw-r--r--meta-networking/recipes-support/tinyproxy/tinyproxy_1.11.1.bb1
2 files changed, 34 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/tinyproxy/tinyproxy/CVE-2022-40468.patch b/meta-networking/recipes-support/tinyproxy/tinyproxy/CVE-2022-40468.patch
new file mode 100644
index 0000000000..4e2157ca75
--- /dev/null
+++ b/meta-networking/recipes-support/tinyproxy/tinyproxy/CVE-2022-40468.patch
@@ -0,0 +1,33 @@
1From 3764b8551463b900b5b4e3ec0cd9bb9182191cb7 Mon Sep 17 00:00:00 2001
2From: rofl0r <rofl0r@users.noreply.github.com>
3Date: Thu, 8 Sep 2022 15:18:04 +0000
4Subject: [PATCH] prevent junk from showing up in error page in invalid
5 requests
6
7fixes #457
8
9https://github.com/tinyproxy/tinyproxy/commit/3764b8551463b900b5b4e3ec0cd9bb9182191cb7
10Upstream-Status: Backport
11CVE: CVE-2022-40468
12Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
13---
14 src/reqs.c | 4 ++++
15 1 file changed, 4 insertions(+)
16
17diff --git a/src/reqs.c b/src/reqs.c
18index bce69819..45db118d 100644
19--- a/src/reqs.c
20+++ b/src/reqs.c
21@@ -343,8 +343,12 @@ static struct request_s *process_request (struct conn_s *connptr,
22 goto fail;
23 }
24
25+ /* zero-terminate the strings so they don't contain junk in error page */
26+ request->method[0] = url[0] = request->protocol[0] = 0;
27+
28 ret = sscanf (connptr->request_line, "%[^ ] %[^ ] %[^ ]",
29 request->method, url, request->protocol);
30+
31 if (ret == 2 && !strcasecmp (request->method, "GET")) {
32 request->protocol[0] = 0;
33
diff --git a/meta-networking/recipes-support/tinyproxy/tinyproxy_1.11.1.bb b/meta-networking/recipes-support/tinyproxy/tinyproxy_1.11.1.bb
index 86f57d88ff..999deff4de 100644
--- a/meta-networking/recipes-support/tinyproxy/tinyproxy_1.11.1.bb
+++ b/meta-networking/recipes-support/tinyproxy/tinyproxy_1.11.1.bb
@@ -7,6 +7,7 @@ SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.gz
7 file://disable-documentation.patch \ 7 file://disable-documentation.patch \
8 file://tinyproxy.service \ 8 file://tinyproxy.service \
9 file://tinyproxy.conf \ 9 file://tinyproxy.conf \
10 file://CVE-2022-40468.patch \
10 " 11 "
11 12
12SRC_URI[sha256sum] = "1574acf7ba83c703a89e98bb2758a4ed9fda456f092624b33cfcf0ce2d3b2047" 13SRC_URI[sha256sum] = "1574acf7ba83c703a89e98bb2758a4ed9fda456f092624b33cfcf0ce2d3b2047"