From patchwork Fri Nov 20 17:21:26 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jo=C3=A3o_Marcos_Costa_=28Schneider_Electric=29?= X-Patchwork-Id: 105111 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.529.1795195319828344900 for ; Fri, 20 Nov 2026 09:22:00 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bootlin.com header.s=dkim header.b=UrvG2KQo; spf=pass (domain: bootlin.com, ip: 185.246.85.4, mailfrom: joaomarcos.costa@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 3763A4E4168A; Fri, 20 Nov 2026 17:21:58 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 0C148601B9; Fri, 20 Nov 2026 17:21:58 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 835D811BC066B; Fri, 20 Nov 2026 18:21:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1795195313; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=Qbu7KK4s6s2jrPNFB+FJ45saACXN2WiZrDZB/5U3JI4=; b=UrvG2KQoeD/hYBZwkClB0T46A1isXMwU4gCdy7azfOT9ETTFFmhxkTGLVKwhw29XjH3XXb BGEh7sftJJtalb1u4hvBU4HKwMxKYphddyqxgWQKw4l/vE7zgKM4C93cJGYnt1z4uzxP2B QB1NC6n1TaWH5OmbMgBwrrdIjZl4SiEtcPRhr5fqcXL6VIPs0mfTF7cALScCBYCqfyHa1W KfSCpOgCXXFlhTuR5gQb2RoxZOU+X8BhYxZWcfTSStn2l1fw6ta1vtGNSVPyIFVh8KDQrb fJ0+lTiSbaSHFiVreGylt3bhc4Yz/hNGWkewY4Pd3DEZnh/yRv8Mr354q8YnFg== From: =?utf-8?q?Jo=C3=A3o_Marcos_Costa_=28Schneider_Electric=29?= To: openembedded-core@lists.openembedded.org Cc: thomas.petazzoni@bootlin.com, yoann.congal@smile.fr, bastien.jauny@smile.fr, =?utf-8?q?Jo=C3=A3o_Marcos_Costa_=28Schneider_Elect?= =?utf-8?q?ric=29?= Subject: [blacksail][PATCH 4/4] curl: fix CVE-2026-94266 Date: Fri, 20 Nov 2026 18:21:26 +0100 Message-ID: <20261120172126.3187901-5-joaomarcos.costa@bootlin.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261120172126.3187901-1-joaomarcos.costa@bootlin.com> References: <20261120172126.3187901-1-joaomarcos.costa@bootlin.com> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Fri, 20 Nov 2026 17:22:03 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/250823 This vulnerability, marked as High [1], was fixed upstream [2] since v8.23.0. Backport the fix to curl v8.22.0. [1] https://nvd.nist.gov/vuln/detail/cve-2026-94266 [2] https://curl.se/docs/CVE-2026-94266.html Signed-off-by: João Marcos Costa (Schneider Electric) --- .../curl/curl/CVE-2026-94266.patch | 220 ++++++++++++++++++ meta/recipes-support/curl/curl_8.22.0.bb | 1 + 2 files changed, 221 insertions(+) create mode 100644 meta/recipes-support/curl/curl/CVE-2026-94266.patch diff --git a/meta/recipes-support/curl/curl/CVE-2026-94266.patch b/meta/recipes-support/curl/curl/CVE-2026-94266.patch new file mode 100644 index 0000000000..1e85a70190 --- /dev/null +++ b/meta/recipes-support/curl/curl/CVE-2026-94266.patch @@ -0,0 +1,220 @@ +From 835f55d8f87da137c262af5d16ba209bcd4398de Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg +Date: Mon, 21 Sep 2026 11:13:13 +0200 +Subject: [PATCH] getinfo: make sure CURLINFO_EFFECTIVE_URL does not contain + creds +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Reported-by: Joshua Rogers + +Verified in test 1876 + +Closes #23016 + +CVE: CVE-2026-94266 +Upstream-Status: Backport [https://github.com/curl/curl/commit/7a6bd027d0de2b6857472d35da090ef60cc29f19] + +Signed-off-by: João Marcos Costa +--- + lib/getinfo.c | 47 +++++++++++++++++++++++++---- + lib/transfer.c | 1 + + lib/url.c | 1 + + lib/urldata.h | 1 + + tests/data/Makefile.am | 2 +- + tests/data/test1876 | 67 ++++++++++++++++++++++++++++++++++++++++++ + 6 files changed, 113 insertions(+), 6 deletions(-) + create mode 100644 tests/data/test1876 + +diff --git a/lib/getinfo.c b/lib/getinfo.c +index 23f1de270c..eda62da515 100644 +--- a/lib/getinfo.c ++++ b/lib/getinfo.c +@@ -63,6 +63,7 @@ void Curl_initinfo(struct Curl_easy *data) + + curlx_safefree(info->contenttype); + curlx_safefree(info->wouldredirect); ++ curlx_safefree(info->effective_url); + + memset(&info->primary, 0, sizeof(info->primary)); + info->retry_after = 0; +@@ -76,15 +77,51 @@ void Curl_initinfo(struct Curl_easy *data) + #endif + } + ++static CURLcode effective_url(struct Curl_easy *data, ++ const char **param_charp) ++{ ++ const char *s = Curl_bufref_ptr(&data->state.url); ++ *param_charp = s ? s : ""; ++ if(s) { ++ char *url = NULL; ++ /* Make a copy of the URL without credentials */ ++ CURLU *u = curl_url(); ++ CURLUcode uc; ++ if(!u) ++ return CURLE_OUT_OF_MEMORY; ++ ++ uc = curl_url_set(u, CURLUPART_URL, s, ++ CURLU_NON_SUPPORT_SCHEME | ++ (data->set.path_as_is ? CURLU_PATH_AS_IS : 0)); ++ if(!uc) ++ uc = curl_url_set(u, CURLUPART_USER, NULL, 0); ++ if(!uc) ++ uc = curl_url_set(u, CURLUPART_PASSWORD, NULL, 0); ++ if(!uc) ++ uc = curl_url_get(u, CURLUPART_URL, &url, CURLU_GET_EMPTY); ++ ++ curl_url_cleanup(u); ++ ++ if(uc || !url) ++ return CURLE_OUT_OF_MEMORY; ++ if(strcmp(url, s)) { ++ /* they are different */ ++ curlx_free(data->info.effective_url); ++ data->info.effective_url = url; ++ *param_charp = url; ++ } ++ else ++ curl_free(url); ++ } ++ return CURLE_OK; ++} ++ + static CURLcode getinfo_char(struct Curl_easy *data, CURLINFO info, + const char **param_charp) + { + switch(info) { +- case CURLINFO_EFFECTIVE_URL: { +- const char *s = Curl_bufref_ptr(&data->state.url); +- *param_charp = s ? s : ""; +- } +- break; ++ case CURLINFO_EFFECTIVE_URL: ++ return effective_url(data, param_charp); + case CURLINFO_EFFECTIVE_METHOD: { + const char *m = CURL_EASY_STR(data, STRING_CUSTOMREQUEST); + if(!m) { +diff --git a/lib/transfer.c b/lib/transfer.c +index 3b6c5c03dd..d940f8dc22 100644 +--- a/lib/transfer.c ++++ b/lib/transfer.c +@@ -503,6 +503,7 @@ CURLcode Curl_pretransfer(struct Curl_easy *data) + data->state.authhost.want = data->set.httpauth; + data->state.authproxy.want = data->set.proxyauth; + curlx_safefree(data->info.wouldredirect); ++ curlx_safefree(data->info.effective_url); + Curl_data_priority_clear_state(data); + if(data->set.http_auto_referer) + Curl_bufref_free(&data->state.referer); +diff --git a/lib/url.c b/lib/url.c +index 6eeae43d0d..61126a1d29 100644 +--- a/lib/url.c ++++ b/lib/url.c +@@ -267,6 +267,7 @@ CURLcode Curl_close(struct Curl_easy **datap) + curlx_safefree(data->state.most_recent_ftp_entrypath); + curlx_safefree(data->info.contenttype); + curlx_safefree(data->info.wouldredirect); ++ curlx_safefree(data->info.effective_url); + + /* No longer a dirty share, if it exists */ + if(Curl_share_easy_unlink(data)) +diff --git a/lib/urldata.h b/lib/urldata.h +index 1c0101847b..fb6df8619e 100644 +--- a/lib/urldata.h ++++ b/lib/urldata.h +@@ -409,6 +409,7 @@ struct PureInfo { + curl_off_t numconnects; /* how many new connections libcurl created */ + char *contenttype; /* the content type of the object */ + char *wouldredirect; /* URL this would have been redirected to if asked to */ ++ char *effective_url; /* when needed */ + curl_off_t retry_after; /* info from Retry-After: header */ + const char *conn_scheme; + int httpcode; /* Recent HTTP, FTP, RTSP or SMTP response code */ +diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am +index e0ce23abfb..8cdeaf7a0a 100644 +--- a/tests/data/Makefile.am ++++ b/tests/data/Makefile.am +@@ -1740,7 +1740,7 @@ TESTCASES = \ + test1849 \ + test1850 \ + test1851 \ +- \ ++ test1876 \ + test1900 \ + test1901 \ + test1902 \ +diff --git a/tests/data/test1876 b/tests/data/test1876 +new file mode 100644 +index 0000000000..4fc3b9fd02 +--- /dev/null ++++ b/tests/data/test1876 +@@ -0,0 +1,67 @@ ++ ++ ++ ++ ++netrc ++ ++ ++ ++# Server-side ++ ++ ++HTTP/1.1 301 redir ++Content-Length: 0 ++Content-Type: text/html ++Location: %TESTNUMBER0002 ++ ++ ++ ++ ++HTTP/1.1 200 OK ++Content-Length: 0 ++Content-Type: text/html ++ ++ ++ ++ ++ ++# Client-side ++ ++ ++http ++ ++ ++verify no credentials present in effective URL after redirect ++ ++ ++machine %HOSTIP ++login netrcuser ++password netrcSECRET123 ++ ++ ++ ++http://%HOSTIP:%HTTPPORT/%TESTNUMBER --netrc-optional --netrc-file %LOGDIR/netrc -L -w 'EFFECTIVE_URL=%{url_effective}\n' ++ ++ ++ ++# Verify data after the test has been "shot" ++ ++ ++GET /%TESTNUMBER HTTP/1.1 ++Host: %HOSTIP:%HTTPPORT ++Authorization: Basic %b64[netrcuser:netrcSECRET123]b64% ++User-Agent: curl/%VERSION ++Accept: */* ++ ++GET /%TESTNUMBER0002 HTTP/1.1 ++Host: %HOSTIP:%HTTPPORT ++Authorization: Basic %b64[netrcuser:netrcSECRET123]b64% ++User-Agent: curl/%VERSION ++Accept: */* ++ ++ ++ ++EFFECTIVE_URL=http://%HOSTIP:%HTTPPORT/%TESTNUMBER0002 ++ ++ ++ diff --git a/meta/recipes-support/curl/curl_8.22.0.bb b/meta/recipes-support/curl/curl_8.22.0.bb index 6445aae426..64397f1a77 100644 --- a/meta/recipes-support/curl/curl_8.22.0.bb +++ b/meta/recipes-support/curl/curl_8.22.0.bb @@ -20,6 +20,7 @@ SRC_URI = " \ file://CVE-2026-87865.patch \ file://CVE-2026-92386.patch \ file://CVE-2026-92391.patch \ + file://CVE-2026-94266.patch \ " SRC_URI:append:class-nativesdk = " \