| Message ID | 20261203073002.22963-1-hprajapati@mvista.com |
|---|---|
| State | New |
| Headers | show |
| Series | [scarthgap] curl: fix for CVE-2026-8458 | expand |
Please remove CVE_STATUS for this CVE when patching it. https://git.openembedded.org/openembedded-core/commit/?h=scarthgap&id=e986fa2c8d74c1b943bb9069e47d1a9ae7dee9e0 Peter > -----Original Message----- > From: Hitendra Prajapati via openembedded-core > <hprajapati=mvista.com@lists.openembedded.org> > Sent: Thursday, December 3, 2026 8:30 AM > To: openembedded-core@lists.openembedded.org > Cc: Hitendra Prajapati <hprajapati@mvista.com> > Subject: [OE-core] [scarthgap][PATCH] curl: fix for CVE-2026-8458 > > Pick the patch from [1], also referenced in the Debian report [2] and > Redhat fix [3]. > > [1] > https://github.com/curl/curl/commit/5e99b73cf441d9c369768b9cd48b5389b9a25 > 03d > [2] https://security-tracker.debian.org/tracker/CVE-2026-8458 > [3] https://access.redhat.com/errata/RHSA-2026:100686 > > Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com> > --- > .../curl/curl/CVE-2026-8458.patch | 118 ++++++++++++++++++ > meta/recipes-support/curl/curl_8.7.1.bb | 1 + > 2 files changed, 119 insertions(+) > create mode 100644 meta/recipes-support/curl/curl/CVE-2026-8458.patch > > diff --git a/meta/recipes-support/curl/curl/CVE-2026-8458.patch b/meta/recipes- > support/curl/curl/CVE-2026-8458.patch > new file mode 100644 > index 0000000000..97e07431bf > --- /dev/null > +++ b/meta/recipes-support/curl/curl/CVE-2026-8458.patch > @@ -0,0 +1,118 @@ > +From ebefa482235931dd30fb27ee1398572b2a2caf0e Mon Sep 17 00:00:00 > 2001 > +From: RHEL Packaging Agent <redhat-ymir-agent@redhat.com> > +Date: Wed, 29 Jul 2026 11:59:24 +0000 > +Subject: [PATCH] creds: add sasl service name > + > +The SASL service name, used in authentication, is part of curl's credentials > +when authenticating to a server/proxy. Store it on the connection and compare > +it during connection reuse to prevent connections authenticated with one > +service name from being reused when a different service name is requested. > + > +Adapted from upstream commit > 5e99b73cf441d9c369768b9cd48b5389b9a2503d for > +curl 7.76.1. > + > +Closes #21585 > + > +CVE: CVE-2026-8458 > +Upstream-Status: Backport > [https://github.com/curl/curl/commit/5e99b73cf441d9c369768b9cd48b5389b9a25 > 03d] > +Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com> > +--- > + lib/url.c | 31 ++++++++++++++++++++++++++++--- > + lib/urldata.h | 4 ++++ > + 2 files changed, 32 insertions(+), 3 deletions(-) > + > +diff --git a/lib/url.c b/lib/url.c > +index 9e1ca03..acc508c 100644 > +--- a/lib/url.c > ++++ b/lib/url.c > +@@ -589,6 +589,10 @@ static void conn_free(struct Curl_easy *data, struct > connectdata *conn) > + Curl_safefree(conn->sasl_authzid); > + Curl_safefree(conn->options); > + Curl_safefree(conn->oauth_bearer); > ++ Curl_safefree(conn->sasl_service); > ++#ifndef CURL_DISABLE_PROXY > ++ Curl_safefree(conn->proxy_sasl_service); > ++#endif > + Curl_safefree(conn->host.rawalloc); /* host name buffer */ > + Curl_safefree(conn->conn_to_host.rawalloc); /* host name buffer */ > + Curl_safefree(conn->hostname_resolve); > +@@ -1139,7 +1143,8 @@ ConnectionExists(struct Curl_easy *data, > + if(Curl_timestrcmp(needle->user, check->user) || > + Curl_timestrcmp(needle->passwd, check->passwd) || > + Curl_timestrcmp(needle->sasl_authzid, check->sasl_authzid) || > +- Curl_timestrcmp(needle->oauth_bearer, check->oauth_bearer)) { > ++ Curl_timestrcmp(needle->oauth_bearer, check->oauth_bearer) || > ++ Curl_timestrcmp(needle->sasl_service, check->sasl_service)) { > + /* one of them was different */ > + continue; > + } > +@@ -1222,7 +1227,8 @@ ConnectionExists(struct Curl_easy *data, > + partway through a handshake!) */ > + if(wantNTLMhttp) { > + if(Curl_timestrcmp(needle->user, check->user) || > +- Curl_timestrcmp(needle->passwd, check->passwd)) { > ++ Curl_timestrcmp(needle->passwd, check->passwd) || > ++ Curl_timestrcmp(needle->sasl_service, check->sasl_service)) { > + > + /* we prefer a credential match, but this is at least a connection > + that can be reused and "upgraded" to NTLM if it does > +@@ -1253,7 +1259,9 @@ ConnectionExists(struct Curl_easy *data, > + if(Curl_timestrcmp(needle->http_proxy.user, > + check->http_proxy.user) || > + Curl_timestrcmp(needle->http_proxy.passwd, > +- check->http_proxy.passwd)) > ++ check->http_proxy.passwd) || > ++ Curl_timestrcmp(needle->proxy_sasl_service, > ++ check->proxy_sasl_service)) > + continue; > + } > + else if(check->proxy_ntlm_state != NTLMSTATE_NONE) { > +@@ -2455,6 +2463,15 @@ static CURLcode > create_conn_helper_init_proxy(struct Curl_easy *data, > + goto out; > + } > + > ++ if(data->set.str[STRING_PROXY_SERVICE_NAME]) { > ++ conn->proxy_sasl_service = > ++ strdup(data->set.str[STRING_PROXY_SERVICE_NAME]); > ++ if(!conn->proxy_sasl_service) { > ++ result = CURLE_OUT_OF_MEMORY; > ++ goto out; > ++ } > ++ } > ++ > + /************************************************************* > + * Detect what (if any) proxy to use > + *************************************************************/ > +@@ -3533,6 +3550,14 @@ static CURLcode create_conn(struct Curl_easy > *data, > + } > + } > + > ++ if(data->set.str[STRING_SERVICE_NAME]) { > ++ conn->sasl_service = strdup(data->set.str[STRING_SERVICE_NAME]); > ++ if(!conn->sasl_service) { > ++ result = CURLE_OUT_OF_MEMORY; > ++ goto out; > ++ } > ++ } > ++ > + #ifdef USE_UNIX_SOCKETS > + if(data->set.str[STRING_UNIX_SOCKET_PATH]) { > + conn->unix_domain_socket = strdup(data- > >set.str[STRING_UNIX_SOCKET_PATH]); > +diff --git a/lib/urldata.h b/lib/urldata.h > +index 4fc595a..e4293a2 100644 > +--- a/lib/urldata.h > ++++ b/lib/urldata.h > +@@ -840,6 +840,10 @@ struct connectdata { > + char *options; /* options string, allocated */ > + char *sasl_authzid; /* authorization identity string, allocated */ > + char *oauth_bearer; /* OAUTH2 bearer, allocated */ > ++ char *sasl_service; /* SASL service name, allocated */ > ++#ifndef CURL_DISABLE_PROXY > ++ char *proxy_sasl_service; /* proxy SASL service name, allocated */ > ++#endif > + struct curltime now; /* "current" time */ > + struct curltime created; /* creation time */ > + struct curltime lastused; /* when returned to the connection cache */ > +-- > +2.50.1 > + > diff --git a/meta/recipes-support/curl/curl_8.7.1.bb b/meta/recipes- > support/curl/curl_8.7.1.bb > index 4f6ffbbed5..db5a7ddeb6 100644 > --- a/meta/recipes-support/curl/curl_8.7.1.bb > +++ b/meta/recipes-support/curl/curl_8.7.1.bb > @@ -50,6 +50,7 @@ SRC_URI = "https://curl.se/download/${BP}.tar.xz \ > file://CVE-2026-92388-2.patch \ > file://CVE-2026-87864.patch \ > file://CVE-2026-7168.patch \ > + file://CVE-2026-8458.patch \ > " > > SRC_URI:append:class-nativesdk = " \ > -- > 2.50.1
diff --git a/meta/recipes-support/curl/curl/CVE-2026-8458.patch b/meta/recipes-support/curl/curl/CVE-2026-8458.patch new file mode 100644 index 0000000000..97e07431bf --- /dev/null +++ b/meta/recipes-support/curl/curl/CVE-2026-8458.patch @@ -0,0 +1,118 @@ +From ebefa482235931dd30fb27ee1398572b2a2caf0e Mon Sep 17 00:00:00 2001 +From: RHEL Packaging Agent <redhat-ymir-agent@redhat.com> +Date: Wed, 29 Jul 2026 11:59:24 +0000 +Subject: [PATCH] creds: add sasl service name + +The SASL service name, used in authentication, is part of curl's credentials +when authenticating to a server/proxy. Store it on the connection and compare +it during connection reuse to prevent connections authenticated with one +service name from being reused when a different service name is requested. + +Adapted from upstream commit 5e99b73cf441d9c369768b9cd48b5389b9a2503d for +curl 7.76.1. + +Closes #21585 + +CVE: CVE-2026-8458 +Upstream-Status: Backport [https://github.com/curl/curl/commit/5e99b73cf441d9c369768b9cd48b5389b9a2503d] +Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com> +--- + lib/url.c | 31 ++++++++++++++++++++++++++++--- + lib/urldata.h | 4 ++++ + 2 files changed, 32 insertions(+), 3 deletions(-) + +diff --git a/lib/url.c b/lib/url.c +index 9e1ca03..acc508c 100644 +--- a/lib/url.c ++++ b/lib/url.c +@@ -589,6 +589,10 @@ static void conn_free(struct Curl_easy *data, struct connectdata *conn) + Curl_safefree(conn->sasl_authzid); + Curl_safefree(conn->options); + Curl_safefree(conn->oauth_bearer); ++ Curl_safefree(conn->sasl_service); ++#ifndef CURL_DISABLE_PROXY ++ Curl_safefree(conn->proxy_sasl_service); ++#endif + Curl_safefree(conn->host.rawalloc); /* host name buffer */ + Curl_safefree(conn->conn_to_host.rawalloc); /* host name buffer */ + Curl_safefree(conn->hostname_resolve); +@@ -1139,7 +1143,8 @@ ConnectionExists(struct Curl_easy *data, + if(Curl_timestrcmp(needle->user, check->user) || + Curl_timestrcmp(needle->passwd, check->passwd) || + Curl_timestrcmp(needle->sasl_authzid, check->sasl_authzid) || +- Curl_timestrcmp(needle->oauth_bearer, check->oauth_bearer)) { ++ Curl_timestrcmp(needle->oauth_bearer, check->oauth_bearer) || ++ Curl_timestrcmp(needle->sasl_service, check->sasl_service)) { + /* one of them was different */ + continue; + } +@@ -1222,7 +1227,8 @@ ConnectionExists(struct Curl_easy *data, + partway through a handshake!) */ + if(wantNTLMhttp) { + if(Curl_timestrcmp(needle->user, check->user) || +- Curl_timestrcmp(needle->passwd, check->passwd)) { ++ Curl_timestrcmp(needle->passwd, check->passwd) || ++ Curl_timestrcmp(needle->sasl_service, check->sasl_service)) { + + /* we prefer a credential match, but this is at least a connection + that can be reused and "upgraded" to NTLM if it does +@@ -1253,7 +1259,9 @@ ConnectionExists(struct Curl_easy *data, + if(Curl_timestrcmp(needle->http_proxy.user, + check->http_proxy.user) || + Curl_timestrcmp(needle->http_proxy.passwd, +- check->http_proxy.passwd)) ++ check->http_proxy.passwd) || ++ Curl_timestrcmp(needle->proxy_sasl_service, ++ check->proxy_sasl_service)) + continue; + } + else if(check->proxy_ntlm_state != NTLMSTATE_NONE) { +@@ -2455,6 +2463,15 @@ static CURLcode create_conn_helper_init_proxy(struct Curl_easy *data, + goto out; + } + ++ if(data->set.str[STRING_PROXY_SERVICE_NAME]) { ++ conn->proxy_sasl_service = ++ strdup(data->set.str[STRING_PROXY_SERVICE_NAME]); ++ if(!conn->proxy_sasl_service) { ++ result = CURLE_OUT_OF_MEMORY; ++ goto out; ++ } ++ } ++ + /************************************************************* + * Detect what (if any) proxy to use + *************************************************************/ +@@ -3533,6 +3550,14 @@ static CURLcode create_conn(struct Curl_easy *data, + } + } + ++ if(data->set.str[STRING_SERVICE_NAME]) { ++ conn->sasl_service = strdup(data->set.str[STRING_SERVICE_NAME]); ++ if(!conn->sasl_service) { ++ result = CURLE_OUT_OF_MEMORY; ++ goto out; ++ } ++ } ++ + #ifdef USE_UNIX_SOCKETS + if(data->set.str[STRING_UNIX_SOCKET_PATH]) { + conn->unix_domain_socket = strdup(data->set.str[STRING_UNIX_SOCKET_PATH]); +diff --git a/lib/urldata.h b/lib/urldata.h +index 4fc595a..e4293a2 100644 +--- a/lib/urldata.h ++++ b/lib/urldata.h +@@ -840,6 +840,10 @@ struct connectdata { + char *options; /* options string, allocated */ + char *sasl_authzid; /* authorization identity string, allocated */ + char *oauth_bearer; /* OAUTH2 bearer, allocated */ ++ char *sasl_service; /* SASL service name, allocated */ ++#ifndef CURL_DISABLE_PROXY ++ char *proxy_sasl_service; /* proxy SASL service name, allocated */ ++#endif + struct curltime now; /* "current" time */ + struct curltime created; /* creation time */ + struct curltime lastused; /* when returned to the connection cache */ +-- +2.50.1 + diff --git a/meta/recipes-support/curl/curl_8.7.1.bb b/meta/recipes-support/curl/curl_8.7.1.bb index 4f6ffbbed5..db5a7ddeb6 100644 --- a/meta/recipes-support/curl/curl_8.7.1.bb +++ b/meta/recipes-support/curl/curl_8.7.1.bb @@ -50,6 +50,7 @@ SRC_URI = "https://curl.se/download/${BP}.tar.xz \ file://CVE-2026-92388-2.patch \ file://CVE-2026-87864.patch \ file://CVE-2026-7168.patch \ + file://CVE-2026-8458.patch \ " SRC_URI:append:class-nativesdk = " \
Pick the patch from [1], also referenced in the Debian report [2] and Redhat fix [3]. [1] https://github.com/curl/curl/commit/5e99b73cf441d9c369768b9cd48b5389b9a2503d [2] https://security-tracker.debian.org/tracker/CVE-2026-8458 [3] https://access.redhat.com/errata/RHSA-2026:100686 Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com> --- .../curl/curl/CVE-2026-8458.patch | 118 ++++++++++++++++++ meta/recipes-support/curl/curl_8.7.1.bb | 1 + 2 files changed, 119 insertions(+) create mode 100644 meta/recipes-support/curl/curl/CVE-2026-8458.patch