Your message dated Sat, 17 Dec 2022 10:57:10 +0000 with message-id <03e9b90cf2f149b9e2835590c9ec0ccb048b744d.camel@adam-barratt.org.uk> and subject line Closing p-u requests for fixes included in 11.6 has caused the Debian Bug report #1025414, regarding bullseye-pu: package node-hawk/8.0.1+dfsg-2+deb11u1 to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@bugs.debian.org immediately.) -- 1025414: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1025414 Debian Bug Tracking System Contact owner@bugs.debian.org with problems
--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: bullseye-pu: package node-hawk/8.0.1+dfsg-2+deb11u1
- From: Yadd <yadd@debian.org>
- Date: Sun, 04 Dec 2022 11:42:45 +0100
- Message-id: <[🔎] 167015056592.1824916.7319058013121546242.reportbug@debian007.xnr.fr>
Package: release.debian.org Severity: normal Tags: bullseye User: release.debian.org@packages.debian.org Usertags: pu [ Reason ] node-hawk used a regular expression to parse `Host` HTTP header (`Hawk.utils.parseHost()`), which was subject to regular expression DoS attack (CVE-2022-29167). [ Impact ] Medium security issue [ Tests ] Sadly test were not launched in Bullseye [ Risks ] Low risk, patch is trivial [ Checklist ] [X] *all* changes are documented in the d/changelog [X] I reviewed all changes and I approve them [X] attach debdiff against the package in (old)stable [X] the issue is verified as fixed in unstable Replace custom url parsing by `url` functions. Cheers, Yadddiff --git a/debian/changelog b/debian/changelog index 7a55fa8..a913487 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +node-hawk (8.0.1+dfsg-2+deb11u1) bullseye; urgency=medium + + * Team upload + * Parse URLs using stdlib (Closes: CVE-2022-29167) + + -- Yadd <yadd@debian.org> Sun, 04 Dec 2022 11:39:16 +0100 + node-hawk (8.0.1+dfsg-2) unstable; urgency=medium * Team upload diff --git a/debian/patches/CVE-2022-29167.patch b/debian/patches/CVE-2022-29167.patch new file mode 100644 index 0000000..2c41b08 --- /dev/null +++ b/debian/patches/CVE-2022-29167.patch @@ -0,0 +1,57 @@ +Description: Parse URLs using stdlib +Author: Yaraslau Kurmyza <yarik@mozilla.com> +Origin: upstream, https://github.com/mozilla/hawk/commit/ade13411 +Bug: https://github.com/mozilla/hawk/security/advisories/GHSA-44pw-h2cw-w3vq +Forwarded: not-needed +Applied-Upstream: 9.0.1, ade13411 +Reviewed-By: Yadd <yadd@debian.org> +Last-Update: 2022-12-04 + +--- a/lib/utils.js ++++ b/lib/utils.js +@@ -2,6 +2,7 @@ + + const Boom = require('@hapi/boom'); + const Sntp = require('@hapi/sntp'); ++const Url = require('url'); + + + const internals = {}; +@@ -18,17 +19,19 @@ + }; + + +-// Extract host and port from request +- +-// $1 $2 +-internals.hostHeaderRegex = /^(?:(?:\r\n)?\s)*((?:[^:]+)|(?:\[[^\]]+\]))(?::(\d+))?(?:(?:\r\n)?\s)*$/; // (IPv4, hostname)|(IPv6) +- +- + exports.parseHost = function (req, hostHeaderName) { + + hostHeaderName = (hostHeaderName ? hostHeaderName.toLowerCase() : 'host'); + const hostHeader = req.headers[hostHeaderName]; +- if (!hostHeader) { ++ if (hostHeader.indexOf('/') !== -1) { ++ return null; ++ } ++ ++ let uri; ++ try { ++ uri = new Url.URL('http://' + hostHeader); ++ } ++ catch (err) { + return null; + } + +@@ -42,8 +45,8 @@ + } + + return { +- name: hostParts[1], +- port: (hostParts[2] ? hostParts[2] : (req.connection && req.connection.encrypted ? 443 : 80)) ++ name: uri.hostname, ++ port: (uri.port ? uri.port : (req.connection && req.connection.encrypted ? 443 : 80)) + }; + }; + diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..43fa212 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +CVE-2022-29167.patch
--- End Message ---
--- Begin Message ---
- To: 1017723-done@bugs.debian.org, 1018977-done@bugs.debian.org, 1019539-done@bugs.debian.org, 1019915-done@bugs.debian.org, 1020224-done@bugs.debian.org, 1020443-done@bugs.debian.org, 1020596-done@bugs.debian.org, 1020853-done@bugs.debian.org, 1021130-done@bugs.debian.org, 1021172-done@bugs.debian.org, 1021186-done@bugs.debian.org, 1021214-done@bugs.debian.org, 1021426-done@bugs.debian.org, 1021645-done@bugs.debian.org, 1021647-done@bugs.debian.org, 1021651-done@bugs.debian.org, 1021777-done@bugs.debian.org, 1021838-done@bugs.debian.org, 1021963-done@bugs.debian.org, 1022122-done@bugs.debian.org, 1022860-done@bugs.debian.org, 1023064-done@bugs.debian.org, 1023105-done@bugs.debian.org, 1023118-done@bugs.debian.org, 1023261-done@bugs.debian.org, 1023263-done@bugs.debian.org, 1023423-done@bugs.debian.org, 1023602-done@bugs.debian.org, 1023798-done@bugs.debian.org, 1023981-done@bugs.debian.org, 1024054-done@bugs.debian.org, 1024385-done@bugs.debian.org, 1024480-done@bugs.debian.org, 1024745-done@bugs.debian.org, 1024850-done@bugs.debian.org, 1025010-done@bugs.debian.org, 1025083-done@bugs.debian.org, 1025137-done@bugs.debian.org, 1025173-done@bugs.debian.org, 1025204-done@bugs.debian.org, 1025205-done@bugs.debian.org, 1025323-done@bugs.debian.org, 1025387-done@bugs.debian.org, 1025414-done@bugs.debian.org, 1025553-done@bugs.debian.org, 1025601-done@bugs.debian.org, 1025646-done@bugs.debian.org, 1025651-done@bugs.debian.org, 1025652-done@bugs.debian.org, 1025700-done@bugs.debian.org, 1025710-done@bugs.debian.org, 1025716-done@bugs.debian.org, 1025750-done@bugs.debian.org, 1025754-done@bugs.debian.org, 1025755-done@bugs.debian.org, 1025756-done@bugs.debian.org, 1025758-done@bugs.debian.org, 1025764-done@bugs.debian.org, 1025766-done@bugs.debian.org, 1025773-done@bugs.debian.org, 1025774-done@bugs.debian.org, 1025809-done@bugs.debian.org
- Subject: Closing p-u requests for fixes included in 11.6
- From: "Adam D. Barratt" <adam@adam-barratt.org.uk>
- Date: Sat, 17 Dec 2022 10:57:10 +0000
- Message-id: <03e9b90cf2f149b9e2835590c9ec0ccb048b744d.camel@adam-barratt.org.uk>
Package: release.debian.org Version: 11.6 Hi, Each of the updates referred to in these requests was included in this morning's 11.6 point release. Regards, Adam
--- End Message ---