Skip to contentSkip to conversation

curl: Fix CVE-2022-43551 and CVE-2022-43552

PATCH New Robert Joslyn 1 participant 1 message Jan 8, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 curl: Fix CVE-2022-43551 and CVE-2022-43552

Backport patches to address these CVEs.
* https://curl.se/docs/CVE-2022-43551.html
* https://curl.se/docs/CVE-2022-43552.html

---
 .../curl/curl/CVE-2022-43551.patch            | 32 ++++++++
 .../curl/curl/CVE-2022-43552.patch            | 78 +++++++++++++++++++
 meta/recipes-support/curl/curl_7.85.0.bb      |  2 +
 3 files changed, 112 insertions(+)
 create mode 100644 meta/recipes-support/curl/curl/CVE-2022-43551.patch
 create mode 100644 meta/recipes-support/curl/curl/CVE-2022-43552.patch
meta/recipes-support/curl/curl/CVE-2022-43551.patch new file +32 -0
new file mode 100644
index 0000000000..7c617ef1db
@@ -0,0 +1,32 @@
+From 08aa76b7b24454a89866aaef661ea90ae3d57900 Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg <[email protected]>
+Date: Mon, 19 Dec 2022 08:36:55 +0100
+Subject: [PATCH] http: use the IDN decoded name in HSTS checks
+
+Otherwise it stores the info HSTS into the persistent cache for the IDN
+name which will not match when the HSTS status is later checked for
+using the decoded name.
+
+Reported-by: Hiroki Kurosawa
+
+Closes #10111
+
+Upstream-Status: Backport [https://github.com/curl/curl/commit/9e71901634e276dd]
+Signed-off-by: Robert Joslyn <[email protected]>
+---
+ lib/http.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/http.c b/lib/http.c
+index b0ad28e..8b18e8d 100644
+--- a/lib/http.c
++++ b/lib/http.c
+@@ -3654,7 +3654,7 @@ CURLcode Curl_http_header(struct Curl_easy *data, struct connectdata *conn,
+   else if(data->hsts && checkprefix("Strict-Transport-Security:", headp) &&
+           (conn->handler->flags & PROTOPT_SSL)) {
+     CURLcode check =
+-      Curl_hsts_parse(data->hsts, data->state.up.hostname,
++      Curl_hsts_parse(data->hsts, conn->host.name,
+                       headp + strlen("Strict-Transport-Security:"));
+     if(check)
+       infof(data, "Illegal STS header skipped");
meta/recipes-support/curl/curl/CVE-2022-43552.patch new file +78 -0

78 lines not on this page · raw message

meta/recipes-support/curl/curl_7.85.0.bb +2 -0
index a4561494d1..1e47e9fac5 100644
@@ -17,6 +17,8 @@ SRC_URI = " \
     file://CVE-2022-35260.patch \
     file://CVE-2022-42915.patch \
     file://CVE-2022-42916.patch \
+    file://CVE-2022-43551.patch \
+    file://CVE-2022-43552.patch \
 "
 SRC_URI[sha256sum] = "88b54a6d4b9a48cb4d873c7056dcba997ddd5b7be5a2d537a4acb55c20b04be6"
 
Signature · 1 line
2.38.2