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

Backport of [NET-6138] security: Bump google.golang.org/grpc to 1.56.3 (CVE-2023-44487) to release/1.15.x #19421

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

zalimeni
Copy link
Member

@zalimeni zalimeni commented Oct 27, 2023

Backport

This PR is manually generated from #19414 to be assessed for backporting.

This backport also includes various fixes from later release versions required for
tests and linters to pass. See 77f44fa for the majority of these changes.

The below text is copied from the body of the original PR.


Description

Upgrade google.golang.org/grpc to 1.56.3 (where 1.57.x is already in use, upgrade to 1.57.2) to mitigate CVE-2023-44487.

1.56.3 was chosen as the earliest minor release line to receive a patch for this vulnerability in order to minimize change prior to the 1.17 release of Consul; a later upgrade should consider moving to the latest minor version of gRPC. A review of the release notes and changelog between 1.55.0 and 1.56.3 was conducted to check for unreported breaking changes.

Testing & Reproduction steps

CI tests should continue to pass.

Links

PR Checklist

  • updated test coverage
  • external facing docs updated
  • appropriate backport labels added
  • not a security concern

@github-actions github-actions bot added pr/dependencies PR specifically updates dependencies of project theme/envoy/xds Related to Envoy support labels Oct 27, 2023
@zalimeni zalimeni marked this pull request as ready for review October 27, 2023 21:00
@zalimeni zalimeni requested a review from a team as a code owner October 27, 2023 21:00
@@ -3,16 +3,32 @@
package xds
Copy link
Member Author

Choose a reason for hiding this comment

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

@cthain do the changes here and in other non-mod files (troubleshoot/proxy/z_xds_packages.go and build-support/scripts/envoy-library-references.sh) still look correct to you, based on your compatibility fixes?

Comment on lines -7 to +8
google.golang.org/grpc v1.37.1
google.golang.org/protobuf v1.27.1
google.golang.org/grpc v1.56.3
google.golang.org/protobuf v1.30.0
Copy link
Member Author

Choose a reason for hiding this comment

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

Note that this version was significantly out of date compared w/ the root go.mod.

@zalimeni zalimeni marked this pull request as draft October 27, 2023 21:09
@zalimeni
Copy link
Member Author

Looks like we may have some incompatibilities for this one: https://github.com/hashicorp/consul/actions/runs/6672184414/job/18135656338?pr=19421#step:6:24

@zalimeni zalimeni force-pushed the net-6138/release/1.15.x branch 2 times, most recently from 9fccedf to fc6be1d Compare October 27, 2023 21:24
Copy link
Contributor

@cthain cthain left a comment

Choose a reason for hiding this comment

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

👍

serverType, datacenter, err := parseEndpoint(target.Endpoint)
serverType, datacenter, err := parseEndpoint(target.Endpoint())
Copy link
Member Author

Choose a reason for hiding this comment

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

This and below one-line changes fix binary incompatibilities introduced by the upgrade; these match later release branches and main

@@ -28,7 +28,7 @@ if [[ ! -f GNUmakefile ]] || [[ ! -f go.mod ]]; then
exit 1
Copy link
Member Author

Choose a reason for hiding this comment

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

This similarly now matches main and needed to change to support deps upgrades

// protoc-gen-go v1.28.1
// protoc-gen-go v1.31.0
Copy link
Member Author

Choose a reason for hiding this comment

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

Here and below: all comment changes generated by make proto that came with upgrade, necessary to satisfy linter (and needed bc we changed the proto-gen-go version)

This resolves [CVE-2023-44487](https://nvd.nist.gov/vuln/detail/CVE-2023-44487).

Also includes various fixes from later release versions required for
tests and linters to pass. See 77f44fa
for the majority of these changes.
Comment on lines -43 to +44
Endpoint: endpoint,
URL: url.URL{Opaque: endpoint},
Copy link
Member Author

Choose a reason for hiding this comment

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

See 77f44fa

@@ -140,7 +140,7 @@ func makeLoggerCallbacks(log hclog.Logger) *xds.CallbackFuncs {
log.Trace("gRPC stream opened", "id", id, "addr", addr)
Copy link
Member Author

Choose a reason for hiding this comment

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

See 77f44fa

@zalimeni zalimeni merged commit 5f0212b into release/1.15.x Oct 30, 2023
83 checks passed
@zalimeni zalimeni deleted the net-6138/release/1.15.x branch October 30, 2023 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/dependencies PR specifically updates dependencies of project pr/no-backport theme/envoy/xds Related to Envoy support theme/security
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants