summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/curl/curl/CVE-2023-27534.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/curl/curl/CVE-2023-27534.patch')
-rw-r--r--meta/recipes-support/curl/curl/CVE-2023-27534.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/meta/recipes-support/curl/curl/CVE-2023-27534.patch b/meta/recipes-support/curl/curl/CVE-2023-27534.patch
new file mode 100644
index 0000000000..3ecd181290
--- /dev/null
+++ b/meta/recipes-support/curl/curl/CVE-2023-27534.patch
@@ -0,0 +1,33 @@
1From 4e2b52b5f7a3bf50a0f1494155717b02cc1df6d6 Mon Sep 17 00:00:00 2001
2From: Daniel Stenberg <daniel@haxx.se>
3Date: Thu, 9 Mar 2023 16:22:11 +0100
4Subject: [PATCH] curl_path: create the new path with dynbuf
5
6Closes #10729
7
8CVE: CVE-2023-27534
9Note: This patch is needed to backport CVE-2023-27534
10Upstream-Status: Backport from [https://github.com/curl/curl/commit/4e2b52b5f7a3bf50a0f1494155717b02cc1df6d6]
11
12Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
13Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
14---
15 lib/curl_path.c | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18diff --git a/lib/curl_path.c b/lib/curl_path.c
19index 40b92ee..598c5dd 100644
20--- a/lib/curl_path.c
21+++ b/lib/curl_path.c
22@@ -60,7 +60,7 @@ CURLcode Curl_getworkingpath(struct connectdata *conn,
23 memcpy(real_path, working_path, 1 + working_path_len);
24 }
25 else if(conn->handler->protocol & CURLPROTO_SFTP) {
26- if((working_path_len > 1) && (working_path[1] == '~')) {
27+ if((working_path_len > 2) && !memcmp(working_path, "/~/", 3)) {
28 size_t homelen = strlen(homedir);
29 real_path = malloc(homelen + working_path_len + 1);
30 if(real_path == NULL) {
31--
322.24.4
33