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

Update to golang.org/x/net@v0.33 to fix CVE-2024-45337(CRITICAL) a… #7915

Open
wants to merge 1 commit into
base: cluster-autoscaler-release-1.30
Choose a base branch
from

Conversation

brecode
Copy link

@brecode brecode commented Mar 13, 2025

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Trivy scans alerted on cluster-autoscaler:v1.30.3 on following CVEs

CVE-2024-45337
CVE-2024-45338

image

This PR addresses the above CVEs on autoscaler release-1.30 codebase

for subdir in cluster-autoscaler/apis cluster-autoscaler/cloudprovider/azure/test cluster-autoscaler; do
  pushd $subdir
  go get golang.org/x/net@v0.33
  go mod tidy
  popd
done

Does this PR introduce a user-facing change?

NONE

@k8s-ci-robot k8s-ci-robot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Mar 13, 2025
Copy link

linux-foundation-easycla bot commented Mar 13, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: brecode / name: Nikos (4d4ba6c)

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Mar 13, 2025
@k8s-ci-robot
Copy link
Contributor

Welcome @brecode!

It looks like this is your first PR to kubernetes/autoscaler 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/autoscaler has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 13, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @brecode. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added area/provider/azure Issues or PRs related to azure provider area/vertical-pod-autoscaler size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Mar 13, 2025
@voelzmo
Copy link
Contributor

voelzmo commented Mar 13, 2025

Hey @brecode thanks for offering a fix for the CVE! I see that you're PRing to a CA release branch, so any change that doesn't involve the CA component should probably not be in here.

…VE-2024-45338(HIGH)

* Updated go.mod to corresponding folders
* Updated vendor folder
@brecode brecode force-pushed the cluster-autoscaler-release-1.30 branch from f41fea4 to 4d4ba6c Compare March 13, 2025 16:21
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: brecode
Once this PR has been reviewed and has the lgtm label, please assign towca for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@brecode
Copy link
Author

brecode commented Mar 13, 2025

@voelzmo thanks for the feedback, updated PR with changes related to cluster-autoscaler only

@x13n
Copy link
Member

x13n commented Mar 14, 2025

PR title mentions golang.org/x/oauth2@v0.27, but go.mod contents don't actually change this package version - only other packages.

@x13n
Copy link
Member

x13n commented Mar 14, 2025

Also, CA tends to stay in sync with k/k dependencies. I see oauth2 v0.10.0 is also used there: https://github.com/kubernetes/kubernetes/blob/v1.30.11/go.mod#L79 Would you mind addressing this CVE in upstream Kubernetes repository? The dependency will then be imported to Cluster Autoscaler during next update.

@brecode brecode changed the title Update to golang.org/x/oauth2@v0.27 to fix CVE-2024-45337(CRITICAL) a… Update to golang.org/x/net@v0.33 to fix CVE-2024-45337(CRITICAL) a… Mar 14, 2025
@brecode
Copy link
Author

brecode commented Mar 14, 2025

PR title mentions golang.org/x/oauth2@v0.27, but go.mod contents don't actually change this package version - only other packages.

Wrong copy paste. Title fixed. Command used is on description:
go get golang.org/x/net@v0.33

The above covers the x/crypto CVE too

Also, CA tends to stay in sync with k/k dependencies. I see oauth2 v0.10.0 is also used there: https://github.com/kubernetes/kubernetes/blob/v1.30.11/go.mod#L79 Would you mind addressing this CVE in upstream Kubernetes repository? The dependency will then be imported to Cluster Autoscaler during next update.

I can certainly open a PR on kubernetes repo for v1.30.11. I see cluster autoscaler is using 1.30.5
https://github.com/kubernetes/autoscaler/blob/cc795019c6b6cb985769ae57d1acf479c3910546/cluster-autoscaler/go.mod#L54C3-L54C27

Is that going to be upgraded to 1.30.xx (latest) on next release for cluster-autoscaler ?

Thanks

@x13n
Copy link
Member

x13n commented Mar 14, 2025

Yes, it already was: #7922

For k/k repo, 1.30.11 tag already exists, but CVE fix can be included in time before 1.30.12 comes out (this month I think?)

@brecode
Copy link
Author

brecode commented Mar 14, 2025

Opened a PR here: kubernetes/kubernetes#130832.

In the meantime is there any other reason not to merge this or you want this update to be brought in from k8s 1.30.12?
Either way it's a direct import on autoscaler

@BenTheElder
Copy link
Member

Autoscaler isn't running an SSH server is it??

I would recommend using a symbol aware scanner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cluster-autoscaler area/provider/azure Issues or PRs related to azure provider area/vertical-pod-autoscaler cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants