Repository navigation
flake: update pins for the clightning, Node.js, BTCPay and Go security releases - #125
Conversation
|
i know that @seberm wanted to update the flake and release new version of bitcoinix with these updates we also need to pay special attention in release notes if we include the electrs update (requires resync), but this PR does not include it in its current form |
|
@prusnak I think we can both review this one (keep electrs on v0.11.0) and add a follow-up changes for electrs (I already have some changes prepared). For electrs v0.12 it's not just re-index, but we must also add support for bitcoind REST: We should check if there are any other breaking changes in this update. So far, I'm not aware of any other than |
|
@ostermayer CI fails on the |
|
@ostermayer thanks for this. The red Could you drop the |
|
Update: the rerun passed, and the same |
electrs 0.12 reads blocks through bitcoind's REST interface, so bitcoind needs `rest=1`. This adds `services.bitcoind.rest.enable` (default off) ahead of the electrs 0.12 update. REST is served on the RPC address and port **without authentication**. It bypasses RPC users and `rpcwhitelist`, and Bitcoin Core 31 has no separate REST bind or allowlist. `rpcallowip` is the only access control (bitcoind checks it for every HTTP request, REST included). To keep REST from reaching beyond the node, evaluation fails when REST is enabled and `rpc.allowip` contains sources other than localhost and the netns-isolation addresses. Users who expose RPC to their LAN must opt in with `services.bitcoind.rest.allowNonLocal = true`. Who can reach REST once it is enabled: - with netns isolation: the namespaces connected to bitcoind (they already have RPC credentials) and the host through the bridge, i.e. any local user on the host - without netns isolation: localhost, i.e. any local user REST is read-only (blocks, transactions, UTXO set, mempool; no wallet access). The remaining local exposure is unauthenticated read access and the load of heavy requests such as `/rest/getutxos`. The bitcoind service sandbox is unchanged. Nothing changes unless the option is enabled, so there is no versioning entry. Tests: - Nix: the test config is re-evaluated with REST and a LAN `rpc.allowip` source. The assertion must fail, and pass with `rest.allowNonLocal`. - New `bitcoind-rest` VM test: `/rest` returns 404 when disabled. When enabled, it is reachable from the host as an unprivileged user and, with netns isolation, not from namespaces without a bitcoind connection. REST is enabled in the `regtest` scenario, so CI covers both states (`default`/`netns`: off, `netnsRegtest`: on). Ran `default`, `netns` and `netnsRegtest` locally: all passed. Also partially related to: - #125 - #7 (comment)
…y releases Run helper/update-flake.sh. nixpkgs (nixos-26.05) moves to 2026-10-21, nixpkgs-unstable to 2026-10-20 and flake-utils to 2026-10-13. The nixos-search test flake is updated too. Versions: clightning 26.04.1 (stable) -> 26.06.9 (unstable) clnrest 0.2.0, cargoHash updated for the 26.06.9 source btcpayserver 2.4.2 (stable) -> 2.4.5 (unstable) nbxplorer 2.6.10 (stable) -> 2.6.17 (unstable) nodejs 22 22.23.3 -> 22.23.4 (stable, rtl and mempool) lnd 0.21.4-beta, Go 1.26.8 -> Go 1.26.9 (unstable) clboss 0.17.0 -> 0.17.2 lndinit 0.1.22-beta (stable) -> 0.1.38-beta (unstable) extra-container 0.14 (stable) -> 0.17 (unstable) bitcoind 31.1, unchanged Security reasons: - clightning 26.06.7 to 26.06.9 fix fund loss bugs, remote crashes, clnrest crashes from unauthenticated requests, and a rune restriction bypass. Fixes bitcoinix#120 - Node.js 22.23.4 fixes CVE-2026-111497, a Brotli decoder out of bounds write that RTL reaches before login. Refs bitcoinix#121 - BTCPay Server 2.4.3 is a security release. Refs bitcoinix#121 - Go 1.26.9 fixes crypto/tls and net/http, which the lnd REST and gRPC servers use. Refs bitcoinix#121 pyln-proto 26.06.9 depends on the coincurve-cp314-fix fork. Patch it back to coincurve like nixpkgs does and relax the version bound. BTCPay Server 2.4.5 blocks webhooks, invoice notification URLs and LNURL requests to private addresses by default. Add a versioning entry and a docs section that show how to allow them with BTCPAY_SSRFEXCEPTIONS. The internal Lightning node that bitcoinix configures isn't affected. Keep electrs on stable (0.11.0). The script moved it to unstable 0.12.0, which needs the bitcoind REST interface and a full reindex. That needs its own change with a versioning entry. Scenarios, all passed on the KVM host: test/run-tests.sh -s default build test/run-tests.sh -s regtest build test/run-tests.sh -s netnsRegtest build test/run-tests.sh -s clightning-replication build test/run-tests.sh -s trustedcoin build
c099728 to
a58ec68
Compare
|
@prusnak LGTM @ostermayer Thanks for the changes! Two small things for a follow-up PR, if you have time:
|
test/nixos-search/ci-test.sh pushed its flake-info build to Cachix when CACHIX_SIGNING_KEY was set. Since #71 scoped the key to build_test_drivers and test_scenario, check_flake no longer has it, so nothing pushes flake-info. The cached build stopped matching when #125 bumped the nixos-search input, and since then every check_flake run builds flake-info and a patched Nix from source, including Nix's test suites: 28-29 min instead of about 1 min on master. check_flake now builds flake-info in its own step and pushes it from a separate step that runs only on pushes to master and is the only step that gets the key. Both run before ci-test.sh, so flake-info, which ci-test.sh runs outside the Nix build sandbox, runs only after the key step. ci-test.sh no longer pushes. Assisted-by: Claude Code (claude-opus-5-5)
test/nixos-search/ci-test.sh pushed its flake-info build to Cachix when CACHIX_SIGNING_KEY was set. Since bitcoinix#71 scoped the key to build_test_drivers and test_scenario, check_flake no longer has it, so nothing pushes flake-info. The cached build stopped matching when bitcoinix#125 bumped the nixos-search input, and since then every check_flake run builds flake-info and a patched Nix from source, including Nix's test suites: 28-29 min instead of about 1 min on master. check_flake now builds flake-info in its own step and pushes it from a separate step that runs only on pushes to master and is the only step that gets the key. Both run before ci-test.sh, so flake-info, which ci-test.sh runs outside the Nix build sandbox, runs only after the key step. ci-test.sh no longer pushes. Assisted-by: Claude Code (claude-opus-5-5)
Fixes #120. Refs #121.
This is a
helper/update-flake.shrun plus the follow-up changes it needs. The stable input moves to 2026-10-21 and the unstable input to 2026-10-20.cargoHashfor the 26.06.9 sourceWhy now: clightning 26.06.7 to 26.06.9 fix fund loss bugs, remote crashes, unauthenticated clnrest crashes and a rune restriction bypass (#120), and Node.js 22.23.4 fixes CVE-2026-111497, an out of bounds write in the Brotli decoder that RTL reaches before login (#121). BTCPay 2.4.3 is a security release, and Go 1.26.9 fixes
crypto/tlsandnet/http, which lnd's REST and gRPC servers use.Follow-up changes in the same commit:
pkgs/python-packages/pyln-proto: clightning 26.06.9 depends on thecoincurve-cp314-fixfork, so the patch now points it back tocoincurveand relaxes the version bound, as nixpkgs does. All five clightning plugins, trustedcoin and clboss build.BTCPAY_SSRFEXCEPTIONS.Checked: the only
createrunecall in the tree (modules/clightning-plugins/clnrest.nix) goes over the RPC socket, so the new rune restriction doesn't affect it, and nothing useslistconfigsorsetconfig.nix flake check --no-buildpasses.Scenarios on a KVM host from a fresh clone, all passed:
default,regtest,netnsRegtest,clightning-replicationandtrustedcoin.Models used on this PR: Fable 5.1 for the plan and the review, and Opus 5.5 for the change. GPT-6 Astra at xhigh reasoning reviewed the diff and found the BTCPay 2.4.5 private address block, which the versioning entry now covers. DeepSeek V4.1 Flash 1017 and GLM 5.3, both at max thinking, reviewed the tree of this revision and found nothing in the files this PR touches. Their findings elsewhere are master code that open issues already track.