diff options
| author | Peter Marko <peter.marko@siemens.com> | 2026-01-10 18:36:33 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2026-01-26 09:49:25 +0000 |
| commit | fd21399bac8bfdd89611eec93b0afab8547c39d8 (patch) | |
| tree | 360ff6ca47a907c2cbbb7c48ebff41ec5fd2e5d3 | |
| parent | 2654f4f66c8f46724592c5f914e7f5a518435605 (diff) | |
| download | poky-fd21399bac8bfdd89611eec93b0afab8547c39d8.tar.gz | |
curl: patch CVE-2025-14017
Pick patch per [1].
[1] https://curl.se/docs/CVE-2025-14017.html
(From OE-Core rev: ae23e163f7399e957a100dc13d9cd0b829eef2f4)
Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Paul Barker <paul@pbarker.dev>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-support/curl/curl/CVE-2025-14017.patch | 115 | ||||
| -rw-r--r-- | meta/recipes-support/curl/curl_7.82.0.bb | 1 |
2 files changed, 116 insertions, 0 deletions
diff --git a/meta/recipes-support/curl/curl/CVE-2025-14017.patch b/meta/recipes-support/curl/curl/CVE-2025-14017.patch new file mode 100644 index 0000000000..a18e1d74dd --- /dev/null +++ b/meta/recipes-support/curl/curl/CVE-2025-14017.patch | |||
| @@ -0,0 +1,115 @@ | |||
| 1 | From 39d1976b7f709a516e3243338ebc0443bdd8d56d Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Daniel Stenberg <daniel@haxx.se> | ||
| 3 | Date: Thu, 4 Dec 2025 00:14:20 +0100 | ||
| 4 | Subject: [PATCH] ldap: call ldap_init() before setting the options | ||
| 5 | |||
| 6 | Closes #19830 | ||
| 7 | |||
| 8 | CVE: CVE-2025-14017 | ||
| 9 | Upstream-Status: Backport [https://github.com/curl/curl/commit/39d1976b7f709a516e3243338ebc0443bdd8d56d] | ||
| 10 | Signed-off-by: Peter Marko <peter.marko@siemens.com> | ||
| 11 | --- | ||
| 12 | lib/ldap.c | 49 +++++++++++++++++++------------------------------ | ||
| 13 | 1 file changed, 19 insertions(+), 30 deletions(-) | ||
| 14 | |||
| 15 | diff --git a/lib/ldap.c b/lib/ldap.c | ||
| 16 | index 63b2cbc414..0911a9239a 100644 | ||
| 17 | --- a/lib/ldap.c | ||
| 18 | +++ b/lib/ldap.c | ||
| 19 | @@ -333,16 +333,29 @@ static CURLcode ldap_do(struct Curl_easy *data, bool *done) | ||
| 20 | passwd = conn->passwd; | ||
| 21 | } | ||
| 22 | |||
| 23 | +#ifdef USE_WIN32_LDAP | ||
| 24 | + if(ldap_ssl) | ||
| 25 | + server = ldap_sslinit(host, (int)conn->port, 1); | ||
| 26 | + else | ||
| 27 | +#else | ||
| 28 | + server = ldap_init(host, (int)conn->port); | ||
| 29 | +#endif | ||
| 30 | + if(!server) { | ||
| 31 | + failf(data, "LDAP local: Cannot connect to %s:%ld", | ||
| 32 | + conn->host.dispname, conn->port); | ||
| 33 | + result = CURLE_COULDNT_CONNECT; | ||
| 34 | + goto quit; | ||
| 35 | + } | ||
| 36 | + | ||
| 37 | #ifdef LDAP_OPT_NETWORK_TIMEOUT | ||
| 38 | - ldap_set_option(NULL, LDAP_OPT_NETWORK_TIMEOUT, &ldap_timeout); | ||
| 39 | + ldap_set_option(server, LDAP_OPT_NETWORK_TIMEOUT, &ldap_timeout); | ||
| 40 | #endif | ||
| 41 | - ldap_set_option(NULL, LDAP_OPT_PROTOCOL_VERSION, &ldap_proto); | ||
| 42 | + ldap_set_option(server, LDAP_OPT_PROTOCOL_VERSION, &ldap_proto); | ||
| 43 | |||
| 44 | if(ldap_ssl) { | ||
| 45 | #ifdef HAVE_LDAP_SSL | ||
| 46 | #ifdef USE_WIN32_LDAP | ||
| 47 | /* Win32 LDAP SDK doesn't support insecure mode without CA! */ | ||
| 48 | - server = ldap_sslinit(host, (int)conn->port, 1); | ||
| 49 | ldap_set_option(server, LDAP_OPT_SSL, LDAP_OPT_ON); | ||
| 50 | #else | ||
| 51 | int ldap_option; | ||
| 52 | @@ -410,7 +423,7 @@ static CURLcode ldap_do(struct Curl_easy *data, bool *done) | ||
| 53 | goto quit; | ||
| 54 | } | ||
| 55 | infof(data, "LDAP local: using PEM CA cert: %s", ldap_ca); | ||
| 56 | - rc = ldap_set_option(NULL, LDAP_OPT_X_TLS_CACERTFILE, ldap_ca); | ||
| 57 | + rc = ldap_set_option(server, LDAP_OPT_X_TLS_CACERTFILE, ldap_ca); | ||
| 58 | if(rc != LDAP_SUCCESS) { | ||
| 59 | failf(data, "LDAP local: ERROR setting PEM CA cert: %s", | ||
| 60 | ldap_err2string(rc)); | ||
| 61 | @@ -422,20 +435,13 @@ static CURLcode ldap_do(struct Curl_easy *data, bool *done) | ||
| 62 | else | ||
| 63 | ldap_option = LDAP_OPT_X_TLS_NEVER; | ||
| 64 | |||
| 65 | - rc = ldap_set_option(NULL, LDAP_OPT_X_TLS_REQUIRE_CERT, &ldap_option); | ||
| 66 | + rc = ldap_set_option(server, LDAP_OPT_X_TLS_REQUIRE_CERT, &ldap_option); | ||
| 67 | if(rc != LDAP_SUCCESS) { | ||
| 68 | failf(data, "LDAP local: ERROR setting cert verify mode: %s", | ||
| 69 | ldap_err2string(rc)); | ||
| 70 | result = CURLE_SSL_CERTPROBLEM; | ||
| 71 | goto quit; | ||
| 72 | } | ||
| 73 | - server = ldap_init(host, (int)conn->port); | ||
| 74 | - if(!server) { | ||
| 75 | - failf(data, "LDAP local: Cannot connect to %s:%ld", | ||
| 76 | - conn->host.dispname, conn->port); | ||
| 77 | - result = CURLE_COULDNT_CONNECT; | ||
| 78 | - goto quit; | ||
| 79 | - } | ||
| 80 | ldap_option = LDAP_OPT_X_TLS_HARD; | ||
| 81 | rc = ldap_set_option(server, LDAP_OPT_X_TLS, &ldap_option); | ||
| 82 | if(rc != LDAP_SUCCESS) { | ||
| 83 | @@ -444,15 +450,6 @@ static CURLcode ldap_do(struct Curl_easy *data, bool *done) | ||
| 84 | result = CURLE_SSL_CERTPROBLEM; | ||
| 85 | goto quit; | ||
| 86 | } | ||
| 87 | -/* | ||
| 88 | - rc = ldap_start_tls_s(server, NULL, NULL); | ||
| 89 | - if(rc != LDAP_SUCCESS) { | ||
| 90 | - failf(data, "LDAP local: ERROR starting SSL/TLS mode: %s", | ||
| 91 | - ldap_err2string(rc)); | ||
| 92 | - result = CURLE_SSL_CERTPROBLEM; | ||
| 93 | - goto quit; | ||
| 94 | - } | ||
| 95 | -*/ | ||
| 96 | #else | ||
| 97 | /* we should probably never come up to here since configure | ||
| 98 | should check in first place if we can support LDAP SSL/TLS */ | ||
| 99 | @@ -469,15 +466,7 @@ static CURLcode ldap_do(struct Curl_easy *data, bool *done) | ||
| 100 | result = CURLE_NOT_BUILT_IN; | ||
| 101 | goto quit; | ||
| 102 | } | ||
| 103 | - else { | ||
| 104 | - server = ldap_init(host, (int)conn->port); | ||
| 105 | - if(!server) { | ||
| 106 | - failf(data, "LDAP local: Cannot connect to %s:%ld", | ||
| 107 | - conn->host.dispname, conn->port); | ||
| 108 | - result = CURLE_COULDNT_CONNECT; | ||
| 109 | - goto quit; | ||
| 110 | - } | ||
| 111 | - } | ||
| 112 | + | ||
| 113 | #ifdef USE_WIN32_LDAP | ||
| 114 | ldap_set_option(server, LDAP_OPT_PROTOCOL_VERSION, &ldap_proto); | ||
| 115 | rc = ldap_win_bind(data, server, user, passwd); | ||
diff --git a/meta/recipes-support/curl/curl_7.82.0.bb b/meta/recipes-support/curl/curl_7.82.0.bb index 2326392a4f..db3dc01929 100644 --- a/meta/recipes-support/curl/curl_7.82.0.bb +++ b/meta/recipes-support/curl/curl_7.82.0.bb | |||
| @@ -67,6 +67,7 @@ SRC_URI = "https://curl.se/download/${BP}.tar.xz \ | |||
| 67 | file://CVE-2024-11053-0002.patch \ | 67 | file://CVE-2024-11053-0002.patch \ |
| 68 | file://CVE-2025-0167.patch \ | 68 | file://CVE-2025-0167.patch \ |
| 69 | file://CVE-2025-9086.patch \ | 69 | file://CVE-2025-9086.patch \ |
| 70 | file://CVE-2025-14017.patch \ | ||
| 70 | " | 71 | " |
| 71 | SRC_URI[sha256sum] = "0aaa12d7bd04b0966254f2703ce80dd5c38dbbd76af0297d3d690cdce58a583c" | 72 | SRC_URI[sha256sum] = "0aaa12d7bd04b0966254f2703ce80dd5c38dbbd76af0297d3d690cdce58a583c" |
| 72 | 73 | ||
