From 287f98eba587f52147c8ab9212d9559f36c19935 Mon Sep 17 00:00:00 2001 From: Warren Lee <5959690+wrn14897@users.noreply.github.com> Date: Fri, 30 Oct 2026 15:41:15 -0700 Subject: [PATCH] fix(otel-collector): disable multipath TCP via GODEBUG (HDX-5860) 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. --- .changeset/quiet-paths-close.md | 9 +++++++++ docker/otel-collector/entrypoint.sh | 8 ++++++++ smoke-tests/otel-collector/godebug.bats | 10 ++++++++++ 3 files changed, 27 insertions(+) create mode 100644 .changeset/quiet-paths-close.md create mode 100644 smoke-tests/otel-collector/godebug.bats diff --git a/.changeset/quiet-paths-close.md b/.changeset/quiet-paths-close.md new file mode 100644 index 0000000000..d49db0261c --- /dev/null +++ b/.changeset/quiet-paths-close.md @@ -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. diff --git a/docker/otel-collector/entrypoint.sh b/docker/otel-collector/entrypoint.sh index 058b94ec41..bed5d965cd 100644 --- a/docker/otel-collector/entrypoint.sh +++ b/docker/otel-collector/entrypoint.sh @@ -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 diff --git a/smoke-tests/otel-collector/godebug.bats b/smoke-tests/otel-collector/godebug.bats new file mode 100644 index 0000000000..4897fa4aee --- /dev/null +++ b/smoke-tests/otel-collector/godebug.bats @@ -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' +}