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

fix(deps): update module go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc to v0.46.0 [security] #185

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Nov 12, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0 -> v0.46.0 age adoption passing confidence

GitHub Vulnerability Alerts

CVE-2023-47108

Summary

The grpc Unary Server Interceptor opentelemetry-go-contrib/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go

// UnaryServerInterceptor returns a grpc.UnaryServerInterceptor suitable
// for use in a grpc.NewServer call.
func UnaryServerInterceptor(opts ...Option) grpc.UnaryServerInterceptor {

out of the box adds labels

  • net.peer.sock.addr
  • net.peer.sock.port

that have unbound cardinality. It leads to the server's potential memory exhaustion when many malicious requests are sent.

Details

An attacker can easily flood the peer address and port for requests.

PoC

Apply the attached patch to the example and run the client multiple times. Observe how each request will create a unique histogram and how the memory consumption increases during it.

Impact

In order to be affected, the program has to configure a metrics pipeline, use UnaryServerInterceptor, and does not filter any client IP address and ports via middleware or proxies, etc.

Others

It is similar to already reported vulnerabilities.

Workaround for affected versions

As a workaround to stop being affected, a view removing the attributes can be used.

The other possibility is to disable grpc metrics instrumentation by passing otelgrpc.WithMeterProvider option with noop.NewMeterProvider.

Solution provided by upgrading

In PR #​4322, to be released with v0.46.0, the attributes were removed.

References


Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot requested review from a team as code owners November 12, 2023 19:23
@renovate renovate bot force-pushed the renovate/go-go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc-vulnerability branch 7 times, most recently from 73e3fd0 to 00c2cfc Compare November 16, 2023 17:39
@mikemrm mikemrm closed this Nov 16, 2023
Copy link
Contributor Author

renovate bot commented Nov 16, 2023

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update (v0.46.0). You will get a PR once a newer version is released. To ignore this dependency forever, add it to the ignoreDeps array of your Renovate config.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

@renovate renovate bot deleted the renovate/go-go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc-vulnerability branch November 16, 2023 17:42
@mikemrm mikemrm restored the renovate/go-go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc-vulnerability branch November 16, 2023 18:38
@mikemrm mikemrm reopened this Nov 16, 2023
@renovate renovate bot force-pushed the renovate/go-go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc-vulnerability branch 5 times, most recently from f35062e to f61f92a Compare November 16, 2023 19:31
@mikemrm
Copy link
Contributor

mikemrm commented Nov 16, 2023

cannot be updated until infratographer/x is updated

@renovate renovate bot force-pushed the renovate/go-go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc-vulnerability branch from f61f92a to 1355bc6 Compare November 17, 2023 16:01
@renovate renovate bot force-pushed the renovate/go-go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc-vulnerability branch 2 times, most recently from 9869929 to f70c48a Compare January 19, 2024 17:40
@renovate renovate bot force-pushed the renovate/go-go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc-vulnerability branch 7 times, most recently from 6135f6f to cebff59 Compare January 23, 2024 22:11
@renovate renovate bot force-pushed the renovate/go-go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc-vulnerability branch from cebff59 to 1d77a90 Compare February 5, 2024 20:53
@renovate renovate bot force-pushed the renovate/go-go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc-vulnerability branch 6 times, most recently from 84d8b2e to 8f0e831 Compare March 18, 2024 14:17
…google.golang.org/grpc/otelgrpc to v0.46.0 [security]
@renovate renovate bot force-pushed the renovate/go-go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc-vulnerability branch from 8f0e831 to b60aaa0 Compare April 5, 2024 01:47
@mikemrm mikemrm merged commit 9c0c4e6 into main Apr 5, 2024
5 checks passed
@mikemrm mikemrm deleted the renovate/go-go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc-vulnerability branch April 5, 2024 03:18
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.

1 participant