curl: fix CVE-2022-32221 POST following PUT

Upstream-Status: Backport from https://github.com/curl/curl/commit/a64e3e59938abd7d6

(From OE-Core rev: 9af175e122acb93a412ad7a099f0eaa793a1c097)

Signed-off-by: Vivek Kumbhar <vkumbhar@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Vivek Kumbhar
2022-11-11 11:10:31 +05:30
committed by Richard Purdie
parent b39245d723
commit 213cf8004c
2 changed files with 30 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
From 75c04a3e75e8e3025a17ca3033ca307da9691cd0 Mon Sep 17 00:00:00 2001
From: Vivek Kumbhar <vkumbhar@mvista.com>
Date: Fri, 11 Nov 2022 10:49:58 +0530
Subject: [PATCH] CVE-2022-32221
Upstream-Status: Backport [https://github.com/curl/curl/commit/a64e3e59938abd7d6]
CVE: CVE-2022-32221
Signed-off-by: Vivek Kumbhar <vkumbhar@mvista.com>
setopt: when POST is set, reset the 'upload' field.
---
lib/setopt.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/setopt.c b/lib/setopt.c
index bebb2e4..4d96f6b 100644
--- a/lib/setopt.c
+++ b/lib/setopt.c
@@ -486,6 +486,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
}
else
data->set.httpreq = HTTPREQ_GET;
+ data->set.upload = FALSE;
break;
case CURLOPT_COPYPOSTFIELDS:
--
2.25.1

View File

@@ -39,6 +39,7 @@ SRC_URI = "https://curl.haxx.se/download/curl-${PV}.tar.bz2 \
file://CVE-2022-32207.patch \
file://CVE-2022-32208.patch \
file://CVE-2022-35252.patch \
file://CVE-2022-32221.patch \
"
SRC_URI[md5sum] = "ec5fc263f898a3dfef08e805f1ecca42"