Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-4.10]: UPSTREAM: 121120: Prevent rapid reset http2 DOS on API server #46

Closed

Conversation

dgrisonnet
Copy link
Member

@dgrisonnet dgrisonnet commented Oct 20, 2023

On top of the upstream cherry-pick bringing the HTTP/2 mitigation, this PR contains a carry patch to enable the UnauthenticatedHTTP2DOSMitigation feature gate by default.

proof: openshift/cluster-policy-controller#141

@dgrisonnet dgrisonnet changed the title UPSTREAM: 121120: Prevent rapid reset http2 DOS on API server [release-4.10]: UPSTREAM: 121120: Prevent rapid reset http2 DOS on API server Oct 20, 2023
@openshift-ci openshift-ci bot requested review from deads2k and ncdc October 20, 2023 17:30
Copy link
Member

@dinhxuanvu dinhxuanvu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 20, 2023
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Oct 23, 2023
@openshift-ci
Copy link

openshift-ci bot commented Oct 23, 2023

New changes are detected. LGTM label has been removed.

MadhavJivrajani and others added 2 commits October 23, 2023 16:41
Bumping golang.org/x/net in light of CVE-2023-39325 and CVE-2023-44487.

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>

Kubernetes-commit: 3d980e0633d9043f1bc4e6a3141185fbece78183
This change fully addresses CVE-2023-44487 and CVE-2023-39325 for
the API server when the client is unauthenticated.

The changes to util/runtime are required because otherwise a large
number of requests can get blocked on the time.Sleep calls.

For unauthenticated clients (either via 401 or the anonymous user),
we simply no longer allow such clients to hold open http2
connections.  They can use http2, but with the performance of http1
(with keep-alive disabled).

Since this change has the potential to cause issues, the
UnauthenticatedHTTP2DOSMitigation feature gate can be disabled to
remove this protection (it is enabled by default).  For example,
when the API server is fronted by an L7 load balancer that is set up
to mitigate http2 attacks, unauthenticated clients could force
disable connection reuse between the load balancer and the API
server (many incoming connections could share the same backend
connection).  An API server that is on a private network may opt to
disable this protection to prevent performance regressions for
unauthenticated clients.

For all other clients, we rely on the golang.org/x/net fix in
golang/net@b225e7c
That change is not sufficient to adequately protect against a
motivated client - future changes to Kube and/or golang.org/x/net
will be explored to address this gap.

The Kube API server now uses a max stream of 100 instead of 250
(this matches the Go http2 client default).  This lowers the abuse
limit from 1000 to 400.

Signed-off-by: Monis Khan <mok@microsoft.com>

Kubernetes-commit: d40f08f4a44785c238c280a8ec4fb944928253ed

Disable UnauthenticatedHTTP2DOSMitigation by default

This makes backports safer by not changing any default behavior.

Signed-off-by: Monis Khan <mok@microsoft.com>

Kubernetes-commit: 8af7deedb176af04543ba53b1312d9771c53b6b4
Enable the UnauthenticatedHTTP2DOSMitigation feature gate by default to
mitigate the HTTP/2 CVE across all our components.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
@dgrisonnet
Copy link
Member Author

Closing as 4.10 is EOL.

@dgrisonnet dgrisonnet closed this Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants