From: Ghanshyam Banait <[email protected]> GNU wget is vulnerable to denial of service in its FTP OPIE/S-KEY authentication functionality. The server-supplied sequence number from the FTP challenge line is used as an iteration count for an MD5 key-derivation loop without any upper bound validation. A malicious FTP server or a network attacker positioned to intercept FTP traffic can send a crafted OPIE challenge with a sequence number near INT_MAX, causing wget to perform up to approximately 2.1 billion MD5 computations and suspend for some time. The --timeout option does not mitigate this because it applies only to network I/O, not CPU computation. This issue was fixed in commit e9697d98e7249b0f68a6be040a4f3dcc5bc101fa
Reference: https://nvd.nist.gov/vuln/detail/cve-2026-16599 Backport the patch to fix CVE-2026-16599. https://gitlab.com/gnuwget/wget/-/commit/e9697d98e7249b0f68a6be040a4f3dcc5bc101fa Signed-off-by: Ghanshyam Banait <[email protected]> Signed-off-by: Yoann Congal <[email protected]> [YC: rewrapped commit message] --- .../wget/wget/CVE-2026-16599.patch | 68 +++++++++++++++++++ meta/recipes-extended/wget/wget_1.25.0.bb | 1 + 2 files changed, 69 insertions(+) create mode 100644 meta/recipes-extended/wget/wget/CVE-2026-16599.patch diff --git a/meta/recipes-extended/wget/wget/CVE-2026-16599.patch b/meta/recipes-extended/wget/wget/CVE-2026-16599.patch new file mode 100644 index 00000000000..fbe8c0566cd --- /dev/null +++ b/meta/recipes-extended/wget/wget/CVE-2026-16599.patch @@ -0,0 +1,68 @@ +From e9697d98e7249b0f68a6be040a4f3dcc5bc101fa Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tim=20R=C3=BChsen?= <[email protected]> +Date: Sat, 20 Jun 2026 14:39:54 +0200 +Subject: [PATCH] Fix server-controlled unbounded MD5 loop in FTP OPIE +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +* src/ftp-basic.c (ftp_login): Limit the skey sequence to 9999. + +Report: +wget accepts an unbounded server-controlled integer as the iteration +count for its OPIE/S-KEY MD5 key-derivation loop. No upper bound is +enforced on the sequence number supplied by the server in the FTP +challenge line. The value is passed directly to skey_response() as a +loop counter, causing wget to perform up to ~2.1 billion full MD5 +computations before responding to the authentication challenge. + +Reported-by: MichaĆ Majchrowicz and Marcin Wyczechowski + +CVE: CVE-2026-16599 + +Upstream-Status: Backport [https://gitlab.com/gnuwget/wget/-/commit/e9697d98e7249b0f68a6be040a4f3dcc5bc101fa] + +Signed-off-by: Ghanshyam Banait <[email protected]> +--- + src/ftp-basic.c | 15 +++++++++++---- + 1 file changed, 11 insertions(+), 4 deletions(-) + +diff --git a/src/ftp-basic.c b/src/ftp-basic.c +index 0f4bb821..af38a69a 100644 +--- a/src/ftp-basic.c ++++ b/src/ftp-basic.c +@@ -204,12 +204,11 @@ ftp_login (int csock, const char *acc, const char *pass) + "331 s/key ", + "331 opiekey " + }; +- size_t i; + const char *seed = NULL; + +- for (i = 0; i < countof (skey_head); i++) ++ for (size_t i = 0; i < countof (skey_head); i++) + { +- int l = strlen (skey_head[i]); ++ size_t l = strlen (skey_head[i]); + if (0 == c_strncasecmp (skey_head[i], respline, l)) + { + seed = respline + l; +@@ -222,7 +221,15 @@ ftp_login (int csock, const char *acc, const char *pass) + + /* Extract the sequence from SEED. */ + for (; c_isdigit (*seed); seed++) +- skey_sequence = 10 * skey_sequence + *seed - '0'; ++ { ++ skey_sequence = 10 * skey_sequence + *seed - '0'; ++ if (skey_sequence > 9999) ++ { ++ xfree (respline); ++ return FTPLOGREFUSED; ++ } ++ } ++ + if (*seed == ' ') + ++seed; + else +-- +GitLab + diff --git a/meta/recipes-extended/wget/wget_1.25.0.bb b/meta/recipes-extended/wget/wget_1.25.0.bb index dc4903429be..95845d695a9 100644 --- a/meta/recipes-extended/wget/wget_1.25.0.bb +++ b/meta/recipes-extended/wget/wget_1.25.0.bb @@ -21,6 +21,7 @@ SRC_URI = "${GNU_MIRROR}/wget/wget-${PV}.tar.gz \ file://CVE-2026-58471.patch \ file://CVE-2026-58472.patch \ file://CVE-2026-58472-regression.patch \ + file://CVE-2026-16599.patch \ " SRC_URI[sha256sum] = "766e48423e79359ea31e41db9e5c289675947a7fcf2efdcedb726ac9d0da3784"
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#245434): https://lists.openembedded.org/g/openembedded-core/message/245434 Mute This Topic: https://lists.openembedded.org/mt/121158863/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
