Repository navigation
lnd: turn off Multipath TCP in the lnd listeners - #187
Merged
Merged
Conversation
Collaborator
Author
|
lnd v0.21.6-beta and v0.20.7-beta came out today and do the same thing. The binaries now disable MPTCP listeners by default, and the release notes tell Linux operators to set nixpkgs is still on 0.21.5, so the |
Contributor
|
lnd update to 0.21.6 here: NixOS/nixpkgs#581280 |
Contributor
|
@prusnak updated the lock - bumped bitcoin to 32.1 and lnd to 0.21.6-beta @ostermayer - Even though the LND issue is fixed, I would still include the |
Go 1.24 and later open every listener as Multipath TCP when the kernel supports it. lnd never asked for that, but its P2P, RPC and REST ports end up as MPTCP sockets, and the P2P port is public. MPTCP is a large and young kernel code path. The exploit published for CVE-2026-98432, an IPv4 TCP use-after-free fixed in kernel 6.18.56, goes through an MPTCP listener. Set GODEBUG=multipathtcp=0 in the lnd unit so the Go runtime falls back to plain TCP for every socket. The lnd test checks that no lnd socket shows up in `ss -M`.
Go 1.24 and later listen with MPTCP by default, so every Go daemon on a node (tailscale, caddy, lnd before the previous commit) exposes the MPTCP code paths without being asked. A node does not need MPTCP. Set net.mptcp.enabled=0 next to the other network sysctls of this preset.
prusnak
enabled auto-merge
November 2, 2026 15:43
seberm
pushed a commit
to ostermayer/bitcoinix
that referenced
this pull request
Nov 9, 2026
…paces net.mptcp.enabled is per network namespace, and a new namespace starts at the kernel default of 1. So the net.mptcp.enabled = 0 that presets/hardened-extended sets since bitcoinix#187 didn't reach any service that netns-isolation runs in its own namespace. netns-isolation now copies the host's value into each service namespace when it sets the namespace up. The setting only applies to new sockets and namespaces, so the preset comment says to reboot once after turning it on. The lnd MPTCP check ran `ss` in the host namespace, so with netns-isolation it couldn't see lnd and passed either way. It now looks inside lnd's namespace and first checks that `ss` sees lnd there. The netns scenarios turn MPTCP off on the host and check that every service namespace has it off.
seberm
added a commit
that referenced
this pull request
Nov 9, 2026
…paces (#206) net.mptcp.enabled is per network namespace, and a new namespace starts at the kernel default of 1. So the net.mptcp.enabled = 0 that presets/hardened-extended sets since #187 didn't reach any service that netns-isolation runs in its own namespace. netns-isolation now copies the host's value into each service namespace when it sets the namespace up. It skips the copy on kernels without MPTCP. If writing the value fails, the service doesn't start. The changed setup script restarts every netns-<service> unit on upgrade, which stopped the service, and only a service that some active target wants was started again. Each service now has the setup script in its restartTriggers, so a switch restarts the service along with its namespace. Upgrading restarts every netns-isolated service once, and hardened-extended users get MPTCP off in the namespaces without a reboot. A namespace copies the host setting only when it is created, so a later change on the host needs a reboot. docs/configuration.md and the preset comment now say so. The lnd MPTCP test ran `ss` in the host namespace, so with netns-isolation it couldn't see lnd and passed either way. It now looks inside lnd's namespace and first checks that `ss` sees lnd there. The netns scenarios turn MPTCP off on the host and check every service namespace that exists. Follow-up to #187
unbeholdendev
added a commit
to unbeholdendev/infra
that referenced
this pull request
Nov 10, 2026
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [bitcoinix/bitcoinix](https://github.com/bitcoinix/bitcoinix) | patch | `v0.1.4` → `v0.1.5` | --- ### Release Notes <details> <summary>bitcoinix/bitcoinix</summary> ### [`v0.1.5`](https://github.com/bitcoinix/bitcoinix/releases/tag/v0.1.5): bitcoinix 0.1.5 [Compare Source](bitcoinix/bitcoinix@v0.1.4...v0.1.5) **Security release with breaking changes.** Updates BTCPay Server to 2.4.7 and Core Lightning to 26.06.10. All users should upgrade. If you run BTCPay Server with `services.backups`, start a backup right after upgrading. Evaluation fails with a message for each breaking change that affects your config; act on it, then set `nix-bitcoin.configVersion = "0.1.5";`. #### Security - **BTCPay Server [2.4.7](https://github.com/btcpayserver/btcpayserver/releases/tag/v2.4.7)** fixes 85 security findings (1 critical, 13 high). Upstream highly recommends it, especially for servers shared by multiple merchants. It was left out of 0.1.4 ([#​203](bitcoinix/bitcoinix#203)). - **Core Lightning [26.06.10](https://github.com/ElementsProject/lightning/releases/tag/v26.06.10)** fixes vulnerabilities in dual funding, splicing, onchaind, gossip, connectd, runes and commando, among others. Upstream recommends reviewing your runes: bind runes used over commando to the app's node ID and blacklist any you can't account for ([#​226](bitcoinix/bitcoinix#226)). - **Backups now include the NBXplorer database,** which holds the BTCPay hot-wallet keys. Backups made before this release lack them, so run `systemctl start duplicity` after upgrading, or make sure you have each hot wallet's recovery phrase ([#​223](bitcoinix/bitcoinix#223)). - **Not included: database dump checks ([#​225](bitcoinix/bitcoinix#225 duplicity still succeeds when a database dump fails, and with `services.postgresqlBackup.compression` set to `"zstd"` or `"none"`, backups leave out the BTCPay and NBXplorer databases. Until the next release, keep the default `"gzip"` and check `journalctl -u postgresqlBackup-btcpaydb -u postgresqlBackup-nbxplorer` after a backup. - **The mempool RPC password no longer ends up in the Nix store** when set through `services.mempool.settings.CORE_RPC.PASSWORD` ([#​216](bitcoinix/bitcoinix#216)). - **Multipath TCP:** lnd now also runs with `GODEBUG=multipathtcp=0`, and `hardened-extended` sets `net.mptcp.enabled = 0` ([#​187](bitcoinix/bitcoinix#187)). That sysctl, like the one the 0.1.4 notes advised, covers only the host namespace: services that netns-isolation runs in their own namespace can still open MPTCP listeners (fix not included, [#​206](bitcoinix/bitcoinix#206)). The fix for CVE-2026-98432 is kernel 6.18.56 or later; check with `uname -r`. - **Harder to fingerprint:** mempool no longer shows stack traces with store paths, store-derived ETags, the hostname or the kernel version, and new self-signed certs only carry `CN=localhost`. The SSH onion shares its host keys with clearnet SSH, so publishing both links them: keep SSH off clearnet or use Tor client authorization for the onion ([#​229](bitcoinix/bitcoinix#229)). - `clightning-replication` warns when SSH host key checking is disabled ([#​222](bitcoinix/bitcoinix#222)). - Core Lightning, clboss and Fulcrum still link brotli 1.2.0 from nixpkgs-unstable. #### Breaking changes - **mempool:** `services.mempool.settings.CORE_RPC.PASSWORD` now fails evaluation. Put the password in `<secretsDir>/bitcoin-rpcpassword-public`, and change it if untrusted users or services run on the node, since the old value stays in the store until garbage collection ([#​216](bitcoinix/bitcoinix#216)). - **currencyrate:** the Python plugin is replaced by Core Lightning's Rust `cln-currencyrate`. Use `listcurrencyrates` instead of `currencyrates`; `add-source`/`disable-source` are now `currencyrate-add-source`/`currencyrate-disable-source` ([#​202](bitcoinix/bitcoinix#202)). - **rebalance:** now routes with askrene. Drop `getroute_method` from `rebalance` calls and `rebalance-getroute`, `rebalance-maxhops`, `rebalance-msatfactor` from your config; `rebalancereport` loses the matching fields ([#​202](bitcoinix/bitcoinix#202), [#​207](bitcoinix/bitcoinix#207)). - **clnrest:** the package moved from `nix-bitcoin.pkgs.clnrest` to `nix-bitcoin.pkgs.clightning-plugins.clnrest` ([#​202](bitcoinix/bitcoinix#202)). - **Core Lightning 26.06.10, for scripts:** `bkpr-dumpincomecsv` only accepts a plain `.csv` filename and writes it to the network directory. Opens from peers with `dust_limit_satoshis` above 5000 sat are refused. See the [operator notes](https://github.com/ElementsProject/lightning/releases/tag/v26.06.10). - **BTCPay Server 2.4.7, for integrators:** the legacy `/invoices/create` routes are removed (use `/stores/{storeId}/invoices/create`), and reading single invoices through the BitPay API requires authentication. See [Upgrading to config version 0.1.5](https://docs.bitcoinix.net/upgrading.html#upgrading-to-config-version-015). #### Updates | Package | 0.1.4 | 0.1.5 | | ------------------- | --------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | | BTCPay Server | 2.4.6 | [2.4.7](https://github.com/btcpayserver/btcpayserver/releases/tag/v2.4.7) | | Core Lightning | 26.06.9 | [26.06.10](https://github.com/ElementsProject/lightning/releases/tag/v26.06.10) | | currencyrate plugin | Python ([`c0ba9dc`](bitcoinix/bitcoinix@c0ba9dc)) | [cln-currencyrate 0.1.0](https://github.com/ElementsProject/lightning/tree/v26.06.10/plugins/currencyrate-plugin) | | lightningd/plugins | [`c0ba9dc`](bitcoinix/bitcoinix@c0ba9dc) | [f0d33fd](https://github.com/lightningd/plugins/tree/f0d33fd) | Also: the docs list the release and package versions ([#​205](bitcoinix/bitcoinix#205)); the services page is reworked ([#​201](bitcoinix/bitcoinix#201)). Contributors: [@​ostermayer](https://github.com/ostermayer), [@​prusnak](https://github.com/prusnak), [@​seberm](https://github.com/seberm), [@​viberaven](https://github.com/viberaven). Full changes: <bitcoinix/bitcoinix@v0.1.4...v0.1.5> </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - 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. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yMjIuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjIyMi4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Co-authored-by: agent <[email protected]> Reviewed-on: https://git.home.unbeholden.dev/unbeholden/infra/pulls/97
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Go 1.24 and later open every listener as Multipath TCP when the kernel supports it (the
multipathtcpGODEBUG defaults to2). lnd never asked for that, butss -Mlnpon a bitcoinix node lists lnd's P2P, RPC and REST sockets as MPTCP listeners, and the P2P port is public. MPTCP is a large and young kernel code path, and the exploit published for CVE-2026-98432 goes through an MPTCP listener. That bug is an IPv4 TCP use-after-free fixed in kernel 6.18.56. The pinned nixpkgs ships 6.18.59 and v0.1.2 shipped 6.18.57, so nodes on current releases are patched. This is about not exposing the code path at all.What changed:
lnd.nixsetsGODEBUG=multipathtcp=0in the lnd unit. The Go runtime then opens plain TCP sockets. Nothing else in the unit changes.presets/hardened-extended.nixsetsnet.mptcp.enabled = 0next to the other network sysctls, so every Go daemon on a hardened node stops listening with MPTCP. A sysctl alone doesn't convert a listener that already exists, which is why lnd also gets the runtime flag.ss -Mlnp.Tested
./test/run-tests.shon my KVM host: the basic set (default, netns, netnsRegtest) passes, the same set CI runs. The new check ran inside the default scenario.ss -Mlnplisted lnd's :9735, :10009 and :8080. After the switch only tailscaled remains, lnd listens on plain TCP, and channels and peers came back as before.nix flake checkruns in CI.Codex (GPT-5.6 Sol, xhigh) reviewed the fleet version of this change and confirmed the Go default, the GODEBUG value and the kernel fix version, and pointed out that the sysctl leaves existing listeners alone. DeepSeek V4.1 Flash 1017 (max) and GLM 5.3 (max) audited the tree at 654c936 with Codex (GPT-6 Astra, xhigh) as the second opinion: nine findings, none in the three files this PR touches. The known ones are #107, #128, #66, #130 and, from Astra's own pass, #86. Astra marked the nbxplorer API, the netns source-IP filter and the Tor circuit-sharing claims false positives. Two low leads are new and I'll check them against the tracker: the whitelisted localhost P2P port that the BTCPay module opens on bitcoind, and the clightning-feeadjuster timer running without the standard hardening.