Skip to content

Commit 6413894

Browse files
committed
fix: force HTTP/1.1 connections
Commit b3b011b was not enough to prevent HTTP2 connections as demonstrated in kubernetes/kubernetes#121197. To prevent any risk with HTTP2, this change disables HTTP2 at the server level. There's no expected performance penalty because the web server is only used for scraping metrics. Signed-off-by: Simon Pasquier <[email protected]>
1 parent 3cc8dd9 commit 6413894

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: pkg/metrics/server.go

+5
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ func (s *Server) Run(ctx context.Context) error {
7878
if err != nil {
7979
return err
8080
}
81+
// Mitigate CVE-2023-44487 by disabling HTTP2 until the Go standard library
82+
// and golang.org/x/net are fully fixed.
83+
// Since the web server is only used to expose the metrics endpoint,
84+
// downgrading to HTTP/1.1 doesn't bring any performance penalty.
85+
serverConfig.SecureServing.DisableHTTP2 = true
8186

8287
serverConfig.Authorization.Authorizer = union.New(
8388
// prefix the authorizer with the permissions for metrics scraping which are well known.

0 commit comments

Comments
 (0)