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 module go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp to v0.44.0 [SECURITY] (main) #6398

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Oct 16, 2023

Mend Renovate

This PR contains the following updates:

Package Type Update Change
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp indirect minor v0.42.0 -> v0.44.0

GitHub Vulnerability Alerts

CVE-2023-45142

Summary

OpenTelemetry-Go Contrib has a handler wrapper otelhttp that adds the following labels by deafult that have unbound cardinality:

  • http.user_agent
  • http.method

This leads to the server's potential memory exhaustion when many malicious requests are sent to it.

Details

HTTP header User-Agent or HTTP method for requests can be easily set by an attacker to be random and long. The library internally uses httpconv.ServerRequest that records every value for HTTP method and User-Agent.

This pull request released with version 0.44.0 dixes this vulnerability The values collected for attribute http.request.method were changed to be restricted to a set of well-known values and other high cardinality attributes were removed.

Impact

In order to be affected program has to use otelhttp.NewHandler wrapper and does not filter any unknown HTTP methods or User agents on the level of CDN, LB, previous middleware, etc.

Others

This vulnerability is similar but different from these known vulnerabilities:

Workaround for affected versions

As a workaround, otelhttp.WithFilter() can be used instead, but it requires manual careful configuration to not log certain requests entirely.


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 review from grafanabot and a team as code owners October 16, 2023 15:22
Copy link
Contributor

@ying-jeanne ying-jeanne left a comment

Choose a reason for hiding this comment

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

OpenTelemetry is an indirect dependency within Mimir, and it appears that there are no noticeable breaking changes in Mimir. Looks good to me.

@ying-jeanne ying-jeanne merged commit 514f2b5 into main Oct 16, 2023
30 checks passed
@ying-jeanne ying-jeanne deleted the deps-update/main-go-go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp-vulnerability branch October 16, 2023 16:10
@colega colega mentioned this pull request Nov 13, 2023
32 tasks
@grafanabot
Copy link
Contributor

The backport to release-2.10 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-6398-to-release-2.10 origin/release-2.10
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x 514f2b53ed79e4a106c77cf927432a7fa2efb232
# Push it to GitHub
git push --set-upstream origin backport-6398-to-release-2.10
git switch main
# Remove the local backport branch
git branch -D backport-6398-to-release-2.10

Then, create a pull request where the base branch is release-2.10 and the compare/head branch is backport-6398-to-release-2.10.

colega pushed a commit that referenced this pull request Nov 13, 2023
…elhttp to v0.44.0 [SECURITY] (#6398)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
(cherry picked from commit 514f2b5)
@grafanabot
Copy link
Contributor

The backport to release-2.9 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-6398-to-release-2.9 origin/release-2.9
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x 514f2b53ed79e4a106c77cf927432a7fa2efb232
# Push it to GitHub
git push --set-upstream origin backport-6398-to-release-2.9
git switch main
# Remove the local backport branch
git branch -D backport-6398-to-release-2.9

Then, create a pull request where the base branch is release-2.9 and the compare/head branch is backport-6398-to-release-2.9.

fayzal-g pushed a commit that referenced this pull request Nov 13, 2023
…elhttp to v0.44.0 [SECURITY] (#6398)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
(cherry picked from commit 514f2b5)
colega added a commit that referenced this pull request Nov 13, 2023
* Update module go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp to v0.44.0 [SECURITY] (#6398)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
(cherry picked from commit 514f2b5)

* Update CHANGELOG.md

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>

---------

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
fayzal-g added a commit that referenced this pull request Nov 13, 2023
* Update module go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp to v0.44.0 [SECURITY] (#6398)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
(cherry picked from commit 514f2b5)

* Update CHANGELOG.md

* Add PR number to changelog entry

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants