wget: Fix CVE-2026-58470
PATCH v2 1/1 wget: Fix CVE-2026-58470
From: Hetvi Thakar <[email protected]>
This patch applies the upstream fix as referenced in [2], using the commit shown in [1].
It also includes the upstream follow-up in [3], which preserves 64-bit wgint parsing on 32-bit targets.
[1] https://gitlab.com/gnuwget/wget/-/commit/43d3ba9336bc94937e6fae2365c6ffd30c34ffcf
[2] https://nvd.nist.gov/vuln/detail/CVE-2026-58470
[3] https://gitlab.com/gnuwget/wget/-/commit/01ff771caac1958662ca8665eed2021ec386a7af
Signed-off-by Hetvi Thakar <[email protected]>
Signed-off-by Mathieu Dubois-Briand <[email protected]>
Signed-off-by Richard Purdie <[email protected]>
(cherry picked from commit 9b2b418a1546ae4bd6d044474765fa817e9a95f8)
Signed-off-by Hetvi Thakar <[email protected]>
---
Changes in v2
- Added the regression commit
--- .../wget/wget/CVE-2026-58470-regression.patch | 48 +++++++++++ .../wget/wget/CVE-2026-58470.patch | 79 +++++++++++++++++++ meta/recipes-extended/wget/wget_1.25.0.bb | 2 + 3 files changed, 129 insertions(+) create mode 100644 meta/recipes-extended/wget/wget/CVE-2026-58470-regression.patch create mode 100644 meta/recipes-extended/wget/wget/CVE-2026-58470.patch
meta/recipes-extended/wget/wget/CVE-2026-58470-regression.patch new file +48 -0
@@ -0,0 +1,48 @@ +From 01ff771caac1958662ca8665eed2021ec386a7af Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tim=20R=C3=BChsen?= <[email protected]> +Date: Wed, 12 Aug 2026 19:45:21 +0200 +Subject: [PATCH] * src/http.c (parse_content_range): Use strtoll instead of + strtol. + +CVE: CVE-2026-58470 +Upstream-Status: Backport [https://gitlab.com/gnuwget/wget/-/commit/01ff771caac1958662ca8665eed2021ec386a7af] + +(cherry picked from commit 01ff771caac1958662ca8665eed2021ec386a7af) +Signed-off-by: Hetvi Thakar <[email protected]> +--- + src/http.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/http.c b/src/http.c +index e5e75ee695..8170a43c27 100644 +--- a/src/http.c ++++ b/src/http.c +@@ -949,7 +949,7 @@ parse_content_range (const char *hdr, wgint *first_byte_ptr, + return false; + + errno = 0; +- num = strtol(hdr, &end, 10); ++ num = strtoll(hdr, &end, 10); + if (errno == ERANGE) + return false; + hdr = end; +@@ -959,7 +959,7 @@ parse_content_range (const char *hdr, wgint *first_byte_ptr, + *first_byte_ptr = num; + + errno = 0; +- num = strtol(hdr, &end, 10); ++ num = strtoll(hdr, &end, 10); + if (errno == ERANGE) + return false; + hdr = end; +@@ -976,7 +976,7 @@ parse_content_range (const char *hdr, wgint *first_byte_ptr, + else + { + errno = 0; +- num = strtol(hdr, NULL, 10); ++ num = strtoll(hdr, NULL, 10); + if (errno == ERANGE) + return false; + } +-- +2.35.6
meta/recipes-extended/wget/wget/CVE-2026-58470.patch new file +79 -0
79 lines not on this page · raw message
meta/recipes-extended/wget/wget_1.25.0.bb +2 -0
@@ -18,6 +18,8 @@ SRC_URI = "${GNU_MIRROR}/wget/wget-${PV}.tar.gz \ file://CVE-2026-58469.patch \ file://CVE-2026-58469-regression_p1.patch \ file://CVE-2026-58469-regression_p2.patch \ + file://CVE-2026-58470.patch \ + file://CVE-2026-58470-regression.patch \ " SRC_URI[sha256sum] = "766e48423e79359ea31e41db9e5c289675947a7fcf2efdcedb726ac9d0da3784"
Signature · 1 line
2.35.6