new file mode 100644
@@ -0,0 +1,56 @@
+From ab9213549c9c7f087cbaa818492705b482c4309d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jo=C3=A3o=20Marcos=20Costa?= <joaomarcos.costa@bootlin.com>
+Date: Fri, 6 Nov 2026 10:31:16 +0100
+Subject: [PATCH] tftp: verify direction in a few places
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Closes #22974
+
+CVE: CVE-2026-92389
+Upstream-Status: Backport [https://github.com/curl/curl/commit/63dd390fab905a239a97e2700532929343ebc4e9]
+
+Signed-off-by: João Marcos Costa <joaomarcos.costa@bootlin.com>
+---
+ lib/tftp.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/lib/tftp.c b/lib/tftp.c
+index ff2b7b7457..def944ddd5 100644
+--- a/lib/tftp.c
++++ b/lib/tftp.c
+@@ -545,10 +545,14 @@ static CURLcode tftp_send_first(struct tftp_state_data *state,
+ break;
+
+ case TFTP_EVENT_ACK: /* Connected for transmit */
++ if(!data->state.upload)
++ return CURLE_TFTP_ILLEGAL;
+ result = tftp_connect_for_tx(state, event);
+ break;
+
+ case TFTP_EVENT_DATA: /* Connected for receive */
++ if(!data->state.upload)
++ return CURLE_TFTP_ILLEGAL;
+ result = tftp_connect_for_rx(state, event);
+ break;
+
+@@ -709,6 +713,9 @@ static CURLcode tftp_tx(struct tftp_state_data *state, tftp_event_t event)
+ char *bufptr;
+ bool eos;
+
++ if(!data->state.upload)
++ return CURLE_TFTP_ILLEGAL;
++
+ switch(event) {
+
+ case TFTP_EVENT_ACK:
+@@ -1131,6 +1138,8 @@ static CURLcode tftp_receive_packet(struct Curl_easy *data)
+
+ switch(state->event) {
+ case TFTP_EVENT_DATA:
++ if(!data->state.upload)
++ return CURLE_TFTP_ILLEGAL;
+ /* Don't pass to the client empty or retransmitted packets */
+ if(state->rbytes > 4 &&
+ (NEXT_BLOCKNUM(state->block) == getrpacketblock(&state->rpacket))) {
@@ -47,6 +47,7 @@ SRC_URI = "https://curl.se/download/${BP}.tar.xz \
file://CVE-2026-87864.patch \
file://CVE-2026-87865.patch \
file://CVE-2026-92386.patch \
+ file://CVE-2026-92389.patch \
"
SRC_URI:append:class-nativesdk = " \
This vulnerability, marked as High [1], was fixed upstream [2] since v8.23.0. Backport the fix to curl v8.7.1. [1] https://nvd.nist.gov/vuln/detail/cve-2026-92389 [2] https://curl.se/docs/CVE-2026-92389.html Signed-off-by: João Marcos Costa (Schneider Electric) <joaomarcos.costa@bootlin.com> --- .../curl/curl/CVE-2026-92389.patch | 56 +++++++++++++++++++ meta/recipes-support/curl/curl_8.7.1.bb | 1 + 2 files changed, 57 insertions(+) create mode 100644 meta/recipes-support/curl/curl/CVE-2026-92389.patch