From: Deepak Rathore <[email protected]> This patch applies the upstream backport for CVE-2026-4873. The upstream fix commit is referenced in [1], and the public CVE advisory is referenced in [2].
[1] https://github.com/curl/curl/commit/507e7be573b0a76fca597b75ff7cb27a66e7d865 [2] https://curl.se/docs/CVE-2026-4873.html Signed-off-by: Deepak Rathore <[email protected]> --- - Changes from v3 to v4: Addressed the review comments and make sure that patch is having context lines and rebased on top of latest wrynose commits .../curl/curl/CVE-2026-4873.patch | 52 +++++++++++++++++++ meta/recipes-support/curl/curl_8.19.0.bb | 1 + 2 files changed, 53 insertions(+) create mode 100644 meta/recipes-support/curl/curl/CVE-2026-4873.patch diff --git a/meta/recipes-support/curl/curl/CVE-2026-4873.patch b/meta/recipes-support/curl/curl/CVE-2026-4873.patch new file mode 100644 index 0000000000..b288de9306 --- /dev/null +++ b/meta/recipes-support/curl/curl/CVE-2026-4873.patch @@ -0,0 +1,52 @@ +From 4d13e431d26c3097e6dff49ba069061b588461af Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg <[email protected]> +Date: Tue, 24 Mar 2026 08:35:08 +0100 +Subject: [PATCH] url: do not reuse a non-tls starttls connection if new + requires TLS + +Reported-by: Arkadi Vainbrand + +Closes #21082 + +CVE: CVE-2026-4873 +Upstream-Status: Backport [https://github.com/curl/curl/commit/507e7be573b0a76fca597b75ff7cb27a66e7d865] + +(cherry picked from commit 507e7be573b0a76fca597b75ff7cb27a66e7d865) +Signed-off-by: Deepak Rathore <[email protected]> +--- + lib/url.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/lib/url.c b/lib/url.c +index 7c24f1a002..4ebff50ef1 100644 +--- a/lib/url.c ++++ b/lib/url.c +@@ -745,7 +745,7 @@ struct url_conn_match { + BIT(want_proxy_ntlm_http); + BIT(want_nego_http); + BIT(want_proxy_nego_http); +- ++ BIT(req_tls); /* require TLS use from a clear-text start */ + BIT(wait_pipe); + BIT(force_reuse); + BIT(seen_pending_conn); +@@ -897,6 +897,9 @@ static bool url_match_ssl_use(struct connectdata *conn, + (get_protocol_family(conn->scheme) != m->needle->scheme->protocol)) + return FALSE; + } ++ else if(m->req_tls) ++ /* a clear-text STARTTLS protocol with required TLS */ ++ return FALSE; + return TRUE; + } + +@@ -1361,6 +1364,7 @@ static bool url_attach_existing(struct Curl_easy *data, + (needle->scheme->protocol & PROTO_FAMILY_HTTP); + #endif + #endif ++ match.req_tls = data->set.use_ssl >= CURLUSESSL_CONTROL; + + /* Find a connection in the pool that matches what "data + needle" + * requires. If a suitable candidate is found, it is attached to "data". */ +-- +2.35.6 diff --git a/meta/recipes-support/curl/curl_8.19.0.bb b/meta/recipes-support/curl/curl_8.19.0.bb index 097b3056d8..5ba881bd76 100644 --- a/meta/recipes-support/curl/curl_8.19.0.bb +++ b/meta/recipes-support/curl/curl_8.19.0.bb @@ -22,6 +22,7 @@ SRC_URI = " \ file://CVE-2026-6429-dependent.patch \ file://CVE-2026-6429.patch \ file://CVE-2026-7168.patch \ + file://CVE-2026-4873.patch \ " SRC_URI:append:class-nativesdk = " \ -- 2.35.6
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#242409): https://lists.openembedded.org/g/openembedded-core/message/242409 Mute This Topic: https://lists.openembedded.org/mt/120530931/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
