Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/quiet-paths-close.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@hyperdx/otel-collector': patch
---

Disable Multipath TCP in the collector image by setting `GODEBUG=multipathtcp=0`
at startup, mitigating CVE-2026-98432. Go 1.24+ opens MPTCP listeners by
default. Any other `GODEBUG` settings you pass are kept, and an explicit
`multipathtcp=` value is left as is. This also applies to the all-in-one image.
Patching the host kernel is still the actual fix.
8 changes: 8 additions & 0 deletions docker/otel-collector/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
#!/bin/sh
set -e

# Go 1.24+ opens Multipath TCP listeners by default; turn that off for the
# collector, supervisor and migrate to mitigate CVE-2026-98432. Appended so
# other GODEBUG settings survive; an explicit multipathtcp= value wins.
case "$GODEBUG" in
*multipathtcp=*) ;;
*) export GODEBUG="${GODEBUG:+$GODEBUG,}multipathtcp=0" ;;
esac

# DEPRECATED: The clickhouse.json feature gate has been removed upstream.
# When OTEL_AGENT_FEATURE_GATE_ARG contains clickhouse.json, strip it and
# map it to HYPERDX_OTEL_EXPORTER_CLICKHOUSE_JSON_ENABLE instead. Other feature gates
Expand Down
10 changes: 10 additions & 0 deletions smoke-tests/otel-collector/godebug.bats
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bats

# The entrypoint must disable Go's default Multipath TCP listeners
# (CVE-2026-98432). In standalone mode the collector is exec'd as PID 1.

@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'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 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

}
Loading