From: Gyorgy Sarvari <[email protected]> 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 <[email protected]> (cherry picked from commit 4c602e88b9b2f4babb367d5b6ae7099933976b15) Signed-off-by: Ankur Tyagi <[email protected]> --- ...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 --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 <[email protected]> +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 <[email protected]> +--- + 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"
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#121805): https://lists.openembedded.org/g/openembedded-devel/message/121805 Mute This Topic: https://lists.openembedded.org/mt/116352357/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
