summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPraveen Kumar <praveen.kumar@windriver.com>2025-06-25 11:28:54 +0530
committerSteve Sakoman <steve@sakoman.com>2025-07-07 07:42:58 -0700
commitb4562b5fca01d40057b2962bca2cc6b1f395e43e (patch)
tree59066d51eb5f181d70d2815e43f44d27b34255c8
parentb8f8125f05e8ece078ba6bf01eebb2900cf2f9bf (diff)
downloadpoky-b4562b5fca01d40057b2962bca2cc6b1f395e43e.tar.gz
go: fix CVE-2025-4673
Proxy-Authorization and Proxy-Authenticate headers persisted on cross-origin redirects potentially leaking sensitive information. Reference: https://nvd.nist.gov/vuln/detail/CVE-2025-4673 Upstream-patch: https://github.com/golang/go/commit/b897e97c36cb62629a458bc681723ca733404e32 (From OE-Core rev: 72279bbc1ff2d85563c5245195435f078c5d1a68) Signed-off-by: Praveen Kumar <praveen.kumar@windriver.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/recipes-devtools/go/go-1.22.12.inc1
-rw-r--r--meta/recipes-devtools/go/go/CVE-2025-4673.patch68
2 files changed, 69 insertions, 0 deletions
diff --git a/meta/recipes-devtools/go/go-1.22.12.inc b/meta/recipes-devtools/go/go-1.22.12.inc
index b154aa3984..af09cb52cd 100644
--- a/meta/recipes-devtools/go/go-1.22.12.inc
+++ b/meta/recipes-devtools/go/go-1.22.12.inc
@@ -16,5 +16,6 @@ SRC_URI += "\
16 file://0009-go-Filter-build-paths-on-staticly-linked-arches.patch \ 16 file://0009-go-Filter-build-paths-on-staticly-linked-arches.patch \
17 file://CVE-2025-22870.patch \ 17 file://CVE-2025-22870.patch \
18 file://CVE-2025-22871.patch \ 18 file://CVE-2025-22871.patch \
19 file://CVE-2025-4673.patch \
19" 20"
20SRC_URI[main.sha256sum] = "012a7e1f37f362c0918c1dfa3334458ac2da1628c4b9cf4d9ca02db986e17d71" 21SRC_URI[main.sha256sum] = "012a7e1f37f362c0918c1dfa3334458ac2da1628c4b9cf4d9ca02db986e17d71"
diff --git a/meta/recipes-devtools/go/go/CVE-2025-4673.patch b/meta/recipes-devtools/go/go/CVE-2025-4673.patch
new file mode 100644
index 0000000000..5ca4fec3dc
--- /dev/null
+++ b/meta/recipes-devtools/go/go/CVE-2025-4673.patch
@@ -0,0 +1,68 @@
1From b897e97c36cb62629a458bc681723ca733404e32 Mon Sep 17 00:00:00 2001
2From: Neal Patel <nealpatel@google.com>
3Date: Wed, 21 May 2025 14:11:44 -0400
4Subject: [PATCH] net/http: strip sensitive proxy headers from redirect
5 requests
6
7Similarly to Authentication entries, Proxy-Authentication entries should be stripped to ensure sensitive information is not leaked on redirects outside of the original domain.
8
9https://fetch.spec.whatwg.org/#authentication-entries
10
11Thanks to Takeshi Kaneko (GMO Cybersecurity by Ierae, Inc.) for reporting this issue.
12
13Updates golang/go#73816
14Fixes golang/go#73905
15Fixes CVE-2025-4673
16
17Change-Id: I1615f31977a2fd014fbc12aae43f82692315a6d0
18Reviewed-on: https://go-review.googlesource.com/c/go/+/679255
19LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
20Reviewed-by: Michael Knyszek <mknyszek@google.com>
21
22CVE: CVE-2025-4673
23
24Upstream-Status: Backport [https://github.com/golang/go/commit/b897e97c36cb62629a458bc681723ca733404e32]
25
26Signed-off-by: Praveen Kumar <praveen.kumar@windriver.com>
27---
28 src/net/http/client.go | 3 ++-
29 src/net/http/client_test.go | 3 +++
30 2 files changed, 5 insertions(+), 1 deletion(-)
31
32diff --git a/src/net/http/client.go b/src/net/http/client.go
33index 23f4d81..e07616b 100644
34--- a/src/net/http/client.go
35+++ b/src/net/http/client.go
36@@ -805,7 +805,8 @@ func (c *Client) makeHeadersCopier(ireq *Request) func(req *Request, stripSensit
37 for k, vv := range ireqhdr {
38 sensitive := false
39 switch CanonicalHeaderKey(k) {
40- case "Authorization", "Www-Authenticate", "Cookie", "Cookie2":
41+ case "Authorization", "Www-Authenticate", "Cookie", "Cookie2",
42+ "Proxy-Authorization", "Proxy-Authenticate":
43 sensitive = true
44 }
45 if !(sensitive && stripSensitiveHeaders) {
46diff --git a/src/net/http/client_test.go b/src/net/http/client_test.go
47index 641d7ff..97150bd 100644
48--- a/src/net/http/client_test.go
49+++ b/src/net/http/client_test.go
50@@ -1541,6 +1541,8 @@ func testClientStripHeadersOnRepeatedRedirect(t *testing.T, mode testMode) {
51 if r.Host+r.URL.Path != "a.example.com/" {
52 if h := r.Header.Get("Authorization"); h != "" {
53 t.Errorf("on request to %v%v, Authorization=%q, want no header", r.Host, r.URL.Path, h)
54+ } else if h := r.Header.Get("Proxy-Authorization"); h != "" {
55+ t.Errorf("on request to %v%v, Proxy-Authorization=%q, want no header", r.Host, r.URL.Path, h)
56 }
57 }
58 // Follow a chain of redirects from a to b and back to a.
59@@ -1569,6 +1571,7 @@ func testClientStripHeadersOnRepeatedRedirect(t *testing.T, mode testMode) {
60 req, _ := NewRequest("GET", proto+"://a.example.com/", nil)
61 req.Header.Add("Cookie", "foo=bar")
62 req.Header.Add("Authorization", "secretpassword")
63+ req.Header.Add("Proxy-Authorization", "secretpassword")
64 res, err := c.Do(req)
65 if err != nil {
66 t.Fatal(err)
67--
682.40.0