Skip to contentSkip to conversation

go: Add fix for CVE-2022-32190

PATCH New Shubham Kulkarni 1 participant 1 message Sep 29, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 go: Add fix for CVE-2022-32190

---
 meta/recipes-devtools/go/go-1.14.inc               |  4 ++
 .../go/go-1.14/0001-CVE-2022-32190.patch           | 74 +++++++++++++++++++
 .../go/go-1.14/0002-CVE-2022-32190.patch           | 48 +++++++++++++
 .../go/go-1.14/0003-CVE-2022-32190.patch           | 36 ++++++++++
 .../go/go-1.14/0004-CVE-2022-32190.patch           | 82 ++++++++++++++++++++++
 5 files changed, 244 insertions(+)
 create mode 100644 meta/recipes-devtools/go/go-1.14/0001-CVE-2022-32190.patch
 create mode 100644 meta/recipes-devtools/go/go-1.14/0002-CVE-2022-32190.patch
 create mode 100644 meta/recipes-devtools/go/go-1.14/0003-CVE-2022-32190.patch
 create mode 100644 meta/recipes-devtools/go/go-1.14/0004-CVE-2022-32190.patch
meta/recipes-devtools/go/go-1.14.inc +4 -0
index af63452..6e37150 100644
@@ -36,6 +36,10 @@ SRC_URI += "\
     file://CVE-2021-36221.patch \
     file://CVE-2021-39293.patch \
     file://CVE-2021-41771.patch \
+    file://0001-CVE-2022-32190.patch \
+    file://0002-CVE-2022-32190.patch \
+    file://0003-CVE-2022-32190.patch \
+    file://0004-CVE-2022-32190.patch \
 "
 
 SRC_URI_append_libc-musl = " file://0009-ld-replace-glibc-dynamic-linker-with-musl.patch"
meta/recipes-devtools/go/go-1.14/0001-CVE-2022-32190.patch new file +74 -0

74 lines not on this page · raw message

meta/recipes-devtools/go/go-1.14/0002-CVE-2022-32190.patch new file +48 -0

48 lines not on this page · raw message

meta/recipes-devtools/go/go-1.14/0003-CVE-2022-32190.patch new file +36 -0
new file mode 100644
index 0000000..816d914
@@ -0,0 +1,36 @@
+From 2c632b883b0f11084cc247c8b50ad6c71fa7b447 Mon Sep 17 00:00:00 2001
+From: Sean Liao <[email protected]>
+Date: Sat, 9 Jul 2022 18:38:45 +0100
+Subject: [PATCH 3/4] net/url: use EscapedPath for url.JoinPath
+
+Fixes #53763
+
+Change-Id: I08b53f159ebdce7907e8cc17316fd0c982363239
+Reviewed-on: https://go-review.googlesource.com/c/go/+/416774
+TryBot-Result: Gopher Robot <[email protected]>
+Reviewed-by: Damien Neil <[email protected]>
+Reviewed-by: Bryan Mills <[email protected]>
+Run-TryBot: Ian Lance Taylor <[email protected]>
+
+Upstream-Status: Backport [https://github.com/golang/go/commit/bf5898ef53d1693aa572da0da746c05e9a6f15c5]
+CVE: CVE-2022-32190
+Signed-off-by: Shubham Kulkarni <[email protected]>
+---
+ src/net/url/url.go | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/net/url/url.go b/src/net/url/url.go
+index 3436707..73079a5 100644
+--- a/src/net/url/url.go
++++ b/src/net/url/url.go
+@@ -1111,7 +1111,7 @@ func (u *URL) UnmarshalBinary(text []byte) error {
+ func (u *URL) JoinPath(elem ...string) *URL {
+	url := *u
+	if len(elem) > 0 {
+-		elem = append([]string{u.Path}, elem...)
++		elem = append([]string{u.EscapedPath()}, elem...)
+		p := path.Join(elem...)
+		// path.Join will remove any trailing slashes.
+		// Preserve at least one.
+--
+2.7.4
meta/recipes-devtools/go/go-1.14/0004-CVE-2022-32190.patch new file +82 -0

82 lines not on this page · raw message

Signature · 1 line
2.7.4