Every captured commit receives deterministic security triage and a separate communication-quality score. Security candidates and broader second-pass signals receive full-patch Ollama analysis.
Message quality measures whether a commit identifies its scope, purpose, rationale, testing, and supporting references. It does not change the security-severity score.
This commit only updates documentation. It adds new version entries to the manual page for the lightning-downgrade tool and mentions the tool in the upgrade guide. No code, database logic, or security behavior is changed.
This is a packaging/build fix, not a security vulnerability. The `lightning-downgrade` utility was being compiled but accidentally left out of the list of programs installed by `make install`. As a result, official release archives contain…
This commit fixes a database upgrade bug in Core Lightning. Wallets created with version v26.06.10 were missing two new tables (our_outputs and our_txs) because they skipped the migrations that create them. When users later upgraded, a fol…
Database migration failure could prevent node startup after upgradeFixes missing table creation before data backfillAdds regression test for upgrade path from v26.06.10
This commit is a routine version bump from v26.06.10 to v26.12rc1 for Core Lightning. It only updates version strings in packaging files, a changelog, and a lockfile. There are no code changes that introduce, fix, or modify any security-se…
This commit fixes a database bug in Core Lightning where failure details for a payment attempt were being overwritten by later retry attempts that shared the same payment identifier fragment. The fix makes the failure record match on an ad…
Data integrity bug causing incorrect error reporting across payment retry groupsNo memory safety, authentication, authorization, or cryptographic issues presentNo external input is trusted or validated differently
This commit fixes a bug in Core Lightning's Rust plugin library where a plugin could crash with a panic if it tried to log a message after the internal log-writing task had already stopped, such as during shutdown. The fix makes the plugin…
panic on send failure replaced with stderr fallbacklog message no longer silently dropped on writer task exitunit test added for dropped-receiver scenario
This commit only adds documentation to the manual page for an existing command-line tool (hsmtool). It explains how to recover funds from old Lightning payment commitments (HTLCs) after losing channel state. There are no code changes, no n…
This commit only changes a test file to make a flaky test more reliable. It does not modify any production code, so it has no security impact on real users.
This commit only updates documentation to explain that the `listtransactions` command reports a block height and transaction index of 0 when a transaction is not currently in a block (for example, because it hasn't been mined yet or was re…
This is a small bug fix in a Python helper library used by Core Lightning. The Millisatoshi.to_approx_str() method previously crashed with a math error when converting a zero amount to a human-readable string. The patch makes zero return "…
No security-relevant signals presentFix is a routine correctness/robustness improvement
This commit is a trivial formatting cleanup (removing an extra blank line and adding one) in a test file. It does not change any code behavior, fix any bug, or alter any security-relevant logic.
This update fixes a crash in two wallet commands, addpsbtoutput and addpsbtinput. These commands let users add extra transaction outputs or inputs to a PSBT (a Bitcoin transaction planning file). If a user supplied a PSBT whose version 2 '…
Daemon crash (assertion failure) on crafted/strict PSBT inputMissing validation of PSBT v2 modifiable flags before mutationUser-controlled input directly passed to libwally without precondition check
This commit only adds a new test case that demonstrates two Core Lightning commands, addpsbtoutput and addpsbtinput, crash with an internal assertion when given a v2 PSBT that does not allow adding inputs or outputs. The test is marked as …
Daemon abort due to failed assertion in PSBT helper functionsRPC commands addpsbtoutput and addpsbtinput lack validation of PSBT modifiability flags before calling libwallyPotential denial-of-service vector: any caller able to submit a crafted v2 PSBT can crash lightningd
This commit fixes a minor bug in Core Lightning's Python client library where calling a pretty-printing method on a zero-amount payment would crash with a ValueError. It is a routine correctness fix, not a security vulnerability. There is …
This commit adds missing safety checks in Core Lightning when a peer sends signatures for opening or splicing a dual-funded Lightning channel. Before the patch, the software accepted peer-provided transaction witnesses without verifying th…
Missing input validation on peer-provided witness dataBOLT-2 compliance fix for tx_signaturesRejection of empty witness stacks
This fix prevents a user-issued 'abort channels' command from incorrectly failing a Lightning channel when a splice transaction has already been signed. Previously, the code would pass the latest in-flight splice to a routine that aborts i…
Denial-of-service/availability impact: user-initiated abort could inadvertently fail a funded channelProtocol compliance fix: avoids sending tx_abort after tx_signatures, which BOLT 2 forbidsState-handling bug in splice negotiation lifecycle
This update fixes a bug where a specific type of Lightning channel close could crash the node. It only happens when both parties cooperatively close a dual-funded channel that has not yet been confirmed and has gone through a funding bump …
NULL pointer dereference leading to daemon crash (denial of service)Crash occurs in cooperative-close path for unconfirmed dual-funded/RBF channelsFix uses canonical channel funding key instead of splice-only field
This commit fixes a security bug in Core Lightning's gRPC plugin (cln-grpc). Previously, a malformed request from a gRPC client could crash the plugin: bad public keys, hashes, secrets, channel IDs, or enum values triggered Rust 'unwrap()'…
Denial-of-service via malformed gRPC request causing tonic worker task panicDenial-of-service via std::process::exit(1) in ProofField conversion on missing oneofSilent integer truncation of u16/u8 fields via 'as' casts
This commit removes the protobuf package from the Nix build environment because it is no longer needed. A previous change made the cln-grpc component use its own bundled protoc compiler instead of relying on the system one. The Python bind…
This commit adds a new automated check to the project's build process that compares gRPC protocol definitions against the last release to catch accidental breaking changes early. It does not change any runtime code, fix a bug, or introduce…
openchannel_update is idempotent: once the commitments are secured a repeat call returns the existing inflight, so two racing openchannel_update calls can both legitimately succeed and the "only up to one should succeed" assertion no longer holds.
Keep the original intent (catching commands that fight over the shared command pointer and hang) by relying on result(TIMEOUT) raising TimeoutError, and assert at most one inflight instead of counting successes: that catches a genuine double commitment, while comparing the returned PSBTs does not work as inflight->funding_psbt is mutated in place (wally_psbt_combine/psbt_finalize) once tx-signatures arrive.
This commit only changes a test file. It loosens an overly strict test assertion that was causing a flaky test failure. The test previously assumed only one of several racing openchannel_update calls could succeed, but the command is actually idempotent, so multiple calls can legitimately return the same existing commitment. The fix keeps the safety check by verifying the node ends up with at most one actual commitment 'inflight' rather than counting successful RPC responses. There is no change to production code and no security fix.
hsmd: don't report forced channel secrets as memleaks
--dev-force-channel-secrets and its shaseed are allocated off NULL at init and kept forever, like --dev-force-privkey and --dev-force-bip32-seed, but only the latter two were excluded from dev-memleak, so any test using the option failed teardown with memleak reports.
(cherry picked from commit c4b2b418fb9f852048f554fd428fc4e4e872252d)
83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
secret or key material
AI analysis · Informational 18/100
This is a tiny developer-only fix for a memory-leak false alarm. When running tests with a special developer flag that forces fixed channel secrets, those secrets were wrongly reported as leaked memory during test teardown. The patch tells the memory-leak checker to ignore them, matching two similar developer-only flags already excluded. It does not change normal node behavior or affect production wallets.
Security candidateclosingd: fail the negotiation when lightningd rejects the peer's closing feeby Ken Sedgwick · a764f9c1 · Sep 14, 2026 · 4 filesMessage 73 · AdequateModerate 68Details
Commit message · Ken Sedgwick
closingd: fail the negotiation when lightningd rejects the peer's closing fee
lightningd's reply to closingd_received_signature carried only a txid. closingd used it for the billboard and went on to agree to the offer, so when lightningd had rejected the fee the close still completed and drop_to_chain broadcast last_tx, which was still the commitment, while the close command reported a mutual close.
Add the verdict to the reply. On a rejection lightningd logs it at UNUSUAL, and closingd sends the peer a warning and exits instead of agreeing, the same way it handles a fee range with no overlap. The channel stays in CLOSINGD_SIGEXCHANGE: negotiation restarts on reconnect with lightningd's current bounds, and the close command's timeout decides when to close unilaterally.
Changelog-Fixed: lightningd: a closing fee lightningd rejects fails the negotiation instead of broadcasting the commitment as a mutual close. (cherry picked from commit a944bebef3a95602b660444828882fc583241401)
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundary
AI analysis · Moderate 68/100
This fix repairs a bug in Core Lightning's channel-closing handshake. Previously, when the node rejected a peer's proposed closing fee, the rejection was not communicated back to the sub-process that negotiates with the peer. That sub-process would still treat the close as agreed and could broadcast the old commitment transaction while the user interface reported a successful mutual close. The patch adds an explicit 'acceptable' flag to the internal reply so the negotiation is aborted and the peer is warned instead of proceeding with a mismatched transaction.
Security candidatepytest: make test_grpc_wrong_auth cross the wires on one port, with deadlinesby cdecker · 8b546e46 · Sep 14, 2026 · 1 fileMessage 83 · StrongInformational 15Details
Commit message · cdecker
pytest: make test_grpc_wrong_auth cross the wires on one port, with deadlines
After l1 stopped, the old stub dialled l1's now-free gRPC port while l2 listened on a different one, so the test never checked a foreign certificate against a live node. Its gRPC calls also had no deadline: when the client keeps retrying a handshake the server rejects, the call blocked forever and hung the test.
Start l2 on l1's port, connect to 127.0.0.1 explicitly, and give every call a deadline. The call with the wrong credentials may now end in DEADLINE_EXCEEDED as well as UNAVAILABLE; both mean it was refused.
Changelog-None
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
credential or privilege state
AI analysis · Informational 15/100
This commit only changes a test file. It fixes a flaky test that was supposed to verify a gRPC client with the wrong certificate gets rejected by a different node, but the test was not actually checking the real scenario and could hang forever. There is no change to production code or any security fix to the software itself.
``` In file included from ccan/ccan/strmap/strmap.h:5, from ./common/memleak.h:4, from lightningd/channel_gossip.c:5: lightningd/channel_gossip.c: In function ‘broadcast_new_gossip’: ccan/ccan/build_assert/build_assert.h:56:17: error: anonymous struct declared inside parameter list will not be visible outside of this definition or declaration [-Werror] 56 | (sizeof(struct { _Static_assert(cond, "BUILD_ASSERT_OR_ZERO"); char c; }) - 1) | ^~~~~~ ccan/ccan/typesafe_cb/typesafe_cb.h:35:46: note: in definition of macro ‘typesafe_cb_cast’ 35 | oktype), \ | ^~~~~~ ./lightningd/subd.h:184:19: note: in expansion of macro ‘typesafe_cb_preargs’ 184 | typesafe_cb_preargs(void, void *, \ | ^~~~~~~~~~~~~~~~~~~ lightningd/channel_gossip.c:415:9: note: in expansion of macro ‘subd_req’ 415 | subd_req(ld->gossip, ld->gossip, | ^~~~~~~~ ccan/ccan/cast/cast.h:47:14: note: in expansion of macro ‘BUILD_ASSERT_OR_ZERO’ 47 | (0 ? BUILD_ASSERT_OR_ZERO(cast_const_compat1((expr), type)) : \ | ^~~~~~~~~~~~~~~~~~~~ lightningd/channel_gossip.c:417:42: note: in expansion of macro ‘cast_const’ 417 | -1, 0, addgossip_reply, cast_const(char *, desc)); | ^~~~~~~~~~ cc1: all warnings being treated as errors ```
And
``` ccan/ccan/cdump/cdump.c: In function ‘tok_take_conglom’: ccan/ccan/cdump/cdump.c:272:35: error: ‘%.*s’ directive argument is null [-Werror=format-overflow=] 272 | "Line %u: '%.*s': %s\n", | ^~~~ cc1: all warnings being treated as errors ```
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
73/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
Why it was queued
memory safety
AI analysis · Informational 14/100
This commit updates two internal helper files in the CCAN library to silence compiler warnings when building with newer GCC versions. One change swaps an anonymous struct for an anonymous union inside a compile-time size check, because GCC 13 objects to anonymous structs in certain macro expansions. The other avoids passing a NULL pointer into a printf-style error message. There is no indication these changes fix a runtime security bug; they are build-hygiene fixes.
lightningd: check expiry bounds in createinvoice too
A crafted bolt11 can carry expiry >= 2^32 past the invoice RPC's gate: the expiry field is a varint and decode does not require a valid signature, so createinvoice fed b11->expiry straight into invoice creation -- hitting the same bolt11_encode() 60-bit abort and expiry-timer overflow as the invoice path. Same bound, same message, placed before the re-encode. Pointed out in the PR thread.
Changelog-Fixed: lightningd: refuse bolt11 `expiry` above 2^32 seconds in `createinvoice` too, instead of crashing or busy-looping. Signed-off-by: Amperstrand <amperstrand@localhost> (cherry picked from commit 5f433f04e84cda27a4298500860af18e6b9b8e87)
78/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
Why it was queued
signing boundarymemory safety
AI analysis · High 76/100
This commit fixes a bug in Core Lightning's createinvoice RPC. A malicious or malformed BOLT11 invoice could include an expiry time of 2^32 seconds or more. Because createinvoice decoded the invoice without checking signature validity, it would accept that oversized expiry and either crash the daemon (inside bolt11_encode) or cause the expiry timer to misbehave. The fix adds the same upper bound check that already existed for the invoice RPC, refusing such invoices with a clear error message instead of crashing or busy-looping.
docs: document missing and fix erroneous JSON-RPC error codes
Audit the `errors` sections of the RPC schemas against the error codes the handlers actually raise, and fix the discrepancies.
FUNDING_STILL_SYNCING_BITCOIN (304) is only raised by `fundpsbt` and `utxopsbt` (wallet/reservation.c), and is forwarded verbatim by every other command which can return it. Document it on `fundpsbt`, `utxopsbt`, `txprepare`, `withdraw`, `multiwithdraw`, `upgradewallet`, `fundchannel` and `multifundchannel`. Conversely, `fundchannel_start` and `openchannel_init` do not call either: when the node is not synced they delay via topology_add_sync_waiter() and retry, so drop their stale 304.
Also fix the remaining discrepancies:
- `delpay` documented 211 for a status mismatch, but that path returns 208 (PAY_NO_SUCH_PAYMENT); 211 is never raised by `delpay`, so replace it; - document missing codes: `createinvoice` 907 (INVOICE_OFFER_INACTIVE), `enableoffer` 1007 (OFFER_USED_SINGLE_USE), `getroutes` 217 (PAY_USER_ERROR) and `addpsbtoutput` 302/309; - add `errors` sections to `splice_init`, `splice_update` and `splice_signed` (351-356), `disableoffer` and `disableinvoicerequest` (1001), `preapproveinvoice` (213), `preapprovekeysend` (214) and `recover` (1600).
The splice commands can also fail asynchronously, after the command has gone pending, through the channeld message handlers in channel_control.c which resolve the pending command via splice_command_for_chan(). Document those codes too: 350 (SPLICE_BROADCAST_FAIL) on `splice_signed`; 357/359/360 (SPLICE_FUNDING_LOW/SPLICE_LOW_FEE/SPLICE_HIGH_FEE) on `splice_update`; and 358/362/363 (SPLICE_STATE_ERROR/SPLICE_ABORT/ SPLICE_CHANNEL_ERROR) on all three.
Changelog-None
85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context
Why it was queued
signing boundarysigning or wallet pathboot or update path
AI analysis · Informational 21/100
This commit is a documentation-only cleanup of the JSON-RPC command help files. It corrects which numeric error codes are listed for each command so the published schemas match what the software actually returns. No program logic, validation, or behavior was changed, so it cannot be exploited or cause runtime failures. It mainly helps developers and automated tools build correct clients.
peer->tx_sigs_allowed was only set in peer_reconnect() and when we receive channel_ready, so on a fresh channeld start a stray tx_signatures arriving before the peer's channel_ready made handle_unexpected_tx_sigs() read an uninitialized bool. UBSan flags this as a load of an invalid bool value, and in normal builds the "warn and disconnect" branch was effectively taken at random.
Default it to false: we only allow an unexpected tx_signatures when reconnecting.
Changelog-None
73/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
Why it was queued
signing boundary
AI analysis · Low 46/100
This commit fixes a bug where a setting that controls whether unexpected transaction signatures are allowed was not initialized when the channel daemon starts. If a peer sent such signatures before the channel was fully ready, the program would read an uninitialized value. In practice this usually caused a random, harmless disconnection, but under undefined-behavior detection it was flagged as a serious bug. The fix simply sets the value to false at startup.
Three things stand between the restored scripts and a nightly that finishes:
pyln-testing sets CLN_TEST_NAME for every test, so the profiles land in $CLN_COVERAGE_DIR/<test-name>/ and never directly in $CLN_COVERAGE_DIR. The coverage-raw/*.profraw upload glob therefore matches nothing, under if-no-files-found: error. A local three-test run produced 515 profiles, all of them in subdirectories. Both jobs now hand the directory to collect-coverage.sh, which walks it and drops what crashed tests left half-written; that also retires the flattening cp, which could collide on <pid>-<signature>.profraw between matrix cells.
The build uses the runner's default clang while the report job installed LLVM 18 and symlinked llvm-profdata to it. There are no compatibility guarantees for the raw profile format across LLVM releases, so the two have to come from the same one.
Codecov cannot read a .profdata; it gets the lcov export instead.
Changelog-None Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HGKo3ccLpkH2xFeEXUzEBK
100/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
Why it was queued
signing boundarydocumentation-only discount
AI analysis · Informational 15/100
This commit fixes the project's internal nightly code-coverage CI workflow. It changes how test coverage files are collected, ensures the same LLVM compiler version is used to generate and merge coverage data, and uploads a Codecov-compatible lcov report instead of an unreadable .profdata file. There is no security issue here—just build-script maintenance.
Security candidatelightningd: fix crash and busy-loop on invoice with huge expiryby Amperstrand · 8206c0f5 · Sep 5, 2026 · 2 filesMessage 73 · AdequateHigh 74Details
Commit message · Amperstrand
lightningd: fix crash and busy-loop on invoice with huge expiry
invoice's `expiry` parameter is an unclamped param_u64, and far-future values break the daemon in two different ways:
- expiry >= 2^60 needs more bits than push_varlen_field() can encode in the bolt11 `x` field, so bolt11_encode() aborts the whole daemon (FATAL SIGNAL 6).
- far below that (anywhere past ~584k years), the invoice expiration timer's nanosecond-grain u64 counter overflows: install_expiration_timer() arms a timer that reads as already due, trigger_expiration() finds nothing expired, re-arms, and the daemon busy-loops at 100% CPU with the RPC reply left racing the storm.
Refuse at the parameter stage instead: expiry >= 2^32 seconds (~136 years) returns JSONRPC2_INVALID_PARAMS, keeping a wide margin under both limits. 2^32 - 1 still works.
Changelog-Fixed: lightningd: fix crash (`FATAL SIGNAL 6`) and a 100% CPU busy-loop when calling `invoice` with an `expiry` too far in the future (now refused above 2^32 seconds). (cherry picked from commit 009caeb30f216df22f33fcc607d1c21ead859447)
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
memory safety
AI analysis · High 74/100
This commit fixes a bug in Core Lightning's invoice creation command. If a user requested an invoice that expired extremely far in the future (more than about 136 years), the software would either crash the entire payment daemon or get stuck using 100% CPU. The fix simply rejects such large expiry values early, returning a normal error instead of crashing or looping.
Security candidateschemas: make required fields match the codeby daywalker90 · ddbd2963 · Sep 3, 2026 · 50 filesMessage 78 · AdequateLow 37Details
Fields removed from `required` (conditional in code): - bkpr-editdescriptionbypaymentid/items[]: `description` - plugins/bkpr/chain_event.c:33-34, plugins/bkpr/channel_event.c:53-54 - createinvoice & sendinvoice: `description` - lightningd/invoice.c:64-65 - hook/invoice_payment: `result` - lightningd/invoice.c:237 (optional); `failure_message` only used when `result` is absent, now required there via if/then/else - invoicerequest (request): `description` - plugins/offers_offer.c:693 (p_opt) - splice_signed (request): `channel_id` - lightningd/channel_control.c:2511 (p_opt)
Note: bkpr-editdescriptionbyoutpoint keeps `description` required: the SQL refetch filters credit_msat > 0 (recorder.c:376-382) and the desc was just stored keyed by outpoint (bookkeeper.c:853).
Adjust plugins and tests to the now-required fields: - lsps-plugin: peer.features is non-optional (listpeers) - wss-proxy-plugin: listconfigs' configs object is non-optional - cln-rpc/src/test.rs
Changelog-None
78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
signing boundarysigning or wallet pathparser or protocol path
AI analysis · Low 37/100
This commit is a large cleanup of Core Lightning's API schemas, generated RPC bindings, and related plugin code. The stated goal is to make the documented 'required' fields match what the C code actually always produces or expects. In practice it mostly removes 'optional' markers from fields that were already unconditionally emitted, and makes a few truly conditional fields optional. It also changes one plugin hook response schema so that a plugin can reject a payment by returning only a custom failure_message, without a result field. The changes are broad but are described by the project as a schema consistency fix, not a security fix. There is no direct evidence in the commit of an exploitable vulnerability.
Security candidatedoc: document error 313 on every command which can return itby Peter Neuroth · a34b9758 · Sep 2, 2026 · 6 filesMessage 73 · AdequateInformational 15Details
Commit message · Peter Neuroth
doc: document error 313 on every command which can return it
FUND_CANNOT_AFFORD_WITH_EMERGENCY is raised in exactly two places, `fundpsbt` and `utxopsbt` (wallet/reservation.c), when the node has an anchor channel and the transaction would not leave `min-emergency-msat` behind. Note that this does not require `opening_anchor_channel`: any existing anchor channel is enough.
Every other command which can return it does so by forwarding one of those two errors verbatim, but only `withdraw`, `fundchannel` and `multifundchannel` documented it. Add it to the rest:
- `fundpsbt` and `utxopsbt`, which raise it directly; - `txprepare` and `multiwithdraw`, which call them; - `upgradewallet`, which calls `utxopsbt` via txprepare_continue() and had no `errors` section at all, so document -1 and 301 there too.
Changelog-None
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundarysigning or wallet path
AI analysis · Informational 15/100
This commit only updates documentation. It adds error code 313 to the documented error lists for several Core Lightning commands (fundpsbt, utxopsbt, txprepare, multiwithdraw, and upgradewallet). The error code already existed in the code and was already documented for some commands; this change makes the documentation complete and consistent. No code behavior changes.
Security candidatetools/build-release.sh: name the checksum file when verifying the signatureby Peter Neuroth · 8e495707 · Sep 2, 2026 · 1 fileMessage 88 · StrongLow 25Details
Commit message · Peter Neuroth
tools/build-release.sh: name the checksum file when verifying the signature
The --verify path called `gpg --verify ../SHA256SUMS-$VERSION.asc` and let gpg work out the rest. For a proper detached signature it does find the sibling file, so this happened to work, but an inline signed .asc would verify its own embedded payload and exit 0 without ever looking at the checksums we just compared. Since the exit status is what decides whether we print "Verified Successfully!", that is not a distinction we want to leave to gpg.
Changelog-None: docs and release tooling only, nothing user-facing.
88/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Names security-relevant behavior explicitly
Why it was queued
signing boundary
AI analysis · Low 25/100
This commit fixes a release-script check that verifies the cryptographic signature on a file of checksums. Previously, the script only told GPG to verify the signature file itself. If someone replaced that signature file with an inline-signed message containing its own text, GPG would still report success without ever checking the actual checksum file. The fix explicitly names the checksum file so GPG verifies the signature against the intended manifest. This is a hardening change in internal release tooling, not a fix for an active vulnerability in the Lightning node software users run.
Security candidatedoc: pass the manifest explicitly to gpg --verifyby Peter Neuroth · 2dee8699 · Sep 2, 2026 · 2 filesMessage 95 · StrongLow 42Details
Commit message · Peter Neuroth
doc: pass the manifest explicitly to gpg --verify
We told people to drop SHA256SUMS and SHA256SUMS.asc into the same directory and run `gpg --verify SHA256SUMS.asc`. That relies on gpg guessing what to check, and the guess only happens for a real detached signature. If the .asc turns out to be an inline signed message, gpg verifies the payload embedded in the .asc itself, never touches SHA256SUMS, and exits 0. It does warn on stderr, but that is easy to scroll past and worthless to anything checking the exit code.
Spell out both filenames instead, and explain why. Also drop the "gpg: assuming signed data in 'SHA256SUMS'" line from the sample output, since gpg has nothing left to assume once we name the file.
95/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification✓ Names security-relevant behavior explicitly
Why it was queued
signing boundarydocumentation-only discount
AI analysis · Low 42/100
This commit updates Core Lightning's release documentation to tell users and release managers to run gpg --verify with both the signature file and the manifest file named explicitly. The old one-argument form can silently succeed even if the .asc file is not a proper detached signature over the manifest, because gpg may verify only a message embedded inside the .asc file and never check SHA256SUMS. The change prevents a subtle but real verification bypass in the release process, though it is a documentation-only fix and does not change any code or tooling.
roxmltree's tokenizer is recursive-descent (parse_element -> parse_content), so Document::parse itself recurses once per element nesting level and overflows the thread stack on deep input, before any DOM is built. A deeply nested but otherwise valid XML request could therefore crash clnrest's worker thread, killing the plugin.
Bound the element nesting depth iteratively on the raw request bytes, before parsing, and reject anything deeper than 256 levels. The depth check is itself iterative, so it cannot overflow.
Changelog-Fixed: clnrest: reject excessively-nested XML rather than risk a stack overflow. (cherry picked from commit af6bd803c0962bdb1d5f2367eb6d3913d442cb54)
85/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Names security-relevant behavior explicitly
Why it was queued
memory safety
AI analysis · High 72/100
This update fixes a crash bug in Core Lightning's REST plugin (clnrest). An attacker could send a specially crafted XML request with hundreds of nested tags. The XML parser used by the plugin processes tags by recursive function calls, so extremely deep nesting would exhaust the thread's call stack and crash the plugin worker. The fix pre-scans raw request bytes to count nesting depth without recursion and rejects anything deeper than 256 levels with a 'bad request' error, preventing the crash.
The places we forget an in-progress open now go through forget_channel_open(), which quotes BOLT #2 and won't delete once we've sent tx_signatures. Merged the duplicated BOLT #1 error quote while we were here.
Co-authored-by: Cursor <cursoragent@cursor.com> (cherry picked from commit 8e6dfad5de657c1e778e7ee22f6a213da75ec022)
81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
signing boundary
AI analysis · Low 42/100
This change refactors how Core Lightning cleans up unfinished channel openings when something goes wrong mid-negotiation. It funnels all 'forget this channel' paths through one helper that refuses to delete the channel once the node has already sent its transaction signatures. Before, the same safety check was repeated in several spots, which made it easier to accidentally skip it in future changes. The patch is a defensive hardening fix rather than a clear-cut vulnerability repair, but it directly enforces a protocol rule meant to prevent funds from being lost or stuck.
This commit is a routine update to the Rust dependency lock file (Cargo.lock), bumping many third-party libraries to newer patch or minor versions. The commit message gives no security reason for the update, and no verified references link it to a known vulnerability. Dependency updates can fix hidden security bugs, but this change alone does not prove any specific flaw exists or is being patched.
json_next() and the JSMN result validator each recurse once per level of nesting, so a sufficiently deeply nested (but otherwise valid) JSON document could exhaust the C stack. Bound the nesting depth in json_parse_input(), before either recursive walk runs, and reject anything deeper. The depth check is itself iterative, so it cannot overflow.
Changelog-Fixed: JSON-RPC: reject excessively-nested JSON rather than risk a stack overflow. (cherry picked from commit b940aa32b7b385b4139bbc9251b1cca044c496cc)
85/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Names security-relevant behavior explicitly
Why it was queued
memory safety
AI analysis · High 80/100
This commit fixes a stack-overflow risk in Core Lightning's JSON parser. Before the fix, an attacker could send a valid JSON-RPC message containing thousands of nested brackets or braces. The parser's own helper functions used recursion for each nesting level, so such input could crash the process by exhausting the C call stack. The patch adds an iterative depth check (maximum 256 levels) before any recursive walk, rejecting over-nested input safely.
Security candidatelightningd: allow openchannel_abort up until we send tx_signaturesby Sangbida Chaudhuri · 266379da · Aug 20, 2026 · 2 filesMessage 91 · StrongLow 34Details
Commit message · Sangbida Chaudhuri
lightningd: allow openchannel_abort up until we send tx_signatures
Previously we refused to abort once commitments were exchanged, but per BOLT #2 an abort is fine as long as we haven't sent our tx_signatures yet. Also adds a test for the case where the opener aborts after the accepter has already sent theirs.
Changelog-Changed: JSON-RPC: `openchannel_abort` can now abort an open after commitments are secured, as long as `tx_signatures` has not been sent. Co-authored-by: Cursor <cursoragent@cursor.com> (cherry picked from commit dd09e5129f2b4f3516940f1a0d00e822f9e72dd4)
91/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
signing boundary
AI analysis · Low 34/100
This change loosens when a user can cancel an in-progress Lightning channel opening. Previously, the software blocked cancellation once both sides had exchanged commitment signatures, even though the protocol rules allow cancellation until the opener has actually sent their transaction signatures. The fix lets users abort later in the process and adds a test confirming the correct behavior. It is a protocol-correctness and usability improvement rather than a fix for an active attack.
Security candidatedualopend: abort politely instead of erroring when we haven't signedby Sangbida Chaudhuri · ec4bcd14 · Aug 20, 2026 · 2 filesMessage 73 · AdequateLow 37Details
Commit message · Sangbida Chaudhuri
dualopend: abort politely instead of erroring when we haven't signed
If lightningd asks us to fail before we've sent tx_signatures, a clean tx_abort is the neighbourly thing to do (the spec says so too). And once the abort completes, the channel is safe to forget.
Co-authored-by: Cursor <cursoragent@cursor.com> (cherry picked from commit 4a232fca5a7f83f2b6dccd0062fd4b1be6cf1e3b)
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundary
AI analysis · Low 37/100
This change fixes how Core Lightning handles an early shutdown during a dual-funded channel opening. Previously, if the node was asked to fail before it had sent its transaction signatures, it would treat it as a fatal error and remember the channel unnecessarily. Now it sends a polite 'tx_abort' message and forgets the channel, which is what the Lightning protocol specification recommends. This avoids leaving half-open channels stuck in memory and reduces unnecessary error handling.
Security candidatelightningd: don't forget a channel once we've sent tx_signaturesby Sangbida Chaudhuri · 8f4f5515 · Aug 20, 2026 · 3 filesMessage 81 · StrongModerate 60Details
Commit message · Sangbida Chaudhuri
lightningd: don't forget a channel once we've sent tx_signatures
Once our sigs have gone out, BOLT #2 says to hold onto the channel until an input of the funding tx has been spent. Guard the deletion paths on the new i_sent_sigs flag so an abort or error after that point keeps the channel around.
Changelog-Fixed: Protocol: dual-fund: we now remember the channel when the peer sends `tx_abort` after we have already sent our `tx_signatures`, as required by BOLT #2. Co-authored-by: Cursor <cursoragent@cursor.com> (cherry picked from commit 435fec73acbba17bf9d14bcc72ea088f2beaaf01)
81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
signing boundary
AI analysis · Moderate 60/100
This patch fixes a bug in Core Lightning's dual-funded channel opening. Previously, if the peer sent an 'abort' message or an error occurred after we had already sent our transaction signatures, the node might forget the channel. Because those signatures could let the peer broadcast the funding transaction on the Bitcoin network, forgetting the channel could leave the node unaware of funds it had committed to. The fix makes the node remember the channel until the funding transaction's inputs are spent, as required by the Lightning protocol specification.
Security candidatedualopend: keep track of whether we sent our tx_signaturesby Sangbida Chaudhuri · 742a8d3a · Aug 20, 2026 · 3 filesMessage 85 · StrongLow 41Details
Commit message · Sangbida Chaudhuri
dualopend: keep track of whether we sent our tx_signatures
Add local_funding_sigs_sent to tx_state, set when we write our sigs to the peer (both the normal path and the reconnect dance). Pass it back in over dualopend_reinit, since dualopend restarts on every reconnect and would otherwise start from scratch.
Co-authored-by: Cursor <cursoragent@cursor.com> (cherry picked from commit c654559c471c11e699e39cb2b9eb2d512701911e)
85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
signing boundary
AI analysis · Low 41/100
This change fixes a bookkeeping problem in Core Lightning's dual-funding channel opener (dualopend). The daemon now remembers whether it already sent its transaction signatures to the peer, and carries that memory across reconnects. Without this, after a reconnect the opener could forget it had already sent signatures and behave as if it hadn't, likely causing protocol confusion, duplicate sends, or a stuck channel open. The patch is small and defensive; the commit message does not call it a security fix, but it clearly corrects state-handling behavior that could affect funds safety.
Security candidatelightningd: remember that we've sent tx_signatures for an openby Sangbida Chaudhuri · 6b968776 · Aug 20, 2026 · 3 filesMessage 73 · AdequateLow 28Details
Commit message · Sangbida Chaudhuri
lightningd: remember that we've sent tx_signatures for an open
Set i_sent_sigs when dualopend tells us the sigs went out, and add a little helper to ask "did we sign this yet?" No behavior change... yet.
Co-authored-by: Cursor <cursoragent@cursor.com> (cherry picked from commit 8a31f7296fcff1c444be4c6e86eac1dc1c912c57)
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundary
AI analysis · Low 28/100
This commit adds a small bookkeeping flag so the Core Lightning node remembers whether it has already sent transaction signatures while opening a channel. The commit message explicitly says there is 'No behavior change... yet,' meaning this is a preparatory patch for a future fix rather than a security fix itself. It does not change how funds are handled today.
Security candidatecommon: explain why mlock() failed instead of a bare abort.by Matt Watson · ef18b769 · Aug 18, 2026 · 1 fileMessage 85 · StrongInformational 21Details
Commit message · Matt Watson
common: explain why mlock() failed instead of a bare abort.
mlock_tal_memory() aborts when sodium_mlock() fails, with no output at all. The operator sees only "lightning_hsmd: FATAL SIGNAL 6" and has no indication of the cause.
This is easy to hit. FreeBSD jails deny mlock(2) unless the jail has allow.mlock set, and containerized Linux deployments hit the same wall against RLIMIT_MEMLOCK. In both cases the failure is indistinguishable from a crash.
Keep the abort -- falling back to unlocked memory would silently leave the secret in swappable pages -- but say what failed and how to grant the privilege.
The message goes to stderr via warnx() rather than status_failed(): common/utils.c is linked into every binary, and mlock_tal_memory() is also reached from common/hsm_secret.c, where no status fd need exist. stderr is the one channel available at every call site, and warnx() gives it the same daemon-name prefix as the crashdump() line that follows.
Changelog-Fixed: Report the cause when locking secret memory fails, instead of aborting with no diagnostic.
85/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
credential or privilege state
AI analysis · Informational 21/100
This change only improves the error message shown when the program aborts because it cannot lock secret memory. It does not fix a security vulnerability, change behavior, or remove the abort. The program still crashes, but now tells the operator why and how to grant the needed permission.
wallet: exclude immature coinbase outputs from fee rescue selection
wallet_utxo_boost() selects wallet-funded inputs for anchor and HTLC fee rescue transactions, but unlike ordinary coin selection it never applied the coinbase-maturity check. An immature coinbase could therefore be the sole rescue input, producing a consensus-invalid transaction that Bitcoin Core rejects as a premature coinbase spend.
Apply the same utxo_is_immature() filter used by deep_enough()/ordinary selection. Since both call sites pass the live blockheight and rebuild on reorg/RBF, maturity is revalidated at construction and after reorgs.
This makes test_anchorspend_ignores_immature_coinbase pass, so its xfail marker is dropped.
Changelog-Fixed: Wallet: anchor and HTLC fee rescue no longer select immature coinbase outputs, which produced a transaction bitcoind rejects (cherry picked from commit 5e79baacc1c900c29acfae852f6233095872e309)
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
defensive validationconsensus or confidential-proof validationsigning or wallet path
AI analysis · Moderate 60/100
This fix prevents Core Lightning from trying to use freshly created bitcoins (immature coinbase rewards) as emergency funds for fee-bump transactions. Such a transaction would be invalid under Bitcoin's rules and would be rejected by the network, potentially leaving a channel unable to quickly bump fees during congestion. The patch adds the same maturity check already used for normal spending.