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] #387

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Nov 16, 2023

Mend Renovate logo banner

This PR contains the following updates:

Package Type Update Change
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc require minor v0.45.0 -> v0.46.0

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.

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: Disabled by config. Please merge this manually once you are satisfied.

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 a review from a team as a code owner November 16, 2023 21:34
@github-actions github-actions bot requested a review from markphelps November 16, 2023 21:34
…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 adae55f to b8c5b5f Compare November 16, 2023 21:50
@Kavindu-Dodan Kavindu-Dodan merged commit a1468e1 into main Nov 16, 2023
@renovate renovate bot deleted the renovate/go-go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc-vulnerability branch November 16, 2023 23:05
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.

2 participants