EP
← All projectsElements Project

Core Lightning

Modular C implementation of the Lightning Network protocol and node stack.

BitcoinLightning NetworkActive incident
Repository coverage

2330 commits in the local evidence base

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.

228security candidates319second-pass queue1977AI analyses
99commits · 30 days
229commits · 60 days
709commits · 180 days
1578commits · 365 days
Backfill bands
Aug 5 → Feb 61049 seen37 candidatesComplete
Feb 6 → Jun 6579 seen10 candidatesComplete
Jun 6 → Jul 678 seen1 candidatesComplete
Jul 6 → Aug 5147 seen16 candidatesComplete
Commit communication

Does the history explain itself?

Message quality measures whether a commit identifies its scope, purpose, rationale, testing, and supporting references. It does not change the security-severity score.

71/100 average clarity
628Strong · 80–100
1399Adequate · 60–79
272Thin · 40–59
31Opaque · 0–39
Read the scoring rubric →
Developer activity

Who is changing the project?

Public Git author strings; identities are not independently verified.

DeveloperCommitsCandidatesAnalyzedHigh riskMessage avg.
cdecker331217581
daywalker9019315113471
Níckolas Goline961252376
Amperstrand322278
Rusty Russell96977961173
Sangbida Chaudhuri18537157167
Vincenzo Palazzo19714185
Lagrang3115679170
dovgopoly18016165
Dusty Daemon821378066
ShahanaFarooqui931093063
Peter Neuroth1469110074
Analysis record

Published AI watches

Last scanned 55 minutes ago

Informational 15 AI analysisMessage 85 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

doc: bring lightning-downgrade's version list up to v26.12.

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.

2e7a9f5aby Ken Sedgwick+9−12 files
No security note in commit
Informational 23 AI analysisMessage 66 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

Makefile: install lightning-downgrade.

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…

06ea9ba0by Ken Sedgwick+1−01 file
No security note in commit
Low 27 AI analysisMessage 83 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

wallet: create bwatch tables before backfilling them

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
ce2a6836by daywalker90+105−02 files
No security note in commit
Informational 15 AI analysisMessage 5 · Opaque
EP Elements ProjectCore Lightning BitcoinLightning Network

v26.12rc1

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…

4002c4e9by Níckolas Goline+164−1110 files
No security note in commit
Low 30 AI analysisMessage 68 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

wallet: store payment failure details per groupid

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
24082c6dby daywalker90+6−34 files
No security note in commit
Low 43 AI analysisMessage 83 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

cln-plugin: do not panic when the log writer task is gone

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
8661ffabby cdecker+29−11 file
No security note in commit
Informational 15 AI analysisMessage 90 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

docs: explain hsmtool HTLC recovery

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…

f90c140dby Sangbida Chaudhuri+85−01 file
No security note in commit
Informational 15 AI analysisMessage 68 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

tests: make test_delpay_works deterministic

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.

a224ca81by daywalker90+16−161 file
No security note in commit
Informational 20 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

doc: say that listtransactions gives blockheight 0 for a tx not in a block

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…

bc281be3by Peter Neuroth+4−42 files
No security note in commit
Informational 20 AI analysisMessage 50 · Thin
EP Elements ProjectCore Lightning BitcoinLightning Network

fixup! pyln-client: don't crash Millisatoshi.to_approx_str() on zero

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
02612ed5by Amartya Singh+4−31 file
No security note in commit
Moderate 62 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

wallet: reject unmodifiable PSBTs in addpsbtoutput/addpsbtinput

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
42472816by daywalker90+14−12 files
Vendor flagged security relevance
Moderate 59 AI analysisMessage 83 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

tests: show addpsbtoutput/addpsbtinput crash on an unmodifiable v2 PSBT

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
42e268abby daywalker90+60−01 file
No security note in commit
Informational 20 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

pyln-client: don't crash Millisatoshi.to_approx_str() on zero

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 …

5ebe365dby Amartya Singh+3−12 files
No security note in commit
Moderate 59 AI analysisMessage 83 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

dualopen and splicing: add minimal verification of tx_signatures

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
c6be4f71by Lagrang3+633−97 files
Vendor flagged security relevance
Moderate 54 AI analysisMessage 85 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

channeld: abort_channels no longer fails a channel with a signed splice

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
c87f5573by Andezion+22−11 file
No security note in commit
Moderate 51 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

lightningd: fix crash on mutual close of an unconfirmed dual-funded channel

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
555143beby Sangbida Chaudhuri+9−31 file
Vendor flagged security relevance
High 74 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

cln-grpc: reject malformed request values instead of panicking

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
b2703436by daywalker90+1558−12135 files
Vendor flagged security relevance
Informational 15 AI analysisMessage 51 · Thin
EP Elements ProjectCore Lightning BitcoinLightning Network

nix: drop protobuf again

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…

a0459eeeby Peter Neuroth+0−11 file
No security note in commit
Informational 15 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

make: check gRPC protos for breaking changes against the last release

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…

db5fea70by daywalker90+43−84 files
No security note in commit
Repository ledger

Explore captured commits

Expand any commit for its author, full message, clarity score, changed files, triage signals, analysis, and source link.

Security candidatelightningd: tidy dualopen_errmsg's forget-channel pathsby Sangbida Chaudhuri · b34d6cc4 · Aug 31, 2026 · 1 fileMessage 81 · StrongLow 42Details
Commit message · Sangbida Chaudhuri

lightningd: tidy dualopen_errmsg's forget-channel paths

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.

Security candidateCargo.lock: update dependenciesby daywalker90 · c1551c55 · Aug 24, 2026 · 1 fileMessage 58 · ThinLow 25Details
Commit message · daywalker90

Cargo.lock: update dependencies

```
cargo update
Updating crates.io index
Locking 87 packages to latest Rust 1.85.0 compatible versions
Updating aho-corasick v1.1.4 -> v1.1.5
Updating android_system_properties v0.1.5 -> v0.1.6
Updating anyhow v1.0.103 -> v1.0.104
Updating async-trait v0.1.89 -> v0.1.92
Updating bitcoin v0.32.101 -> v0.32.102
Updating bitcoin-consensus-encoding v1.0.0 -> v1.2.0
Updating bitcoin-internals v0.5.0 -> v0.6.0
Updating bitflags v2.13.0 -> v2.13.1
Updating cc v1.2.67 -> v1.4.4
Updating crc32fast v1.5.0 -> v1.5.1
Updating data-encoding v2.11.0 -> v2.11.1
Updating displaydoc v0.2.6 -> v0.2.7
Updating dnssec-prover v0.6.8 -> v0.6.9
Updating either v1.16.0 -> v1.18.0
Updating fastrand v2.4.1 -> v2.5.0
Updating find-msvc-tools v0.1.9 -> v0.1.11
Updating futures v0.3.32 -> v0.3.34
Updating futures-channel v0.3.32 -> v0.3.34
Updating futures-core v0.3.32 -> v0.3.34
Updating futures-executor v0.3.32 -> v0.3.34
Updating futures-io v0.3.32 -> v0.3.34
Updating futures-macro v0.3.32 -> v0.3.34
Updating futures-sink v0.3.32 -> v0.3.34
Updating futures-task v0.3.32 -> v0.3.34
Updating futures-util v0.3.32 -> v0.3.34
Updating h2 v0.4.15 -> v0.4.18
Updating hex-conservative v0.3.2 -> v1.2.0
Updating http v1.4.2 -> v1.5.0
Updating http-body v1.0.1 -> v1.1.0
Updating http-body-util v0.1.3 -> v0.1.5
Updating hybrid-array v0.4.13 -> v0.4.14
Updating hyper v1.10.1 -> v1.11.0
Updating ipnet v2.12.0 -> v2.12.1
Updating jiff v0.2.32 -> v0.2.35
Adding jiff-core v0.1.0
Updating jiff-static v0.2.32 -> v0.2.35
Updating js-sys v0.3.103 -> v0.3.104
Updating libc v0.2.186 -> v0.2.189
Updating lightning v0.1.11 -> v0.1.12
Updating lightning-types v0.2.1 -> v0.2.12
Updating litemap v0.8.2 -> v0.8.3
Updating log v0.4.33 -> v0.4.34
Updating mio v1.2.1 -> v1.2.2
Updating num-integer v0.1.46 -> v0.1.47
Updating portable-atomic v1.13.1 -> v1.15.0
Updating potential_utf v0.1.5 -> v0.1.6
Updating proc-macro2 v1.0.106 -> v1.0.107
Updating pulldown-cmark-to-cmark v22.0.0 -> v22.0.1
Updating quote v1.0.46 -> v1.0.47
Updating regex v1.13.0 -> v1.13.1
Updating regex-automata v0.4.15 -> v0.4.18
Updating rustls v0.23.41 -> v0.23.43
Updating rustls-pki-types v1.15.0 -> v1.15.1
Updating rustls-webpki v0.103.13 -> v0.103.15
Updating serde v1.0.228 -> v1.0.229
Updating serde_core v1.0.228 -> v1.0.229
Updating serde_derive v1.0.228 -> v1.0.229
Updating serde_json v1.0.150 -> v1.0.151
Updating serde_qs v1.1.2 -> v1.1.3
Updating simd-adler32 v0.3.9 -> v0.3.10
Updating simd_cesu8 v1.1.1 -> v1.2.0
Updating socket2 v0.6.4 -> v0.6.5
Removing syn v2.0.118
Adding syn v2.0.119
Adding syn v3.0.4
Updating thiserror v2.0.18 -> v2.0.20
Updating thiserror-impl v2.0.18 -> v2.0.20
Updating tinystr v0.8.3 -> v0.8.4
Updating tokio v1.52.3 -> v1.53.1
Updating tokio-macros v2.7.0 -> v2.7.2
Updating tokio-stream v0.1.18 -> v0.1.19
Updating tokio-util v0.7.18 -> v0.7.19
Updating wasm-bindgen v0.2.126 -> v0.2.127
Updating wasm-bindgen-futures v0.4.76 -> v0.4.77
Updating wasm-bindgen-macro v0.2.126 -> v0.2.127
Updating wasm-bindgen-macro-support v0.2.126 -> v0.2.127
Updating wasm-bindgen-shared v0.2.126 -> v0.2.127
Updating web-sys v0.3.103 -> v0.3.104
Updating webpki-root-certs v1.0.8 -> v1.0.9
Updating webpki-roots v1.0.8 -> v1.0.9
Updating writeable v0.6.3 -> v0.6.4
Updating zerocopy v0.8.54 -> v0.8.56
Updating zerocopy-derive v0.8.54 -> v0.8.56
Updating zerotrie v0.2.4 -> v0.2.5
Updating zerovec v0.11.6 -> v0.11.8
Updating zerovec-derive v0.11.3 -> v0.11.6
Updating zlib-rs v0.6.6 -> v0.6.7
Updating zmij v1.0.22 -> v1.0.23
```

Changelog-None

58/100 · ThinMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context
Why it was queued
access control
AI analysis · Low 25/100

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.

Security candidatecommon: bound JSON nesting depth when parsingby Níckolas Goline · 83f92e4b · Aug 20, 2026 · 2 filesMessage 85 · StrongHigh 80Details
Commit message · Níckolas Goline

common: bound JSON nesting depth when parsing

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.

Security candidatewallet: exclude immature coinbase outputs from fee rescue selectionby cdecker · 34883ff7 · Aug 18, 2026 · 2 filesMessage 73 · AdequateModerate 60Details
Commit message · cdecker

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.

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 · 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.

Security candidatetests: regression coverage for out-of-range feeratesby cdecker · 65bdbc47 · Aug 17, 2026 · 2 filesMessage 100 · StrongHigh 72Details
Commit message · cdecker

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.

Security candidatewallet: clamp absurd inflight funding feerates on upgradeby cdecker · f057c692 · Aug 17, 2026 · 1 fileMessage 86 · StrongModerate 53Details
Commit message · cdecker

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.

Aug 15 16:34:14 citrine lightningd[1976574]: cln-askrene: ./plugins/askrene/child/additional_costs.h:26: additional_cost_htable_add: Assertion `!additional_c ost_htable_getmatch_(ht, k, h, v, &i)' failed.

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.

Security candidaterust: don't silently eat overflow errors in --releaseby niftynei · bba8fc55 · Aug 15, 2026 · 1 fileMessage 88 · StrongModerate 61Details
Commit message · niftynei

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

> PYTHONPATH=contrib/msggen contrib/msggen/msggen/__main__.py bundle doc/schemas
> /nix/store/rlq03x4cwf8zn73hxaxnx0zn5q9kifls-bash-5.3p3/bin/bash: line 1: contrib/msggen/msggen/__main__.py: Permission denied
> make: *** [contrib/msggen/Makefile:15: contrib/msggen/msggen/schema.json] Error 126

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

Reported-by: Vincenzo Palazzo (Bitcoin Security Council finding 2026-08-11)
Co-Authored-By: Grok 4.5
Signed-off-by: Lagrang3 <lagrang3@protonmail.com>

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
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.

AI review queuedtests: huge log entries don't crash lightningdby daywalker90 · 7a05b8fa · Aug 13, 2026 · 2 filesMessage 78 · AdequateModerate 64Details
Commit message · daywalker90

tests: huge log entries don't crash lightningd

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.