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 08/12] curl: fix CVE-2026-87864
Date: Tue, 3 Nov 2026 23:36:23 -0800 [thread overview]
Message-ID: <20261104073627.302002-9-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].
Determine the IMAP APPEND length after configuring all upload
readers. Reject uploads whose final length becomes unknown because
of CRLF conversion before sending the APPEND command.
[1] https://github.com/curl/curl/commit/3b547de301342b347fb3c6ea6ae7979070793a66
[2] https://curl.se/docs/CVE-2026-87864.html
Signed-off-by: Darsh Kelaiya <dkelaiya@cisco.com>
---
.../curl/curl/CVE-2026-87864.patch | 55 +++++++++++++++++++
meta/recipes-support/curl/curl_8.19.0.bb | 1 +
2 files changed, 56 insertions(+)
create mode 100644 meta/recipes-support/curl/curl/CVE-2026-87864.patch
diff --git a/meta/recipes-support/curl/curl/CVE-2026-87864.patch b/meta/recipes-support/curl/curl/CVE-2026-87864.patch
new file mode 100644
index 00000000000..0effc5ac8ac
--- /dev/null
+++ b/meta/recipes-support/curl/curl/CVE-2026-87864.patch
@@ -0,0 +1,55 @@
+From 3b547de301342b347fb3c6ea6ae7979070793a66 Mon Sep 17 00:00:00 2001
+From: Stefan Eissing <stefan@eissing.org>
+Date: Thu, 27 Aug 2026 09:47:53 +0200
+Subject: [PATCH] imap: APPEND CRLF fix
+
+Deny an APPEND operation with CRLF conversion requested as we are unable
+to predict the final upload size and APPEND requires us to announce it
+before starting the upload.
+
+The check for unknown sizes had already been there, but the crlf
+conversion that renders a known size unknown was not accounted for.
+
+Closes #22702
+
+CVE: CVE-2026-87864
+Upstream-Status: Backport [https://github.com/curl/curl/commit/3b547de301342b347fb3c6ea6ae7979070793a66]
+
+(cherry picked from commit 3b547de301342b347fb3c6ea6ae7979070793a66)
+Signed-off-by: Darsh Kelaiya <dkelaiya@cisco.com>
+---
+ lib/imap.c | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/lib/imap.c b/lib/imap.c
+index 0546595..f37568f 100644
+--- a/lib/imap.c
++++ b/lib/imap.c
+@@ -884,7 +884,6 @@ static CURLcode imap_perform_append(struct Curl_easy *data,
+ result = Curl_creader_set_mime(data, postp);
+ if(result)
+ return result;
+- data->state.infilesize = Curl_creader_client_length(data);
+ }
+ else
+ #endif
+@@ -894,9 +893,15 @@ static CURLcode imap_perform_append(struct Curl_easy *data,
+ return result;
+ }
+
+- /* Check we know the size of the upload */
++ /* Check we know the size of the upload. This takes all readers
++ * into account. Especially crlf conversions which make the size
++ * unpredictable, e.g. -1. */
++ data->state.infilesize = Curl_creader_total_length(data);
+ if(data->state.infilesize < 0) {
+- failf(data, "Cannot APPEND with unknown input file size");
++ if(data->set.crlf)
++ failf(data, "Cannot APPEND with CRLF conversion making size unknown");
++ else
++ failf(data, "Cannot APPEND with unknown input file size");
+ return CURLE_UPLOAD_FAILED;
+ }
+
+--
+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 9a85d470dc5..e039207a0e4 100644
--- a/meta/recipes-support/curl/curl_8.19.0.bb
+++ b/meta/recipes-support/curl/curl_8.19.0.bb
@@ -56,6 +56,7 @@ SRC_URI = "https://curl.se/download/${BP}.tar.xz \
file://CVE-2026-92386_p1.patch \
file://CVE-2026-92386_p2.patch \
file://CVE-2026-107928.patch \
+ file://CVE-2026-87864.patch \
"
SRC_URI:append:class-nativesdk = " \
--
2.35.6
next prev parent 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 ` [OE-core][wrynose][PATCH 01/12] curl: fix CVE-2026-86414 Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco)
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 ` Darsh Kelaiya -X (dkelaiya - E INFOCHIPS PRIVATE LIMITED at Cisco) [this message]
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-9-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