summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/go/go-1.14/CVE-2022-27664.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/go/go-1.14/CVE-2022-27664.patch')
-rw-r--r--meta/recipes-devtools/go/go-1.14/CVE-2022-27664.patch68
1 files changed, 68 insertions, 0 deletions
diff --git a/meta/recipes-devtools/go/go-1.14/CVE-2022-27664.patch b/meta/recipes-devtools/go/go-1.14/CVE-2022-27664.patch
new file mode 100644
index 0000000000..238c3eac5b
--- /dev/null
+++ b/meta/recipes-devtools/go/go-1.14/CVE-2022-27664.patch
@@ -0,0 +1,68 @@
1From 48c9076dcfc2dc894842ff758c8cfae7957c9565 Mon Sep 17 00:00:00 2001
2From: Hitendra Prajapati <hprajapati@mvista.com>
3Date: Thu, 29 Sep 2022 17:06:18 +0530
4Subject: [PATCH] CVE-2022-27664
5
6Upstream-Status: Backport [https://github.com/golang/go/commit/5bc9106458fc07851ac324a4157132a91b1f3479]
7CVE: CVE-2022-27664
8Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
9---
10 src/net/http/h2_bundle.go | 21 +++++++++++++--------
11 1 file changed, 13 insertions(+), 8 deletions(-)
12
13diff --git a/src/net/http/h2_bundle.go b/src/net/http/h2_bundle.go
14index 65d851d..83f2a72 100644
15--- a/src/net/http/h2_bundle.go
16+++ b/src/net/http/h2_bundle.go
17@@ -3254,10 +3254,11 @@ var (
18 // name (key). See httpguts.ValidHeaderName for the base rules.
19 //
20 // Further, http2 says:
21-// "Just as in HTTP/1.x, header field names are strings of ASCII
22-// characters that are compared in a case-insensitive
23-// fashion. However, header field names MUST be converted to
24-// lowercase prior to their encoding in HTTP/2. "
25+//
26+// "Just as in HTTP/1.x, header field names are strings of ASCII
27+// characters that are compared in a case-insensitive
28+// fashion. However, header field names MUST be converted to
29+// lowercase prior to their encoding in HTTP/2. "
30 func http2validWireHeaderFieldName(v string) bool {
31 if len(v) == 0 {
32 return false
33@@ -3446,8 +3447,8 @@ func (s *http2sorter) SortStrings(ss []string) {
34 // validPseudoPath reports whether v is a valid :path pseudo-header
35 // value. It must be either:
36 //
37-// *) a non-empty string starting with '/'
38-// *) the string '*', for OPTIONS requests.
39+// *) a non-empty string starting with '/'
40+// *) the string '*', for OPTIONS requests.
41 //
42 // For now this is only used a quick check for deciding when to clean
43 // up Opaque URLs before sending requests from the Transport.
44@@ -4897,6 +4898,9 @@ func (sc *http2serverConn) startGracefulShutdownInternal() {
45 func (sc *http2serverConn) goAway(code http2ErrCode) {
46 sc.serveG.check()
47 if sc.inGoAway {
48+ if sc.goAwayCode == http2ErrCodeNo {
49+ sc.goAwayCode = code
50+ }
51 return
52 }
53 sc.inGoAway = true
54@@ -6091,8 +6095,9 @@ func (rws *http2responseWriterState) writeChunk(p []byte) (n int, err error) {
55 // prior to the headers being written. If the set of trailers is fixed
56 // or known before the header is written, the normal Go trailers mechanism
57 // is preferred:
58-// https://golang.org/pkg/net/http/#ResponseWriter
59-// https://golang.org/pkg/net/http/#example_ResponseWriter_trailers
60+//
61+// https://golang.org/pkg/net/http/#ResponseWriter
62+// https://golang.org/pkg/net/http/#example_ResponseWriter_trailers
63 const http2TrailerPrefix = "Trailer:"
64
65 // promoteUndeclaredTrailers permits http.Handlers to set trailers
66--
672.25.1
68