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

CVE-2024-24790: bump go to 1.22.6 #917

Merged
merged 2 commits into from
Sep 7, 2024

Conversation

sdx-jkataja
Copy link
Contributor

Fixes vulnerability CVE-2024-24790 by updating Go to 1.22.6

Fixes #913

@@ -6,7 +6,7 @@ executors:
# This must match .promu.yml.
golang:
docker:
- image: cimg/go:1.21
- image: cimg/go:1.22.6
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs to be changed in .promu.yml as well although there it should just be 1.22.
See here: https://github.com/prometheus/prometheus/blob/main/.promu.yml

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Commit fe96c8f

go.mod Outdated
@@ -1,6 +1,6 @@
module github.com/prometheus-community/elasticsearch_exporter

go 1.20
go 1.22.6
Copy link
Contributor

Choose a reason for hiding this comment

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

I think with a version this new, the toolchain declaration is required.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please advise on what's needed for the toolchain declaration

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean the following declaration?

go 1.22.6

toolchain go1.22.6

Running go mod tidy removes the toolchain line, so I assume it won't be required.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it depends on your local go version. After a second thought, we don't need to change this file at all. This is only a minimum go version and we don't need any new language features so we can leave this as 1.20

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm go newbie so I had to check, and it appears you're correct. I have go 1.22.5 and when I built the code in master branch and then scan with Syft, it reports that the image contains go standard library 1.22.5.

Should I remove the change in go.mod and rely on CI files to use the updated go version?

Copy link
Contributor

Choose a reason for hiding this comment

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

Correct, you don't need the change in go.mod and in that case you also don't need the go.sum changes.

Copy link
Contributor Author

@sdx-jkataja sdx-jkataja Sep 6, 2024

Choose a reason for hiding this comment

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

Done, I removed that commit

@sdx-jkataja sdx-jkataja requested a review from sysadmind August 26, 2024 14:30
Signed-off-by: Janne Kataja <[email protected]>
Signed-off-by: Janne Kataja <[email protected]>
@sysadmind sysadmind merged commit 711a6ce into prometheus-community:master Sep 7, 2024
4 checks passed
@mohhai1
Copy link

mohhai1 commented Sep 9, 2024

@sysadmind , kindly, when do we expect w release/tag with the fix?

@sysadmind
Copy link
Contributor

@sdx-jkataja sdx-jkataja deleted the CVE-2024-24790 branch September 23, 2024 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CVE-2024-24790 Related to StdLib
3 participants