Openembedded Core Discussions
 help / color / mirror / Atom feed
From: "Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)" <dkelaiya@cisco.com>
To: openembedded-core@lists.openembedded.org
Cc: Darsh Kelaiya <dkelaiya@cisco.com>
Subject: [OE-core][wrynose][PATCH 01/12] curl: fix CVE-2026-86414
Date: Tue,  3 Nov 2026 23:36:16 -0800	[thread overview]
Message-ID: <20261104073627.302002-2-dkelaiya@cisco.com> (raw)
In-Reply-To: <20261104073627.302002-1-dkelaiya@cisco.com>

From: Darsh Kelaiya <dkelaiya@cisco.com>

This patch applies the upstream fix as referenced in [2],
using the commit shown in [1].

Reject origin-authentication challenges during HTTP CONNECT while
preserving 407 proxy authentication. Cover both the HTTP/1 and
HTTP/2 tunnel implementations in curl 8.19.0.

Retain upstream test2173 with this version's receive-error result.

[1] https://github.com/curl/curl/commit/2956af6c7451029fb12c12f8166dff211f930d52
[2] https://curl.se/docs/CVE-2026-86414.html

Signed-off-by: Darsh Kelaiya <dkelaiya@cisco.com>
---
 .../curl/curl/CVE-2026-86414.patch            | 155 ++++++++++++++++++
 meta/recipes-support/curl/curl_8.19.0.bb      |   1 +
 2 files changed, 156 insertions(+)
 create mode 100644 meta/recipes-support/curl/curl/CVE-2026-86414.patch

diff --git a/meta/recipes-support/curl/curl/CVE-2026-86414.patch b/meta/recipes-support/curl/curl/CVE-2026-86414.patch
new file mode 100644
index 00000000000..13bf17dcc1b
--- /dev/null
+++ b/meta/recipes-support/curl/curl/CVE-2026-86414.patch
@@ -0,0 +1,155 @@
+From 2956af6c7451029fb12c12f8166dff211f930d52 Mon Sep 17 00:00:00 2001
+From: Stefan Eissing <stefan@eissing.org>
+Date: Thu, 3 Sep 2026 17:54:45 +0200
+Subject: [PATCH] HTTP-CONNECT: do not react to 401 responses
+
+When a proxy answers with a 401 on a CONNECT, ignore Authentication
+headers and fail the connect.
+
+Add test2173 to verify.
+
+Closes #22817
+
+CVE: CVE-2026-86414
+Upstream-Status: Backport [https://github.com/curl/curl/commit/2956af6c7451029fb12c12f8166dff211f930d52]
+
+Backport Changes:
+- Omitted the on_resp_header_udp() hunk: curl 8.19.0 has no separate
+  CONNECT-UDP response handler.
+- Applied the Curl_http_proxy_inspect_tunnel_response() change to
+  inspect_response() in lib/cf-h2-proxy.c, where curl 8.19.0 handles
+  HTTP/2 CONNECT responses. It uses ts->resp from the tunnel state
+  instead of upstream's resp argument.
+- Registered test2173 in the older compact TESTCASES list without
+  upstream's extra blank continuation line.
+- Changed test2173's expected error from 7 (CURLE_COULDNT_CONNECT)
+  to 56 (CURLE_RECV_ERROR). curl 8.19.0 reports this rejected CONNECT
+  as a receive error; upstream reports it as a connection failure.
+
+(cherry picked from commit 2956af6c7451029fb12c12f8166dff211f930d52)
+Signed-off-by: Darsh Kelaiya <dkelaiya@cisco.com>
+---
+ lib/cf-h1-proxy.c      |  3 +--
+ lib/cf-h2-proxy.c      |  5 +---
+ tests/data/Makefile.am |  1 +
+ tests/data/test2173    | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 71 insertions(+), 6 deletions(-)
+
+diff --git a/lib/cf-h1-proxy.c b/lib/cf-h1-proxy.c
+index 69e050b..fc68957 100644
+--- a/lib/cf-h1-proxy.c
++++ b/lib/cf-h1-proxy.c
+@@ -277,8 +277,7 @@ static CURLcode on_resp_header(struct Curl_cfilter *cf,
+   struct SingleRequest *k = &data->req;
+   (void)cf;
+ 
+-  if((checkprefix("WWW-Authenticate:", header) && (401 == k->httpcode)) ||
+-     (checkprefix("Proxy-authenticate:", header) && (407 == k->httpcode))) {
++  if(checkprefix("Proxy-authenticate:", header) && (407 == k->httpcode)) {
+ 
+     bool proxy = (k->httpcode == 407);
+     char *auth = Curl_copy_header_value(header);
+diff --git a/lib/cf-h2-proxy.c b/lib/cf-h2-proxy.c
+index 4275e1e..719f9b8 100644
+--- a/lib/cf-h2-proxy.c
++++ b/lib/cf-h2-proxy.c
+@@ -788,10 +788,7 @@ static CURLcode inspect_response(struct Curl_cfilter *cf,
+     return CURLE_OK;
+   }
+ 
+-  if(ts->resp->status == 401) {
+-    auth_reply = Curl_dynhds_cget(&ts->resp->headers, "WWW-Authenticate");
+-  }
+-  else if(ts->resp->status == 407) {
++  if(ts->resp->status == 407) {
+     auth_reply = Curl_dynhds_cget(&ts->resp->headers, "Proxy-Authenticate");
+   }
+ 
+diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
+index e157596..95a8fe4 100644
+--- a/tests/data/Makefile.am
++++ b/tests/data/Makefile.am
+@@ -257,6 +257,7 @@ test2072 test2073 test2074 test2075 test2076 test2077 test2078 test2079 \
+ test2080 test2081 test2082 test2083 test2084 test2085 test2086 test2087 \
+ test2088 test2089 test2090 test2091 \
+ test2100 test2101 test2102 test2103 test2104 \
++test2173 \
+ \
+ test2200 test2201 test2202 test2203 test2204 test2205 \
+ \
+diff --git a/tests/data/test2173 b/tests/data/test2173
+new file mode 100644
+index 0000000..fb85f40
+--- /dev/null
++++ b/tests/data/test2173
+@@ -0,0 +1,68 @@
++<?xml version="1.0" encoding="US-ASCII"?>
++<testcase>
++<info>
++<keywords>
++HTTP
++HTTP GET
++HTTP CONNECT
++HTTP Basic auth
++proxytunnel
++</keywords>
++</info>
++# Server-side
++<reply>
++<data>
++HTTP/1.1 200 OK
++Date: Tue, 09 Nov 2010 14:49:00 GMT
++Server: test-server/fake swsclose
++Content-Type: text/html
++Funny-head: yesyes
++Content-Length: 9
++
++contents
++</data>
++<connect crlf="headers">
++HTTP/1.1 401 Tricking You
++WWW-Authenticate: Basic
++
++</connect>
++<datacheck crlf="headers">
++HTTP/1.1 401 Tricking You
++WWW-Authenticate: Basic
++
++</datacheck>
++</reply>
++
++# Client-side
++<client>
++<server>
++http
++http-proxy
++</server>
++<name>
++HTTP over proxy-tunnel with site wrong 401 response
++</name>
++<command>
++http://test.%TESTNUMBER:%HTTPPORT/we/want/that/page/%TESTNUMBER -p -x %HOSTIP:%PROXYPORT --user 'iam:my:;self' --anyauth
++</command>
++<features>
++proxy
++</features>
++</client>
++
++# Verify data after the test has been "shot"
++<verify>
++<proxy crlf="headers">
++CONNECT test.%TESTNUMBER:%HTTPPORT HTTP/1.1
++Host: test.%TESTNUMBER:%HTTPPORT
++User-Agent: curl/%VERSION
++Proxy-Connection: Keep-Alive
++
++</proxy>
++<protocol crlf="headers">
++</protocol>
++<errorcode>
++56
++</errorcode>
++</verify>
++</testcase>
+-- 
+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 adee64a0188..9b28b9d7c98 100644
--- a/meta/recipes-support/curl/curl_8.19.0.bb
+++ b/meta/recipes-support/curl/curl_8.19.0.bb
@@ -48,6 +48,7 @@ SRC_URI = "https://curl.se/download/${BP}.tar.xz \
            file://CVE-2026-82208.patch \
            file://CVE-2026-80230.patch \
            file://CVE-2026-80231.patch \
+           file://CVE-2026-86414.patch \
            "
 
 SRC_URI:append:class-nativesdk = " \
-- 
2.35.6

  reply	other threads:[~2026-11-04  7:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04  7:36 [OE-core][wrynose][PATCH 00/12] curl: Security fixes Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)
2026-11-04  7:36 ` Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco) [this message]
2026-11-04  7:36 ` [OE-core][wrynose][PATCH 02/12] curl: fix CVE-2026-86409 Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)
2026-11-04  7:36 ` [OE-core][wrynose][PATCH 03/12] curl: fix CVE-2026-87862 Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)
2026-11-04  7:36 ` [OE-core][wrynose][PATCH 04/12] curl: fix CVE-2026-92387 Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)
2026-11-04  7:36 ` [OE-core][wrynose][PATCH 05/12] curl: fix CVE-2026-86412 Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)
2026-11-04  7:36 ` [OE-core][wrynose][PATCH 06/12] curl: fix CVE-2026-92386 Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)
2026-11-04  7:36 ` [OE-core][wrynose][PATCH 07/12] curl: fix CVE-2026-107928 Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)
2026-11-04  7:36 ` [OE-core][wrynose][PATCH 08/12] curl: fix CVE-2026-87864 Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)
2026-11-04  7:36 ` [OE-core][wrynose][PATCH 09/12] curl: fix CVE-2026-92389 Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)
2026-11-04  7:36 ` [OE-core][wrynose][PATCH 10/12] curl: fix CVE-2026-87865 Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)
2026-11-04  7:36 ` [OE-core][wrynose][PATCH 11/12] curl: set CVE_STATUS for CVE-2026-19931 Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)
2026-11-04  7:36 ` [OE-core][wrynose][PATCH 12/12] curl: fix CVE-2026-18924 Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)
2026-11-16  0:14 ` [OE-core][wrynose][PATCH 00/12] curl: Security fixes Yoann Congal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261104073627.302002-2-dkelaiya@cisco.com \
    --to=dkelaiya@cisco.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox