diff options
| author | Peter Marko <peter.marko@siemens.com> | 2026-01-10 18:36:24 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2026-01-26 09:45:39 +0000 |
| commit | 7a394819a89f0035f2468c45afa2a59c12a61b22 (patch) | |
| tree | 67271c2fa4d90e06fa0fb7dff127bc43c9284c3d /meta/recipes-support | |
| parent | b6ea3460e536206e1882cda235076e09e7233b4d (diff) | |
| download | poky-7a394819a89f0035f2468c45afa2a59c12a61b22.tar.gz | |
curl: patch CVE-2025-14017
Pick patch per [1].
[1] https://curl.se/docs/CVE-2025-14017.html
(From OE-Core rev: 2284de47317ada818f916be65abf13969294541c)
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>
Diffstat (limited to 'meta/recipes-support')
| -rw-r--r-- | meta/recipes-support/curl/curl/CVE-2025-14017.patch | 115 | ||||
| -rw-r--r-- | meta/recipes-support/curl/curl_8.7.1.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..887ff2f97c --- /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 | @@ -362,16 +362,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, conn->primary.remote_port, 1); | ||
| 26 | + else | ||
| 27 | +#else | ||
| 28 | + server = ldap_init(host, conn->primary.remote_port); | ||
| 29 | +#endif | ||
| 30 | + if(!server) { | ||
| 31 | + failf(data, "LDAP: cannot setup connect to %s:%u", | ||
| 32 | + conn->host.dispname, conn->primary.remote_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, conn->primary.remote_port, 1); | ||
| 49 | ldap_set_option(server, LDAP_OPT_SSL, LDAP_OPT_ON); | ||
| 50 | #else | ||
| 51 | int ldap_option; | ||
| 52 | @@ -439,7 +452,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 | @@ -451,20 +464,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, conn->primary.remote_port); | ||
| 74 | - if(!server) { | ||
| 75 | - failf(data, "LDAP local: Cannot connect to %s:%u", | ||
| 76 | - conn->host.dispname, conn->primary.remote_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 | @@ -473,15 +479,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 | @@ -498,15 +495,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, conn->primary.remote_port); | ||
| 105 | - if(!server) { | ||
| 106 | - failf(data, "LDAP local: Cannot connect to %s:%u", | ||
| 107 | - conn->host.dispname, conn->primary.remote_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_8.7.1.bb b/meta/recipes-support/curl/curl_8.7.1.bb index 0af6a41399..aa978f0346 100644 --- a/meta/recipes-support/curl/curl_8.7.1.bb +++ b/meta/recipes-support/curl/curl_8.7.1.bb | |||
| @@ -25,6 +25,7 @@ SRC_URI = " \ | |||
| 25 | file://CVE-2024-11053-0003.patch \ | 25 | file://CVE-2024-11053-0003.patch \ |
| 26 | file://CVE-2025-0167.patch \ | 26 | file://CVE-2025-0167.patch \ |
| 27 | file://CVE-2025-9086.patch \ | 27 | file://CVE-2025-9086.patch \ |
| 28 | file://CVE-2025-14017.patch \ | ||
| 28 | " | 29 | " |
| 29 | 30 | ||
| 30 | SRC_URI:append:class-nativesdk = " \ | 31 | SRC_URI:append:class-nativesdk = " \ |
