Repository navigation
[HDX-5860] Disable multipath TCP in the OTel collector - #3505
Conversation
Go 1.24+ opens MPTCP listeners by default, exposing the collector to CVE-2026-98432 on hosts with MPTCP enabled. The entrypoint now appends multipathtcp=0 to GODEBUG, covering the collector, the OpAMP supervisor and its child, and the migrate tool, in both the collector and all-in-one images.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
🦋 Changeset detectedLatest commit: 70823ef The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Duplicate code analysisNo new duplicate code introduced by this PR. jscpd compared this branch against |
E2E Test Results✅ All tests passed • 461 passed • 1 skipped • 1325s
Tests ran across 4 shards in parallel. |
🔵 Tier 2 — Low RiskSmall, isolated change with no API route or data model modifications. Why this tier:
Additional context: touches background tasks or the delivery pipeline lightly (8 lines, under the 30-line bar for Tier 4) Review process: AI review + quick human skim (target: 5–15 min). Reviewer validates AI assessment and checks for domain-specific concerns. Stats
|
| @test "GODEBUG: the collector process runs with multipathtcp=0" { | ||
| run docker compose exec -T otel-collector sh -c 'tr "\0" "\n" < /proc/1/environ' | ||
| [ "$status" -eq 0 ] | ||
| echo "$output" | grep -qx 'GODEBUG=multipathtcp=0' |
There was a problem hiding this comment.
🔵 minor — Smoke test only covers the unset-GODEBUG standalone case, not the merge logic or the supervisor path
The only collector checked is the otel-collector service in smoke-tests/otel-collector/docker-compose.yaml, which has no GODEBUG set. So the test would still pass if the ${GODEBUG:+$GODEBUG,} append were broken (operator settings dropped or overwritten) or if the *multipathtcp=* case were inverted, and it never checks supervisor mode, where the protected listener belongs to a child process the supervisor spawns. Fix: add a compose service with GODEBUG=http2client=0 and assert GODEBUG=http2client=0,multipathtcp=0. Add one with GODEBUG=multipathtcp=1 and assert it is left as is. Ideally also run entrypoint.sh in supervisor mode and assert that GODEBUG reaches the spawned /otelcontribcol (read its /proc/<pid>/environ), not just PID 1.
Advisory. Fix if it is a small defect in code this PR changes; otherwise reply in the thread. Do not widen the PR or touch files it did not already change. How to respond
PR Review
1 finding(s): 🔴 0 critical · 🟠 0 major · 🔵 1 minor 1 posted as inline comment(s) on the changed lines. Severity is the reviewer's own estimate and is used for ordering, not filtering. No finding blocks merge automatically; a maintainer decides. |
Deep Review✅ No critical issues found. The mitigation is effective and complete for the diff: the 🟡 P2 -- recommended
🔵 P3 nitpicks (3)
Reviewers (6): correctness, testing, reliability, maintainability, project-standards, security. Testing gaps:
No finding blocks merge automatically. A maintainer will expect P0/P1 findings in code this PR changes to be fixed; P2/P3 are your call -- fix or reply. Never fix findings about surrounding code here; reply instead. Do not widen the PR. How to respond |
Summary
Mitigates CVE-2026-98432 for the OTel collector by disabling Multipath TCP in the Go runtime.
The CVE is a Linux kernel use-after-free in IPv4 TCP connection setup. The published remote-root exploit targets servers with an MPTCP listener. Since Go 1.24,
net.Listenasks for MPTCP by default, so on a host with MPTCP enabled, every collector listener (4317, 4318, 13133, 8888) is one. The Go Security Team's runtime mitigation isGODEBUG=multipathtcp=0.docker/otel-collector/entrypoint.shnow addsmultipathtcp=0toGODEBUGbefore anything else runs. Every Go process the image starts goes through this script, so this one change covers:exec /otelcontribcol)cmd.Envnil when noagent.envis configured, so the child inherits the environment)migratetool/otel-entrypoint.shThe value is appended rather than set with
ENVin the Dockerfile, so a deployment that passes its ownGODEBUG(for example from a Helm chart) keeps its other settings and still gets the mitigation. An explicitmultipathtcp=value from the operator is left alone.Not changed:
docker/hostmetrics(stock contrib 0.90.0 built with Go 1.21, where MPTCP is off by default, and not referenced by any compose file or workflow).This only reduces exposure. The Go team calls per-program MPTCP disabling fragile, and the real fix is a patched host kernel.
How to reproduce
Starting point: repo root, Docker running.
On
main:docker build -f docker/otel-collector/Dockerfile --target dev -t otel-mptcp .HYPERDX_OTEL_EXPORTER_CREATE_LEGACY_SCHEMA=true,CLICKHOUSE_ENDPOINT=tcp://<ch>:9000).docker exec <collector> sh -c 'tr "\0" "\n" < /proc/1/environ | grep GODEBUG'prints nothing.On this branch:
GODEBUG=multipathtcp=0.-e GODEBUG=http2client=0givesGODEBUG=http2client=0,multipathtcp=0.OPAMP_SERVER_URLset), PID 1opampsupervisorcarriesGODEBUG=multipathtcp=0.I ran all three cases locally. I could not confirm the change at the socket level: Docker Desktop's VM kernel has no MPTCP support, so listeners are plain TCP either way. It's worth checking
ss -ltnMon a real node after rollout.Added
smoke-tests/otel-collector/godebug.bats, which asserts the collector's PID 1 environment. I have not run it locally.make ci-lintpasses.make ci-unitpasses apart fromtimeZone.test.ts(getTimeZoneShortName), which also fails onmainon my machine (ICU/locale data) and is unrelated.References