diff mbox series

[meta-oe,kirkstone,1/5] webmin: patch CVE-2017-15644, CVE-2017-15645 and CVE-2017-15646

Message ID 20251014132825.1052635-1-skandigraun@gmail.com
State New
Headers show
Series [meta-oe,kirkstone,1/5] webmin: patch CVE-2017-15644, CVE-2017-15645 and CVE-2017-15646 | expand

Commit Message

Gyorgy Sarvari Oct. 14, 2025, 1:28 p.m. UTC
Details: https://nvd.nist.gov/vuln/detail/CVE-2017-15644
https://nvd.nist.gov/vuln/detail/CVE-2017-15645
https://nvd.nist.gov/vuln/detail/CVE-2017-15646

Pick the patch mentioned in the nvd report (same patch is marked to
fix all three vulnerabilities).

Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
---
 ...e-potentially-malicious-HTTP-headers.patch | 53 +++++++++++++++++++
 .../recipes-webadmin/webmin/webmin_1.850.bb   |  3 +-
 2 files changed, 55 insertions(+), 1 deletion(-)
 create mode 100644 meta-webserver/recipes-webadmin/webmin/files/0001-Escape-potentially-malicious-HTTP-headers.patch
diff mbox series

Patch

diff --git a/meta-webserver/recipes-webadmin/webmin/files/0001-Escape-potentially-malicious-HTTP-headers.patch b/meta-webserver/recipes-webadmin/webmin/files/0001-Escape-potentially-malicious-HTTP-headers.patch
new file mode 100644
index 0000000000..f5d1a7d0e5
--- /dev/null
+++ b/meta-webserver/recipes-webadmin/webmin/files/0001-Escape-potentially-malicious-HTTP-headers.patch
@@ -0,0 +1,53 @@ 
+From 5a06f972b1fd64f3da46187edf4998af0266a53b Mon Sep 17 00:00:00 2001
+From: Jamie Cameron <jcameron@webmin.com>
+Date: Tue, 5 Sep 2017 10:35:44 -0700
+Subject: [PATCH] Escape potentially malicious HTTP headers
+
+CVE: CVE-2017-15644 CVE-2017-15645 CVE-2017-15646
+Upstream-Status: Backport [https://github.com/webmin/webmin/commit/0c58892732ee7610a7abba5507614366d382c9c9]
+
+Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
+---
+ web-lib-funcs.pl | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/web-lib-funcs.pl b/web-lib-funcs.pl
+index 1fcd96ab..df673bb7 100755
+--- a/web-lib-funcs.pl
++++ b/web-lib-funcs.pl
+@@ -2308,7 +2308,7 @@ alarm(0);
+ $h = $main::download_timed_out if ($main::download_timed_out);
+ if (!ref($h)) {
+ 	if ($error) { $$error = $h; return; }
+-	else { &error($h); }
++	else { &error(&html_escape($h)); }
+ 	}
+ &complete_http_download($h, $dest, $error, $cbfunc, $osdn, $host, $port,
+ 			$headers, $ssl, $nocache);
+@@ -2336,7 +2336,7 @@ if ($line !~ /^HTTP\/1\..\s+(200|30[0-9]|400)(\s+|$)/) {
+ 	alarm(0);
+ 	&close_http_connection($_[0]);
+ 	if ($_[2]) { ${$_[2]} = $line; return; }
+-	else { &error("Download failed : $line"); }
++	else { &error("Download failed : ".&html_escape($line)); }
+ 	}
+ my $rcode = $1;
+ &$cbfunc(1, $rcode >= 300 && $rcode < 400 ? 1 : 0)
+@@ -2382,7 +2382,7 @@ if ($rcode >= 300 && $rcode < 400) {
+ 		# Assume relative to same dir .. not handled
+ 		&close_http_connection($_[0]);
+ 		if ($_[2]) { ${$_[2]} = "Invalid Location header $header{'location'}"; return; }
+-		else { &error("Invalid Location header $header{'location'}"); }
++		else { &error("Invalid Location header ".&html_escape($header{'location'})); }
+ 		}
+ 	else {
+ 		&close_http_connection($_[0]);
+@@ -2411,7 +2411,7 @@ else {
+ 		if (!&open_tempfile(PFILE, ">$_[1]", 1)) {
+ 			&close_http_connection($_[0]);
+ 			if ($_[2]) { ${$_[2]} = "Failed to write to $_[1] : $!"; return; }
+-			else { &error("Failed to write to $_[1] : $!"); }
++			else { &error("Failed to write to ".&html_escape($_[1])." : ".&html_escape("$!")); }
+ 			}
+ 		binmode(PFILE);		# For windows
+ 		while(defined($buf = &read_http_connection($_[0], 1024))) {
diff --git a/meta-webserver/recipes-webadmin/webmin/webmin_1.850.bb b/meta-webserver/recipes-webadmin/webmin/webmin_1.850.bb
index 35ec09daea..bc71c74474 100644
--- a/meta-webserver/recipes-webadmin/webmin/webmin_1.850.bb
+++ b/meta-webserver/recipes-webadmin/webmin/webmin_1.850.bb
@@ -19,7 +19,8 @@  SRC_URI = "${SOURCEFORGE_MIRROR}/webadmin/webmin-${PV}.tar.gz \
            file://remove-python2.3.patch \
            file://mysql-config-fix.patch \
            file://webmin.service \
-            "
+           file://0001-Escape-potentially-malicious-HTTP-headers.patch \
+           "
 
 SRC_URI[md5sum] = "cd6ee98f73f9418562197675b952d81b"
 SRC_URI[sha256sum] = "c66caa9e4cb50d5447bc8aceb7989d2284dde060278f404b13e171c7ce1690e1"