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…
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.
AI review queuedCCAN: update after 32-bit and MacOS cleanups.by Rusty Russell · 26ccced5 · Aug 21, 2026 · 34 filesMessage 78 · AdequateLow 47Details
Commit message · Rusty Russell
CCAN: update after 32-bit and MacOS cleanups.
The addition of GitHub CI to CCAN, especially 32 bit builds and MacOS tests lead to more refinement (mostly in tests), so this catches up to that.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
second-pass: unusually broad change
AI analysis · Low 47/100
This commit updates the CCAN utility library used by Core Lightning. Most changes are test fixes and portability cleanups for 32-bit and macOS builds. The one genuinely security-relevant code change is in the file-descriptor passing helper (fdpass_recv): it now uses a larger ancillary buffer and also checks the MSG_CTRUNC flag, so a malicious or misbehaving peer cannot force the process to leak file descriptors by sending more fds than expected. A second change in the I/O engine fixes a case where a write-side EPIPE could leave a connection's read side permanently disabled. The commit message itself does not frame these as security fixes.
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.
AI review queuedwallet: let wallet_inflight_save update i_sent_sigsby Sangbida Chaudhuri · d502d418 · Aug 20, 2026 · 1 fileMessage 73 · AdequateLow 30Details
Commit message · Sangbida Chaudhuri
wallet: let wallet_inflight_save update i_sent_sigs
Turns out we never persisted this flag after the fact. We're about to start relying on it, so save it properly.
Co-authored-by: Cursor <cursoragent@cursor.com> (cherry picked from commit 7a01495359add9c1f1160440fee5335c4a5608f1)
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Low 30/100
This commit fixes a bug where a flag called i_sent_sigs was not being saved to the database when updating a channel funding inflight. The flag tracks whether a node has already sent signatures for a funding transaction. Because the flag was not persisted, a node could forget it had sent signatures after a restart, which could lead to incorrect behavior in upcoming code that relies on this flag. The fix is a one-line SQL update change to also write the i_sent_sigs column.
AI review queuedcommon: minor typo fixesby w3lld1 · 273d7f02 · Aug 20, 2026 · 2 filesMessage 28 · OpaqueInformational 15Details
Commit message · w3lld1
common: minor typo fixes
28/100 · OpaqueMessage clarity
✓ Subject identifies a change! No meaningful explanatory body
Why it was queued
second-pass: opaque commit message
AI analysis · Informational 15/100
This commit only fixes typos and comment style. It changes two C-style comments from // to /* */ and corrects a grammar error in a documentation comment ('element' to 'elements'). There are no code behavior changes, no bug fixes, and no security relevance.
AI review queuedpyln-testing: truncate long testnamesby Peter Neuroth · c4fe4cba · Aug 19, 2026 · 2 filesMessage 90 · StrongInformational 20Details
Commit message · Peter Neuroth
pyln-testing: truncate long testnames
Postgres truncates identifiers at 63 bytes. This can lead to 'DuplicateDatabase' errors for tests with long names, as the nonce and the node_id may collapse. This commit truncates the testname in favor of the node_id and the nonce, to avoid conflicting db names.
Changelog-None
Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
90/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification
Why it was queued
second-pass: broader security terminology
AI analysis · Informational 20/100
This change fixes a test-infrastructure bug in Core Lightning's Python testing helpers. When running tests against a PostgreSQL database, very long test names could be silently shortened by PostgreSQL, causing different test runs or nodes to accidentally share the same database name and fail with a 'DuplicateDatabase' error. The patch makes sure the unique parts of the name (node ID and random nonce) are kept while the long human-readable test name is shortened instead. It is a reliability fix for the test suite, not a security vulnerability in the live lightning node software.
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.
AI review queuedaskrene: fix crash loading node bias with descriptionby Vincenzo Palazzo · 4681177d · Aug 18, 2026 · 2 filesMessage 91 · StrongModerate 59Details
Commit message · Vincenzo Palazzo
askrene: fix crash loading node bias with description
load_node_bias() passed take(description) to two consecutive set_node_bias() calls. The first call's tal_strdup() consumes the take (tal_resize_ + tal_steal), so the second take() was on freed memory and we aborted in to_tal_hdr() with "Not a valid header" while loading the layer at startup. Since askrene is an important plugin, lightningd shuts down and the node cannot restart at all.
The description is already a copy off tmpctx, so simply don't take() it: set_node_bias() strdups it into the bias anyway.
With this, the test from the previous commit passes.
Fixes: #9433 Reported-by: endothermicdev Changelog-Fixed: askrene: node failed to start (`exited before replying to init`) when a persistent layer contains a node bias with a description Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
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
second-pass: broader security terminology
AI analysis · Moderate 59/100
This commit fixes a bug in Core Lightning's askrene plugin that could prevent a node from restarting. When a saved routing layer contained a node bias with a description, the plugin accidentally freed the description's memory while using it a second time, causing an immediate crash during startup. The fix removes the incorrect 'take ownership' call so the description remains valid for both uses. There is no evidence this crash can be triggered remotely or used as an attack; it appears to be a reliability bug that only affects nodes that already have such saved data.
AI review queuedtests: restart the node which owns the layer in node bias testby Vincenzo Palazzo · 0f3f67a0 · Aug 18, 2026 · 1 fileMessage 91 · StrongInformational 12Details
Commit message · Vincenzo Palazzo
tests: restart the node which owns the layer in node bias test
test_node_bias_persistence() restarted l2, but the layer and its node bias records live in l1's datastore. The assert compared l1's in-memory layer against itself, so load_node_bias() was never actually exercised and this test could not have caught the startup crash in #9433.
Restarting l1 instead makes the test reload the layer from the datastore at startup. This is the reproducer for #9433; it fails until the next commit.
✓ 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
second-pass: broader security terminology
AI analysis · Informational 12/100
This commit only fixes a test case so it actually exercises the intended code path. It does not change any production code, so it cannot introduce or fix a real-world security vulnerability by itself. The test change is a reproducer for a startup crash reported elsewhere, but the crash fix is in a separate commit.
Security candidatedualopend: bound the feerates a peer opens atby cdecker · ba08356f · Aug 17, 2026 · 4 filesMessage 68 · AdequateHigh 78Details
Commit message · cdecker
dualopend: bound the feerates a peer opens at
The previous commits bounded the feerates arriving on every path except this one. `accepter_start()` takes both `funding_feerate_perkw` and `feerate_per_kw_commitment` straight off the wire from `open_channel2` with no bound in either direction, and `dualopend_wire.csv` had no min_feerate/max_feerate on `dualopend_init` at all -- so it is not that the check was forgotten at the call site, it is that the bounds were never plumbed to the daemon.
The `openchannel2` hook only *reports* `feerate_our_max`/`feerate_our_min` to plugins. With no plugin hooked nothing enforces them, so a peer could name any feerate and we would sign for it and store it. This is the `open_channel2` plant named in the advisory, and the missing lower bound is where the stored `feerate == 0` comes from.
Plumb the bounds into dualopend_init and dualopend_reinit -- reinit too, since rbf_remote_start runs after a reconnect -- and apply them where the values are parsed. The two feerates get different floors:
- The commitment feerate is held to feerate_min, as openingd holds open_channel's: too low and the commitment we are signing cannot be relayed at the point we need it. - The funding feerate is held only to FEERATE_FLOOR. A slow funding tx is the opener's problem and RBF is the remedy, so our policy minimum would refuse perfectly good opens; but 0 is not a feerate, and it is exactly the value that leaves no valid next RBF step.
The RBF path needs the upper bound separately: check_funding_feerate() only enforces the 25/24 step *upwards*, so without this a peer can walk an accepted open's feerate up without limit, one RBF at a time.
rbf_local_start() is left alone deliberately: that feerate comes from our own openchannel_bump, which lightningd already holds to our_feerate_max.
As with channeld and openingd, ignore_fee_limits relaxes the policy bounds but never FEERATE_CEILING.
Changelog-Fixed: dualopend: a peer opening a channel with `--experimental-dual-fund` can no longer name an arbitrary funding or commitment feerate; both are now bounded as other remote-proposed feerates are. (cherry picked from commit 4e653ad602adbb6afe7f727e029723c6f902171e)
68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing boundary
AI analysis · High 78/100
This commit fixes a bug in Core Lightning's experimental dual-funded channel feature. When another node tried to open a channel, Core Lightning was not checking whether the proposed transaction fees were reasonable. A peer could request a fee of zero, an impossibly high fee, or a commitment transaction fee so low it would never confirm. Core Lightning would sign and store these values anyway. The fix adds minimum and maximum fee checks, similar to those already present for other channel-opening paths.
tests: regression coverage for out-of-range feerates
Three tests, one per way an absurd feerate used to get in or blow up.
test_feerate_ceiling drives the fee source: bcli trims anything wider than a u32 of perkb to exactly 0xFFFFFFFF, which is also the value whose +3 wrapped in the perkb->perkw conversion, so a fee source producing an absurdly *high* feerate used to arrive as 0perkw and get quietly raised to the floor. It fails without both the widened conversion and the ceiling.
test_splice_stored_feerate_repaired_on_upgrade plants the poisoned value on an inflight and then rewinds the db version so the clamping migrations run over it, which is the upgrade an already-attacked node goes through. Parametrized over the overflow value in both the form lightningd itself would have stored it (db_bind_int makes it negative) and the form you get writing it by hand, plus the zero case and a merely-large one. Asserts both that the row is repaired and that listpeerchannels -- which used to abort right here -- agrees.
test_splice_feerate_too_high covers the accepter bound, which did not previously exist: force_feerate gets us past our own check on what we will pay, leaving the peer's bound as the thing under test. The RPC blocks because the splice_ack never comes, hence the thread.
Changelog-None
(cherry picked from commit a609189feeaad80680c35791abad7e1fea66974d)
100/100 · StrongMessage clarity
✓ Specific, 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
explicit security languagememory safety
AI analysis · High 72/100
This commit adds regression tests for three related bugs where wildly wrong Bitcoin transaction feerates could enter Core Lightning. In the worst case, a malicious or broken fee source could make the node think a feerate was zero (due to a 32-bit integer overflow), causing transactions to be mined very slowly or not at all. Another bug let an attacker plant an out-of-range feerate in the database, which then crashed the node every time it started because a plugin called listpeerchannels before the RPC was available. A third bug allowed a peer to propose a splice with an absurdly high feerate that the accepting node did not previously reject. The commit only contains tests; the actual fixes are implied to exist in the code the tests exercise.
Security candidatelightningd: don't assert on funding feerates read from the dbby cdecker · d67c4936 · Aug 17, 2026 · 7 filesMessage 86 · StrongModerate 64Details
Commit message · cdecker
lightningd: don't assert on funding feerates read from the db
The 25/24 RBF escalation from BOLT #2 is computed on a u32 in three places, and two of them assert that the result came out larger than the input. It doesn't, for anything above UINT_MAX/25: the multiplication wraps and the assert fires. That value comes out of channel_funding_inflights, which is to say out of whatever fee estimator (ours or a peer's) produced it, so it is not an invariant we were ever in a position to state.
The worse of the two is in json_add_channel. listpeerchannels is read-only introspection that plugins call at startup, so one bad row turns into a crash-loop with no RPC left to repair it with.
check_funding_feerate() in dualopend already had the right shape for this, so hoist it into bitcoin/feerate.c as next_funding_feerate() and use it at all three sites rather than keeping three copies of the calculation. It also rejects a last feerate of 0, which is the other end of the same problem: assert(last_feerate > 0) sits immediately above the overflow one.
That makes next_feerate a field we can fail to produce, so the schema no longer requires it: a last feerate of 0, or one below 24 where rounding down lands back on itself, admits no valid next feerate, and there is no honest value to print for one. The bindings already modelled it that way (Option<String> in cln-rpc, optional in the proto), so the required list was the outlier.
The preceding commits bound every path a feerate arrives on, and the migration repaired what was already stored, so the invariant does now hold. This is the belt to their braces: a future unbounded write path should not be able to turn straight back into a crash-loop, and finding out about it in listpeerchannels is finding out too late. Since the stored value is in range, the output is unchanged in every reachable case. openchannel_bump fails the command rather than the daemon.
Changelog-Fixed: lightningd: `listpeerchannels` no longer aborts when a channel has an out-of-range funding feerate stored for an in-progress open. Changelog-Changed: JSON-RPC: `listpeerchannels`.`next_feerate` is now optional: it is omitted for an in-progress open whose stored feerate admits no valid next feerate. (cherry picked from commit 84443b55fc4a5cc2d6e3a557f2c58dca60f8f264)
86/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
Why it was queued
memory safety
AI analysis · Moderate 64/100
This update fixes a crash bug in Core Lightning. When the software tried to list details of a channel opening in progress, it could crash if a stored fee rate was extremely large or zero. The crash happened because the code used an internal sanity check (an 'assert') that treated bad stored data as an impossible condition. The fix replaces that hard crash with a safe failure: it either skips the optional 'next fee rate' field in the output, or returns an error for the specific command. This prevents a single bad database row from making the whole node crash repeatedly at startup.
wallet: clamp absurd inflight funding feerates on upgrade
The bounds in the previous commits only apply to feerates arriving from now on. Nodes that already recorded an absurd `funding_feerate` for an inflight splice or dual-fund RBF are stuck: the BOLT #2 rule that the next RBF pays 25/24 times the last feerate is computed on a u32, so anything above UINT_MAX/25 overflows and trips the assert(next_feerate > last_feerate) in listpeerchannels. Plugins call listpeerchannels at startup, so such a node crash-loops with no way out but to rewrite the stored value.
Clamp it on upgrade. Note we write the feerate with db_bind_int(), so a u32 above INT_MAX reads back negative; those are exactly the values that overflow, hence the second clause.
Rewriting is safe: this feerate only sanity checks the fee the funding transaction already pays and tells the user what the next RBF has to beat. It never feeds anything we have signed, and lowering it only relaxes the check.
Changelog-Fixed: lightningd: nodes that stored an out-of-range feerate for an in-progress splice no longer crash-loop on `listpeerchannels`; the stored feerate is clamped on upgrade. (cherry picked from commit 0393174cb312079da1e0d272640cac145ccdf4c7)
86/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
Why it was queued
memory safetysigning or wallet path
AI analysis · Moderate 53/100
This commit fixes a bug where Core Lightning nodes could get stuck in a crash loop. If a node had previously stored an extremely high or zero fee rate for an in-progress channel funding operation (a 'splice' or dual-funded channel RBF), a later code check would overflow or fail an assertion when listing peer channels. Since plugins call that list at startup, the node would keep crashing. The fix adds a database upgrade step that clamps those bad stored values to safe limits when the node starts up after updating.
AI review queuedaskrene: exclude stubchannels from routingby niftynei · c313eff5 · Aug 15, 2026 · 2 filesMessage 80 · StrongModerate 60Details
Commit message · niftynei
askrene: exclude stubchannels from routing
My node has some recovered channels, which were causing a crash in askrene, due to the fact that they have duplicate scids.
Easy fix is simply to skip recovered stubs when planning routes.
Changelog-Fixed: Crash when trying to pay and you have recovered channel stubs in your peers list
80/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
Why it was queued
second-pass: broader security terminology
AI analysis · Moderate 60/100
This commit fixes a crash in Core Lightning's routing plugin (askrene) that occurred when a user had 'recovered channel stubs'—placeholder records left behind after restoring a node from a backup. These stubs all share the same placeholder channel ID (1x1x1), which caused an internal table that expects unique IDs to fail an assertion and crash the plugin. The fix makes askrene skip these stubs when planning routes. The crash is triggered by normal user actions (trying to pay with recovered stubs present), not by a remote attacker, and the plugin can be restarted.
rust: don't silently eat overflow errors in --release
When running `nix build .#default -L` I came across two failures:
> failures: > > ---- primitives::test::test_amount_add_overflow stdout ---- > note: test did not panic as expected at cln-rpc/src/primitives.rs:1064:8 > ---- primitives::test::test_amount_sub_overflow stdout ---- > note: test did not panic as expected at cln-rpc/src/primitives.rs:1057:8 > > failures: > primitives::test::test_amount_add_overflow > primitives::test::test_amount_sub_overflow > > test result: FAILED(B. 36 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s
Rather than wrapping silently, we now error.
Changelog-Fixed: rust: Amounts that overflow fail, don't silently ignore in release builds
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
memory safety
AI analysis · Moderate 61/100
This commit fixes a bug in Core Lightning's Rust code where adding or subtracting monetary amounts would silently wrap around to incorrect values in release builds, instead of failing as intended. The fix makes overflow and underflow explicitly cause an error (panic), so bad calculations can't be quietly ignored. This is a security-relevant correctness issue because silently wrong amounts could lead to incorrect balances or payments.
Security candidateconfigure: fallback to using local python when `uv` not presentby niftynei · 548d0a5a · Aug 15, 2026 · 2 filesMessage 85 · StrongInformational 19Details
Commit message · niftynei
configure: fallback to using local python when `uv` not present
Builds on NixOS are failing due to lack of python configuration
We can: fail if not configured and use the local python3 path if/when `uv` doesn't work.
We also add an error when PYTHON isn't configured, and remove the local override for the nix setup (since it should be fixed now).
Changelog-Fixed: nix-builds: correctly set PYTHON in case where `uv` is not present
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 19/100
This commit fixes a build problem on NixOS where the configure script couldn't find a working Python interpreter. It makes the build fall back to the local python3 when the 'uv' tool isn't available, and now errors out clearly if no Python is found. It is a build reliability fix, not a security vulnerability patch.
AI review queuedlightningd: fix crash on invoice_payment_hook_doneby Lagrang3 · f435096d · Aug 13, 2026 · 2 filesMessage 78 · AdequateModerate 66Details
Commit message · Lagrang3
lightningd: fix crash on invoice_payment_hook_done
``` Valgrind error file: valgrind-errors.3449770 ==3449770== Invalid read of size 8 ==3449770== at 0x1B4F4A: htlc_set_fail_ (htlc_set.c:77) ==3449770== by 0x1B59FB: invoice_payment_hooks_done (invoice.c:276) ==3449770== by 0x1EC5DF: hook_done (plugin_hook.c:243) ==3449770== by 0x1EC710: plugin_hook_call_next (plugin_hook.c:343) ==3449770== by 0x1EC90E: plugin_hook_callback (plugin_hook.c:299) ==3449770== by 0x1E6316: plugin_response_handle (plugin.c:692) ==3449770== by 0x1EB443: plugin_read_json (plugin.c:781) ==3449770== by 0x283D01: next_plan (io.c:60) ==3449770== by 0x28418C: do_plan (io.c:422) ==3449770== by 0x284245: io_ready (io.c:439) ==3449770== by 0x285BE3: io_loop (poll.c:471) ==3449770== by 0x1B9A99: io_loop_with_timers (io_loop_with_timers.c:22) ==3449770== Address 0x38 is not stack'd, malloc'd or (recently) free'd ==3449770== { <insert_a_suppression_name_here> Memcheck:Addr8 fun:htlc_set_fail_ fun:invoice_payment_hooks_done fun:hook_done fun:plugin_hook_call_next fun:plugin_hook_callback fun:plugin_response_handle fun:plugin_read_json fun:next_plan fun:do_plan fun:io_ready fun:io_loop fun:io_loop_with_timers }
```
Changelog-Fixed: lightningd: fix crash of lightningd on race condition between delinvoice and a returning invoice_payment hook for fallback onchain settlements
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
Why it was queued
second-pass: broader security terminology
AI analysis · Moderate 66/100
This commit fixes a crash in the Core Lightning node software. The crash happens when an invoice is deleted while a plugin's 'invoice_payment' hook is still processing a payment that came in through an on-chain fallback address. By the time the hook finishes, the internal data structure it expected to use (the HTLC set) had already been cleared, causing the node to read invalid memory and crash. The fix simply checks whether that data still exists before using it.
Drive log_to_files() directly with an entry far larger than any stack buffer, using a plugin which emits one on demand.
Nothing bounds a log entry, so testing this through clnrest is the wrong shape: requests are now capped at 2MiB before any parameter is parsed, so an oversized request is rejected long before it can reach the logger, and a test written that way passes whether or not the daemon is fixed. A plugin can hand us an entry of any size, which is what we actually want to exercise.
(cherry picked from commit 50910c956694006b516b8bca1dbc214f79842772)
78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
second-pass: broader security terminology
AI analysis · Moderate 64/100
This commit adds a test for a previously fixed crash in Core Lightning's logging code. The bug was that log entries could be arbitrarily large, and the daemon used to allocate a stack buffer based on the entry's length, which could exhaust the stack and crash the process. The test uses a plugin to feed the logger an 8 MB entry and checks the node stays alive. The commit itself only adds the test and plugin; it does not contain the actual fix.