diff options
| -rw-r--r-- | meta-networking/recipes-support/tinyproxy/tinyproxy/CVE-2022-40468.patch | 33 | ||||
| -rw-r--r-- | meta-networking/recipes-support/tinyproxy/tinyproxy_1.11.1.bb | 1 |
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 @@ | |||
| 1 | From 3764b8551463b900b5b4e3ec0cd9bb9182191cb7 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: rofl0r <rofl0r@users.noreply.github.com> | ||
| 3 | Date: Thu, 8 Sep 2022 15:18:04 +0000 | ||
| 4 | Subject: [PATCH] prevent junk from showing up in error page in invalid | ||
| 5 | requests | ||
| 6 | |||
| 7 | fixes #457 | ||
| 8 | |||
| 9 | https://github.com/tinyproxy/tinyproxy/commit/3764b8551463b900b5b4e3ec0cd9bb9182191cb7 | ||
| 10 | Upstream-Status: Backport | ||
| 11 | CVE: CVE-2022-40468 | ||
| 12 | Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com> | ||
| 13 | --- | ||
| 14 | src/reqs.c | 4 ++++ | ||
| 15 | 1 file changed, 4 insertions(+) | ||
| 16 | |||
| 17 | diff --git a/src/reqs.c b/src/reqs.c | ||
| 18 | index 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 | ||
| 12 | SRC_URI[sha256sum] = "1574acf7ba83c703a89e98bb2758a4ed9fda456f092624b33cfcf0ce2d3b2047" | 13 | SRC_URI[sha256sum] = "1574acf7ba83c703a89e98bb2758a4ed9fda456f092624b33cfcf0ce2d3b2047" |
