diff options
| author | Vijay Anusuri <vanusuri@mvista.com> | 2026-03-21 15:17:22 +0530 |
|---|---|---|
| committer | Paul Barker <paul@pbarker.dev> | 2026-04-10 11:53:18 +0100 |
| commit | 6bdb27cfe1514924897beadc7b83092fa12ce495 (patch) | |
| tree | b625f3c08d51dde48b96abb9b715c872a9cfb35e /meta/recipes-support | |
| parent | 33fab72fa7a093107ba9d871dadb8e2fd9660b0e (diff) | |
| download | poky-6bdb27cfe1514924897beadc7b83092fa12ce495.tar.gz | |
curl: patch CVE-2026-3783
CVE-2026-3783-pre1.patch is dependency patch for CVE-2026-3783.patch
cherry picked from upstream commit:
https://github.com/curl/curl/commit/d7b970e46ba29a7e558e21d19f485977ffed6266
https://github.com/curl/curl/commit/e3d7401a32a46516c9e5ee877
Reference: https://curl.se/docs/CVE-2026-3783.html
(From OE-Core rev: a904e52def0a789ce20f58bcbf2edd7b762c1c1e)
Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Paul Barker <paul@pbarker.dev>
Diffstat (limited to 'meta/recipes-support')
| -rw-r--r-- | meta/recipes-support/curl/curl/CVE-2026-3783-pre1.patch | 66 | ||||
| -rw-r--r-- | meta/recipes-support/curl/curl/CVE-2026-3783.patch | 157 | ||||
| -rw-r--r-- | meta/recipes-support/curl/curl_7.82.0.bb | 2 |
3 files changed, 225 insertions, 0 deletions
diff --git a/meta/recipes-support/curl/curl/CVE-2026-3783-pre1.patch b/meta/recipes-support/curl/curl/CVE-2026-3783-pre1.patch new file mode 100644 index 0000000000..746e5d9ab6 --- /dev/null +++ b/meta/recipes-support/curl/curl/CVE-2026-3783-pre1.patch | |||
| @@ -0,0 +1,66 @@ | |||
| 1 | From d7b970e46ba29a7e558e21d19f485977ffed6266 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Daniel Stenberg <daniel@haxx.se> | ||
| 3 | Date: Fri, 29 Apr 2022 22:56:47 +0200 | ||
| 4 | Subject: [PATCH] http: move Curl_allow_auth_to_host() | ||
| 5 | |||
| 6 | It was mistakenly put within the CURL_DISABLE_HTTP_AUTH #ifdef | ||
| 7 | |||
| 8 | Reported-by: Michael Olbrich | ||
| 9 | Fixes #8772 | ||
| 10 | Closes #8775 | ||
| 11 | |||
| 12 | Upstream-Status: Backport [https://github.com/curl/curl/commit/d7b970e46ba29a7e558e21d19f485977ffed6266] | ||
| 13 | CVE: CVE-2026-3783 #Dependency Patch | ||
| 14 | Signed-off-by: Vijay Anusuri <vanusuri@mvista.com> | ||
| 15 | --- | ||
| 16 | lib/http.c | 30 +++++++++++++++--------------- | ||
| 17 | 1 file changed, 15 insertions(+), 15 deletions(-) | ||
| 18 | |||
| 19 | diff --git a/lib/http.c b/lib/http.c | ||
| 20 | index 0d5c449bc72a..b215307dcaaa 100644 | ||
| 21 | --- a/lib/http.c | ||
| 22 | +++ b/lib/http.c | ||
| 23 | @@ -651,6 +651,21 @@ CURLcode Curl_http_auth_act(struct Curl_easy *data) | ||
| 24 | return result; | ||
| 25 | } | ||
| 26 | |||
| 27 | +/* | ||
| 28 | + * Curl_allow_auth_to_host() tells if authentication, cookies or other | ||
| 29 | + * "sensitive data" can (still) be sent to this host. | ||
| 30 | + */ | ||
| 31 | +bool Curl_allow_auth_to_host(struct Curl_easy *data) | ||
| 32 | +{ | ||
| 33 | + struct connectdata *conn = data->conn; | ||
| 34 | + return (!data->state.this_is_a_follow || | ||
| 35 | + data->set.allow_auth_to_other_hosts || | ||
| 36 | + (data->state.first_host && | ||
| 37 | + strcasecompare(data->state.first_host, conn->host.name) && | ||
| 38 | + (data->state.first_remote_port == conn->remote_port) && | ||
| 39 | + (data->state.first_remote_protocol == conn->handler->protocol))); | ||
| 40 | +} | ||
| 41 | + | ||
| 42 | #ifndef CURL_DISABLE_HTTP_AUTH | ||
| 43 | /* | ||
| 44 | * Output the correct authentication header depending on the auth type | ||
| 45 | @@ -775,21 +790,6 @@ output_auth_headers(struct Curl_easy *data, | ||
| 46 | return CURLE_OK; | ||
| 47 | } | ||
| 48 | |||
| 49 | -/* | ||
| 50 | - * Curl_allow_auth_to_host() tells if authentication, cookies or other | ||
| 51 | - * "sensitive data" can (still) be sent to this host. | ||
| 52 | - */ | ||
| 53 | -bool Curl_allow_auth_to_host(struct Curl_easy *data) | ||
| 54 | -{ | ||
| 55 | - struct connectdata *conn = data->conn; | ||
| 56 | - return (!data->state.this_is_a_follow || | ||
| 57 | - data->set.allow_auth_to_other_hosts || | ||
| 58 | - (data->state.first_host && | ||
| 59 | - strcasecompare(data->state.first_host, conn->host.name) && | ||
| 60 | - (data->state.first_remote_port == conn->remote_port) && | ||
| 61 | - (data->state.first_remote_protocol == conn->handler->protocol))); | ||
| 62 | -} | ||
| 63 | - | ||
| 64 | /** | ||
| 65 | * Curl_http_output_auth() setups the authentication headers for the | ||
| 66 | * host/proxy and the correct authentication | ||
diff --git a/meta/recipes-support/curl/curl/CVE-2026-3783.patch b/meta/recipes-support/curl/curl/CVE-2026-3783.patch new file mode 100644 index 0000000000..769198d688 --- /dev/null +++ b/meta/recipes-support/curl/curl/CVE-2026-3783.patch | |||
| @@ -0,0 +1,157 @@ | |||
| 1 | From e3d7401a32a46516c9e5ee877e613e62ed35bddc Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Daniel Stenberg <daniel@haxx.se> | ||
| 3 | Date: Fri, 6 Mar 2026 23:13:07 +0100 | ||
| 4 | Subject: [PATCH] http: only send bearer if auth is allowed | ||
| 5 | |||
| 6 | Verify with test 2006 | ||
| 7 | |||
| 8 | Closes #20843 | ||
| 9 | |||
| 10 | Curl_auth_allowed_to_host() function got renamed from | ||
| 11 | Curl_allow_auth_to_host() by the commit | ||
| 12 | https://github.com/curl/curl/commit/72652c0613d37ce18e99cca17a42887f12ad43da | ||
| 13 | |||
| 14 | Current curl version 7.82.0 has function Curl_allow_auth_to_host() | ||
| 15 | |||
| 16 | Upstream-Status: Backport [https://github.com/curl/curl/commit/e3d7401a32a46516c9e5ee877] | ||
| 17 | CVE: CVE-2026-3783 | ||
| 18 | Signed-off-by: Vijay Anusuri <vanusuri@mvista.com> | ||
| 19 | --- | ||
| 20 | lib/http.c | 1 + | ||
| 21 | tests/data/Makefile.inc | 2 +- | ||
| 22 | tests/data/test2006 | 98 +++++++++++++++++++++++++++++++++++++++++ | ||
| 23 | 3 files changed, 100 insertions(+), 1 deletion(-) | ||
| 24 | create mode 100644 tests/data/test2006 | ||
| 25 | |||
| 26 | diff --git a/lib/http.c b/lib/http.c | ||
| 27 | index 691091b..6acd537 100644 | ||
| 28 | --- a/lib/http.c | ||
| 29 | +++ b/lib/http.c | ||
| 30 | @@ -757,6 +757,7 @@ output_auth_headers(struct Curl_easy *data, | ||
| 31 | if(authstatus->picked == CURLAUTH_BEARER) { | ||
| 32 | /* Bearer */ | ||
| 33 | if((!proxy && data->set.str[STRING_BEARER] && | ||
| 34 | + Curl_allow_auth_to_host(data) && | ||
| 35 | !Curl_checkheaders(data, STRCONST("Authorization")))) { | ||
| 36 | auth = "Bearer"; | ||
| 37 | result = http_output_bearer(data); | ||
| 38 | diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc | ||
| 39 | index ad41a5e..e641cb8 100644 | ||
| 40 | --- a/tests/data/Makefile.inc | ||
| 41 | +++ b/tests/data/Makefile.inc | ||
| 42 | @@ -221,7 +221,7 @@ test1916 test1917 test1918 \ | ||
| 43 | \ | ||
| 44 | test1933 test1934 test1935 test1936 test1937 test1938 test1939 \ | ||
| 45 | \ | ||
| 46 | -test2000 test2001 test2002 test2003 test2004 \ | ||
| 47 | +test2000 test2001 test2002 test2003 test2004 test2006 \ | ||
| 48 | \ | ||
| 49 | test2023 \ | ||
| 50 | test2024 test2025 test2026 test2027 test2028 test2029 test2030 test2031 \ | ||
| 51 | diff --git a/tests/data/test2006 b/tests/data/test2006 | ||
| 52 | new file mode 100644 | ||
| 53 | index 0000000..200d30a | ||
| 54 | --- /dev/null | ||
| 55 | +++ b/tests/data/test2006 | ||
| 56 | @@ -0,0 +1,98 @@ | ||
| 57 | +<?xml version="1.0" encoding="US-ASCII"?> | ||
| 58 | +<testcase> | ||
| 59 | +<info> | ||
| 60 | +<keywords> | ||
| 61 | +netrc | ||
| 62 | +HTTP | ||
| 63 | +</keywords> | ||
| 64 | +</info> | ||
| 65 | +# Server-side | ||
| 66 | +<reply> | ||
| 67 | +<data crlf="headers"> | ||
| 68 | +HTTP/1.1 301 Follow this you fool | ||
| 69 | +Date: Tue, 09 Nov 2010 14:49:00 GMT | ||
| 70 | +Server: test-server/fake | ||
| 71 | +Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT | ||
| 72 | +ETag: "21025-dc7-39462498" | ||
| 73 | +Accept-Ranges: bytes | ||
| 74 | +Content-Length: 6 | ||
| 75 | +Connection: close | ||
| 76 | +Location: http://b.com/%TESTNUMBER0002 | ||
| 77 | + | ||
| 78 | +-foo- | ||
| 79 | +</data> | ||
| 80 | + | ||
| 81 | +<data2 crlf="headers"> | ||
| 82 | +HTTP/1.1 200 OK | ||
| 83 | +Date: Tue, 09 Nov 2010 14:49:00 GMT | ||
| 84 | +Server: test-server/fake | ||
| 85 | +Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT | ||
| 86 | +ETag: "21025-dc7-39462498" | ||
| 87 | +Accept-Ranges: bytes | ||
| 88 | +Content-Length: 7 | ||
| 89 | +Connection: close | ||
| 90 | + | ||
| 91 | +target | ||
| 92 | +</data2> | ||
| 93 | + | ||
| 94 | +<datacheck crlf="headers"> | ||
| 95 | +HTTP/1.1 301 Follow this you fool | ||
| 96 | +Date: Tue, 09 Nov 2010 14:49:00 GMT | ||
| 97 | +Server: test-server/fake | ||
| 98 | +Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT | ||
| 99 | +ETag: "21025-dc7-39462498" | ||
| 100 | +Accept-Ranges: bytes | ||
| 101 | +Content-Length: 6 | ||
| 102 | +Connection: close | ||
| 103 | +Location: http://b.com/%TESTNUMBER0002 | ||
| 104 | + | ||
| 105 | +HTTP/1.1 200 OK | ||
| 106 | +Date: Tue, 09 Nov 2010 14:49:00 GMT | ||
| 107 | +Server: test-server/fake | ||
| 108 | +Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT | ||
| 109 | +ETag: "21025-dc7-39462498" | ||
| 110 | +Accept-Ranges: bytes | ||
| 111 | +Content-Length: 7 | ||
| 112 | +Connection: close | ||
| 113 | + | ||
| 114 | +target | ||
| 115 | +</datacheck> | ||
| 116 | +</reply> | ||
| 117 | + | ||
| 118 | +# Client-side | ||
| 119 | +<client> | ||
| 120 | +<server> | ||
| 121 | +http | ||
| 122 | +</server> | ||
| 123 | +<features> | ||
| 124 | +proxy | ||
| 125 | +</features> | ||
| 126 | +<name> | ||
| 127 | +.netrc default with redirect plus oauth2-bearer | ||
| 128 | +</name> | ||
| 129 | +<command> | ||
| 130 | +--netrc --netrc-file %LOGDIR/netrc%TESTNUMBER --oauth2-bearer SECRET_TOKEN -L -x http://%HOSTIP:%HTTPPORT/ http://a.com/ | ||
| 131 | +</command> | ||
| 132 | +<file name="%LOGDIR/netrc%TESTNUMBER" > | ||
| 133 | +default login testuser password testpass | ||
| 134 | +</file> | ||
| 135 | +</client> | ||
| 136 | + | ||
| 137 | +<verify> | ||
| 138 | +<protocol crlf="headers"> | ||
| 139 | +GET http://a.com/ HTTP/1.1 | ||
| 140 | +Host: a.com | ||
| 141 | +Authorization: Bearer SECRET_TOKEN | ||
| 142 | +User-Agent: curl/%VERSION | ||
| 143 | +Accept: */* | ||
| 144 | +Proxy-Connection: Keep-Alive | ||
| 145 | + | ||
| 146 | +GET http://b.com/%TESTNUMBER0002 HTTP/1.1 | ||
| 147 | +Host: b.com | ||
| 148 | +User-Agent: curl/%VERSION | ||
| 149 | +Accept: */* | ||
| 150 | +Proxy-Connection: Keep-Alive | ||
| 151 | + | ||
| 152 | +</protocol> | ||
| 153 | +</verify> | ||
| 154 | +</testcase> | ||
| 155 | -- | ||
| 156 | 2.25.1 | ||
| 157 | |||
diff --git a/meta/recipes-support/curl/curl_7.82.0.bb b/meta/recipes-support/curl/curl_7.82.0.bb index 0e107f1e75..f50af1d472 100644 --- a/meta/recipes-support/curl/curl_7.82.0.bb +++ b/meta/recipes-support/curl/curl_7.82.0.bb | |||
| @@ -73,6 +73,8 @@ SRC_URI = "https://curl.se/download/${BP}.tar.xz \ | |||
| 73 | file://CVE-2025-14524.patch \ | 73 | file://CVE-2025-14524.patch \ |
| 74 | file://CVE-2026-1965-1.patch \ | 74 | file://CVE-2026-1965-1.patch \ |
| 75 | file://CVE-2026-1965-2.patch \ | 75 | file://CVE-2026-1965-2.patch \ |
| 76 | file://CVE-2026-3783-pre1.patch \ | ||
| 77 | file://CVE-2026-3783.patch \ | ||
| 76 | " | 78 | " |
| 77 | SRC_URI[sha256sum] = "0aaa12d7bd04b0966254f2703ce80dd5c38dbbd76af0297d3d690cdce58a583c" | 79 | SRC_URI[sha256sum] = "0aaa12d7bd04b0966254f2703ce80dd5c38dbbd76af0297d3d690cdce58a583c" |
| 78 | 80 | ||
