Skip to content

build: disable MPTCP listeners by default - #258

Open
ziggie1984 wants to merge 1 commit into
lightninglabs:masterfrom
ziggie1984:build-disable-mptcp
Open

ziggie1984 wants to merge 1 commit into
lightninglabs:masterfrom
ziggie1984:build-disable-mptcp

Conversation

@ziggie1984

Copy link
Copy Markdown

Change

Disable Go's automatic MPTCP listener support for faraday. Faraday does not
intentionally configure or depend on MPTCP, so this restores ordinary TCP
listeners while retaining an explicit operator opt-in through
GODEBUG=multipathtcp=1.

Go 1.24 and newer enable MPTCP listeners by default on supported Linux kernels.
MPTCP is a prerequisite for the Linux use-after-free path discussed in
lightningnetwork/lnd#11455
and mitigated for lnd in
lightningnetwork/lnd#11456.

Existing binaries

Operators can apply the same mitigation immediately, without rebuilding, by
starting faraday with GODEBUG=multipathtcp=0 and restarting it. A patched
kernel is still required to fix the underlying kernel vulnerability; this change
removes the demonstrated MPTCP-listener prerequisite.

Validation

  • go mod tidy -diff
  • go test ./cmd/faraday
  • verified multipathtcp=0 in faraday's effective Go defaults

@lmtlssss

lmtlssss commented Nov 5, 2026

Copy link
Copy Markdown

Independent native Linux listener differential for this PR is complete.

At base commit 7226d87, the Faraday main module had no multipathtcp=0 override. With Go 1.27.3 and net.mptcp.enabled=1, the actual net.Listen("tcp") probe returned SO_PROTOCOL=262 (IPPROTO_MPTCP). Setting GODEBUG=multipathtcp=0 changed it to SO_PROTOCOL=6 (IPPROTO_TCP).

At this PR head 5032db0, go list reports multipathtcp=0 and the same listener probe returns SO_PROTOCOL=6 by default. Explicit GODEBUG=multipathtcp=1 still returns 262, so the opt-in remains available.

The probe uses the Faraday module's own go.mod and a real Linux socket. It does not exercise the kernel exploit. The complete base-versus-PR run and logs are here: https://github.com/lmtlssss/sc-bitcoin-lightning-acceptance/actions/runs/41938901075

This independently confirms the module-level mitigation on the actual listener protocol. Thanks for carrying the fix.

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