EP
← All projectsElements Project

Core Lightning

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

BitcoinLightning NetworkActive incident
Repository coverage

2334 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
103commits · 30 days
223commits · 60 days
710commits · 180 days
1582commits · 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
631Strong · 80–100
1400Adequate · 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 Neuroth1509110074
Analysis record

Published AI watches

Last scanned 5 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.

Lower-prioritylightningd: split scid application out of depthcb_update_scidby cdecker · fdcb27ff · Aug 13, 2026 · 2 filesMessage 73 · AdequateTriage 0Details
Commit message · cdecker

lightningd: split scid application out of depthcb_update_scid

depthcb_update_scid() does two things: turn a txlocator into a scid, and
apply that scid to the channel. The dual-funding open path needs the
second half on its own, driven from a scid it worked out earlier, so
pull it out into channel_apply_scid().

No behaviour change.

Changelog-None

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-prioritylightningd: check rpc name collisions with builtin commandsby Lagrang3 · 0787deb9 · Aug 13, 2026 · 4 filesMessage 78 · AdequateTriage 0Details
Commit message · Lagrang3

lightningd: check rpc name collisions with builtin commands

We crashed if the name collision happened to be a builtin command.

```
lightningd: FATAL SIGNAL 11 (version v26.06-241-gb35b848-modded)
0x5573cd532b2c send_backtrace
common/daemon.c:38
0x5573cd532bb6 crashdump
common/daemon.c:83
0x7fe1fd4ccdef ???
./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
0x5573cd4d51a4 plugin_rpcmethod_add
lightningd/plugin.c:1396
0x5573cd4d5268 plugin_rpcmethods_add
lightningd/plugin.c:1423
0x5573cd4d57ef plugin_parse_getmanifest_response
lightningd/plugin.c:1805
0x5573cd4d68db plugin_manifest_cb
lightningd/plugin.c:1827
0x5573cd4d2316 plugin_response_handle
lightningd/plugin.c:692
0x5573cd4d7443 plugin_read_json
lightningd/plugin.c:781
0x5573cd56fd01 next_plan
ccan/ccan/io/io.c:60
0x5573cd57018c do_plan
ccan/ccan/io/io.c:422
0x5573cd570245 io_ready
ccan/ccan/io/io.c:439
0x5573cd571be3 io_loop
ccan/ccan/io/poll.c:471
0x5573cd4a5a99 io_loop_with_timers
lightningd/io_loop_with_timers.c:22
0x5573cd4d61d1 plugins_init
lightningd/plugin.c:2063
0x5573cd4aad6c main
lightningd/lightningd.c:1269
0x7fe1fd4b6ca7 __libc_start_call_main
../sysdeps/nptl/libc_start_call_main.h:58
0x7fe1fd4b6d64 __libc_start_main_impl
../csu/libc-start.c:360
0x5573cd47a120 ???
_start+0x20:0
0xffffffffffffffff ???
???:0
```

Changelog-Fixed: lightningd: checks for rpc name collisions with builtin commands when registering plugin RPC methods

Reported-by: Vincenzo Palazzo (Bitcoin Security Council finding 2026-08-11)

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

Lower-priorityoffers: fix recurrence proportional amountby Lagrang3 · c2ba2358 · Aug 13, 2026 · 1 fileMessage 73 · AdequateTriage 0Details
Commit message · Lagrang3

offers: fix recurrence proportional amount

Reported-by: Vincenzo Palazzo (Bitcoin Security Council finding 2026-08-11)

Changelog-Fixed: offers: recurrence with proportional_amount now computes the correct invoice amount based on the time remaining

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>

73/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
Lower-priorityaskrene: properly handle invalid "inform" fieldby Lagrang3 · 245f3540 · Aug 13, 2026 · 2 filesMessage 73 · AdequateTriage 0Details
Commit message · Lagrang3

askrene: properly handle invalid "inform" field

Changelog-Fixed: askrene: askrene-inform-channel properly handle invalid "inform" field

Reported-by: Vincenzo Palazzo (Bitcoin Security Council finding 2026-08-11)

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>

73/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
Security candidatelightningd: check value overflow for forward amountsby Lagrang3 · 96f026ec · Aug 13, 2026 · 2 filesMessage 90 · StrongHigh 72Details
Commit message · Lagrang3

lightningd: check value overflow for forward amounts

Blinded paths encrypted_recipient_data payment_relay fee_proportional_millionths
is a 32 bit unsigned integer. We convert to 64 bits before doing arithmetic
operations to avoid integer overflow.

**BROKEN** lightningd: FATAL SIGNAL 8 (version v26.06-197-g8c42be3-modded)
**BROKEN** lightningd: backtrace: common/daemon.c:46 (send_backtrace) 0x556ac0a6be39
**BROKEN** lightningd: backtrace: common/daemon.c:83 (crashdump) 0x556ac0a6be76
**BROKEN** lightningd: backtrace: ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0 ((null)) 0x7f9c98a31def
**BROKEN** lightningd: backtrace: common/onion_decode.c:61 (ceil_div) 0x556ac0a7835d
**BROKEN** lightningd: backtrace: common/onion_decode.c:122 (handle_blinded_forward) 0x556ac0a784c4
**BROKEN** lightningd: backtrace: common/onion_decode.c:355 (onion_decode) 0x556ac0a78c39
**BROKEN** lightningd: backtrace: lightningd/peer_htlcs.c:1548 (peer_accepted_htlc) 0x556ac0a087fa
**BROKEN** lightningd: backtrace: lightningd/peer_htlcs.c:2648 (peer_got_revoke) 0x556ac0a09e25
**BROKEN** lightningd: backtrace: lightningd/channel_control.c:1624 (channel_msg) 0x556ac09c3e11
**BROKEN** lightningd: backtrace: lightningd/subd.c:562 (sd_msg_read) 0x556ac0a16e2e
**BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:60 (next_plan) 0x556ac0aa8fc1
**BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:422 (do_plan) 0x556ac0aa944c
**BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:439 (io_ready) 0x556ac0aa9505
**BROKEN** lightningd: backtrace: ccan/ccan/io/poll.c:471 (io_loop) 0x556ac0aaaea3
**BROKEN** lightningd: backtrace: lightningd/io_loop_with_timers.c:22 (io_loop_with_timers) 0x556ac09dea99
**BROKEN** lightningd: backtrace: lightningd/lightningd.c:1518 (main) 0x556ac09e43f7
**BROKEN** lightningd: backtrace: ../sysdeps/nptl/libc_start_call_main.h:58 (__libc_start_call_main) 0x7f9c98a1bca7
**BROKEN** lightningd: backtrace: ../csu/libc-start.c:360 (__libc_start_main_impl) 0x7f9c98a1bd64
**BROKEN** lightningd: backtrace: (null):0 ((null)) 0x556ac09b3120
**BROKEN** lightningd: backtrace: (null):0 ((null)) 0xffffffffffffffff

Changelog-Fixed: lightningd: guard for arithmetic operation overflow on onion message request for forward a payment through a blinded path

Reported-by: Vincenzo Palazzo (Bitcoin Security Council finding 2026-08-11)

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>

90/100 · StrongMessage clarity
✓ Specific, 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 safetyparser or protocol path
AI analysis · High 72/100

This commit fixes a crash bug in Core Lightning's payment forwarding code. When processing a hidden (blinded) payment route, the node reads a fee rate from encrypted data. That fee rate is a 32-bit unsigned integer. The old code added it to 1,000,000 using 32-bit arithmetic, so a maliciously large fee rate could wrap around to a tiny value, causing a division-by-zero or other bad arithmetic that crashed the lightningd daemon with a fatal signal. The fix forces the addition to be done in 64-bit arithmetic, preventing the wraparound. The commit also adds tests showing how a crafted blinded path can trigger the issue.

Security candidatelightningd: don't return io logs from getlogby Níckolas Goline · 38fa7e2a · Aug 13, 2026 · 8 filesMessage 68 · AdequateModerate 62Details
Commit message · Níckolas Goline

lightningd: don't return io logs from getlog

The io level of the log book holds the raw JSON-RPC and plugin traffic,
which can contain secrets such as runes, and getlog returns the whole
log book to its caller. Refuse level=io there: io logging remains
available in the log file, via --log-level=io.

Changelog-Changed: JSON-RPC: `getlog` no longer accepts `level=io`; io logs are only available in the log file (`--log-level=io`).
(cherry picked from commit e05c572fa3a921f85899bdf61bad68557386c824)

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
access control
AI analysis · Moderate 62/100

This commit fixes a security issue in Core Lightning's `getlog` JSON-RPC command. Previously, `getlog` could return 'io' level logs, which contain raw JSON-RPC and plugin traffic including secrets like authentication runes. Now `getlog` refuses to return io logs, keeping them only in local log files for users who explicitly enable them. This prevents a caller with RPC access from extracting sensitive secrets through the log command.

Lower-prioritytests: check getlog does not return io logsby Níckolas Goline · 04b0729b · Aug 13, 2026 · 1 fileMessage 78 · AdequateTriage 0Details
Commit message · Níckolas Goline

tests: check getlog does not return io logs

The io level of the log book holds raw JSON-RPC and plugin traffic,
which can contain secrets such as runes. Marked xfail until the next
commit.

(cherry picked from commit 03be4d7764fd1316f8d335262a34d77ba57f023c)

78/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Lower-prioritytests: add clnrest test for large request bodiesby daywalker90 · 344f4371 · Aug 12, 2026 · 1 fileMessage 70 · AdequateTriage 0Details
Commit message · daywalker90

tests: add clnrest test for large request bodies

Changelog-None

(cherry picked from commit 23e98db66b6f8fd8538d78363d0be39429a6b2b8)

70/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Mentions testing or verification
AI review queuedclnrest: restrict maximum size of request bodies to 2MiBby daywalker90 · 804b9df8 · Aug 12, 2026 · 4 filesMessage 73 · AdequateHigh 74Details
Commit message · daywalker90

clnrest: restrict maximum size of request bodies to 2MiB

Changelog-Fixed: clnrest: an unauthenticated user could crash the node with a large request body; bodies are now capped at 2MiB.
(cherry picked from commit d5c2f6dbf1b7a54679b97d2a71015ad45443baf8)

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
second-pass: broader security terminology
AI analysis · High 74/100

This update fixes a bug in Core Lightning's built-in REST plugin (clnrest). Before the fix, anyone on the network could send a very large request to the REST API without logging in, causing the node to crash. The patch now refuses bodies larger than 2 MB and returns an error instead of trying to read unlimited data.

Security candidatelightningd: don't allocate huge log entries on the stackby Vincenzo Palazzo · 6556f16d · Aug 12, 2026 · 1 fileMessage 78 · AdequateHigh 76Details
Commit message · Vincenzo Palazzo

lightningd: don't allocate huge log entries on the stack

log_to_files() sized a stack VLA by the log string's length. Callers
can log attacker-controlled strings of arbitrary size - e.g. clnrest
logging unauthenticated request parameters on rune failure - so a
single ~10MB HTTP request overflowed the stack and crashed lightningd
(SIGSEGV).

Use a fixed 1kB stack buffer for normal entries and a heap allocation
for oversized ones.

Changelog-Fixed: lightningd: logging a very large message no longer crashes the node (stack overflow).

Reported-by: Vincenzo Palazzo (Bitcoin Security Council finding 2026-08-10)
(cherry picked from commit cc90f6b63da7a1ea9ea0b8276a96980dd2ed7496)

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
explicit security languagememory safety
AI analysis · High 76/100

This fix prevents a crash in Core Lightning's logging code. Previously, when the program wrote a log message, it reserved space on the stack based on the message's length. Because some logged text comes from outside sources (for example, unauthenticated web requests to the clnrest plugin), an attacker could send a very large request and cause the program to overflow its stack, crashing the node. The patch now uses a small fixed stack buffer for ordinary messages and switches to a heap allocation only when a message is unusually large.

Lower-prioritycommon: ignore DNS address descriptors which are not hostnamesby Níckolas Goline · 9ffa5881 · Aug 11, 2026 · 2 filesMessage 73 · AdequateTriage 0Details
Commit message · Níckolas Goline

common: ignore DNS address descriptors which are not hostnames

fromwire_wireaddr() accepted any bytes at all as an ADDR_TYPE_DNS address,
so a node_announcement could put arbitrary content into log messages,
listnodes output and outgoing connect attempts. is_dnsaddr() already
encodes the rules; apply it, and ignore the descriptor when it fails, the
same way we already ignore a descriptor with a zero port.

Changelog-Changed: gossipd: DNS addresses in a node_announcement which are not valid hostnames are now ignored.
(cherry picked from commit 9574eaa55d46f791e9bdf1108219f760d412dc9e)

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI review queuedconnectd: bound the SOCKS5 request hostname to the request bufferby Níckolas Goline · 10b7961b · Aug 11, 2026 · 2 filesMessage 73 · AdequateHigh 73Details
Commit message · Níckolas Goline

connectd: bound the SOCKS5 request hostname to the request buffer

The SOCKS5 CONNECT request is built into a fixed 255-byte buffer, but a
domain-name request needs 7 + strlen(host) bytes and the host length was
never checked. A host longer than 248 bytes overran the buffer while the
request was assembled, corrupting the adjacent length field, which was then
used as the io_write() length and produced a large out-of-bounds read: the
proxy socket received connectd's heap instead of the request, and connectd
died. The host reaches this both from a proxied connect and from a gossiped
DNS address.

Size the buffer to hold the largest legal request (header plus a
maximum-length domain name), and refuse a hostname which still does not fit
rather than building a request we cannot represent. Truncating the host is
not an option: that is a connection to the wrong destination.

Changelog-Fixed: connectd: a proxied connection to a very long hostname (including a gossiped DNS address) could crash the node.
(cherry picked from commit 04ca809936794de47943951b9d116d9fd1ea1844)

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
second-pass: broader security terminology
AI analysis · High 73/100

This update fixes a bug in Core Lightning's Tor/proxy connection code. When the node tried to connect through a SOCKS5 proxy to a hostname longer than 248 characters, it wrote past the end of a small fixed buffer. That corrupted the recorded message length, causing the proxy to be sent random data from the program's memory and crashing the node. The fix enlarges the buffer to the legal maximum and rejects hostnames that are still too long instead of overflowing.

Lower-prioritypytest: check the SOCKS5 request for a maximum-length hostnameby Níckolas Goline · 59aff734 · Aug 11, 2026 · 1 fileMessage 83 · StrongTriage 0Details
Commit message · Níckolas Goline

pytest: check the SOCKS5 request for a maximum-length hostname

connectd assembles the SOCKS5 CONNECT request in a fixed buffer, but never
checks that the hostname fits it. Add a test that a maximum-length proxied
hostname produces exactly the request it should, with connectd still alive
afterwards.

Changelog-None

(cherry picked from commit 6ecead49248408172489e3b77c34b44994b25414)

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Lower-prioritylightningd: restart onchaind when a watched tx is reorged outby Níckolas Goline · e57502db · Aug 11, 2026 · 2 filesMessage 73 · AdequateTriage 0Details
Commit message · Níckolas Goline

lightningd: restart onchaind when a watched tx is reorged out

onchain_tx_watched() kills the owner on a zero-depth callback, which frees
onchaind and every watch parented to it, assuming something will restart it.
Nothing does: onchaind_funding_spent() is the only launch site, and the funding
outpoint watch doesn't fire again when the reorg removed a descendant of the
commitment rather than the commitment itself. So the channel is unwatched
until the next restart: no new claim is proposed, no spend of a remaining
output is seen, and it's never resolved.

Reuse the startup replay path, deferred out of the watch callback since we
can't add watches while the txwatch table is being iterated.

Changelog-Fixed: lightningd: restart `onchaind` after a reorg of a transaction it was watching, instead of leaving the channel unmonitored until restart.
(cherry picked from commit 18de31a0d7cd2dd4880c206da9af36ae97ec2567)

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-prioritypytest: onchaind must come back after a reorg of a tx it was watchingby Níckolas Goline · b76f67eb · Aug 11, 2026 · 1 fileMessage 83 · StrongTriage 0Details
Commit message · Níckolas Goline

pytest: onchaind must come back after a reorg of a tx it was watching

A zero-depth callback frees onchaind and every watch parented to it, and
nothing restarts it unless lightningd itself restarts. Also test the
commitment tx reorg, which is handled correctly today and must stay that way.

Changelog-None

(cherry picked from commit 2c019958f3e84a805b65711f24c40a61ea8ba8b0)

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
AI review queuedcommon: treat a reorged close output as csv-lockedby cdecker · 9d0c1d49 · Aug 11, 2026 · 2 filesMessage 85 · StrongModerate 60Details
Commit message · cdecker

common: treat a reorged close output as csv-locked

If, during a run of CLN, a close gets confirmed, its outputs are added
to the wallet. If then the close is reorged out, i.e., it loses its
confirmation, using it in this inconsistent state, can cause a crash,
due to a derefence on the confirmation height which is unset.

Changelog-Fixed: wallet: Addressed a crash when attempting to spend a previously confirmed but reorged out close transaction output.
(cherry picked from commit 4c078a0e61c8eea7ec3549c71688808dcfe479f0)

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 or wallet pathsecond-pass: broader security terminologysecond-pass: security-sensitive path
AI analysis · Moderate 60/100

This update fixes a crash in Core Lightning's wallet. If a channel-closing transaction had been confirmed and then a blockchain reorganization removed that confirmation, the wallet could try to spend the output while its confirmation height was missing. That led to a null-pointer crash. The fix treats such outputs as still time-locked so they are not spent until re-confirmed.

Lower-prioritylightningd: let an onchain preimage beat an unfinished outgoing failureby Níckolas Goline · 254daf0e · Aug 11, 2026 · 1 fileMessage 81 · StrongTriage 0Details
Commit message · Níckolas Goline

lightningd: let an onchain preimage beat an unfinished outgoing failure

onchain_fulfilled_htlc() skipped any outgoing HTLC with failmsg or
failonion set. Those get set at RCVD_REMOVE_COMMIT, but remove_htlc_out()
doesn't free the htlc_out until RCVD_REMOVE_ACK_REVOCATION: until then the
removal isn't final and the HTLC can still be in a commitment, so BOLT #2
says the preimage wins.

Only skip if we already failed the incoming HTLC, which is the case this
check was written for, and clear the failure before recording the preimage,
since htlc_out_check() doesn't allow both.

Changelog-Fixed: lightningd: fulfill the incoming HTLC when we learn the preimage onchain, even if the outgoing HTLC had an unfinished failure.
(cherry picked from commit ce9b9c6b77bda95832bae0e283adcde79c8744e8)

81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
AI review queuedonchaind: Close a racy onchain resolutionby cdecker · faf8fa84 · Aug 11, 2026 · 1 fileMessage 85 · StrongModerate 57Details
Commit message · cdecker

onchaind: Close a racy onchain resolution

Upon timing out an upstream incoming HTLC, we were setting the
resolution to be ignored, since the funds will presumably be returned
to the peer, not us. However, since the HTLC timeout and the internal
resolution do not line up perfectly, due to the security margin, there
is a chance for a late preimage coming in, resolving the HTLC in the
other direction, i.e., we now own it. If that resolution comes in
after we have internally marked the output as ignored, we would not
clean up our prior decision, leaving the HTLC stranded, but
recoverable.

This just ensures that we clear our internal resolution too, when the
downstream preimage comes in, so that we can use the preimage to grab
the funds in the HTLC.

Changelog-Fixed: onchaind: Fixed a race between preimage return from downstream to upstream

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
second-pass: broader security terminology
AI analysis · Moderate 57/100

This fix addresses a timing bug in Core Lightning's on-chain dispute handler. When a payment hash preimage arrives late from a downstream peer, the software could have already marked the related funds as 'ignored' because the upstream timeout had passed. The old code stopped processing once it saw an existing resolution, leaving the funds stuck. The fix clears the prior 'ignored' resolution so the late preimage can still be used to claim the funds. It is a recoverable race condition, not a direct theft of funds, but it could delay or complicate recovery of HTLC funds during on-chain settlement.

Lower-priorityhsmd: return io_close when the handler reports an errorby Sangbida Chaudhuri · 270d3acf · Aug 11, 2026 · 2 filesMessage 73 · AdequateTriage 0Details
Commit message · Sangbida Chaudhuri

hsmd: return io_close when the handler reports an error

When libhsmd rejects a request it returns NULL; close the client then,
instead of from hsmd_status_bad_request. Share the report path in
report_bad_req so it cannot drift from bad_req_fmt.

Changelog-Fixed: print the commitment index in "bad commit secret" instead of a stack address
(cherry picked from commit 869bd4da44df842d5f54e0370e95bffa7cf5a8b4)

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-prioritytests: fixe test_multichan_stress flakeby daywalker90 · 7faac86f · Aug 11, 2026 · 1 fileMessage 68 · AdequateTriage 0Details
Commit message · daywalker90

tests: fixe test_multichan_stress flake

```
def send_many_payments():
passes = 0
fails = 0
# Make sure we try many times, and get at least one pass and fail.
while passes == 0 or fails == 0 or passes + fails < 30:
inv = l3.rpc.invoice(100, "label-" + str(passes + fails), "desc")
l1.rpc.sendpay(route, inv['payment_hash'], payment_secret=inv['payment_secret'])
time.sleep(0.05)
try:
l1.rpc.waitsendpay(inv['payment_hash'])
passes += 1
except RpcError:
fails += 1
pass

# Send a heap of payments, while reconnecting...
fut = executor.submit(send_many_payments)

for _ in range(30):
l3.rpc.disconnect(l2.info['id'], force=True)
time.sleep(0.1)
l3.rpc.connect(l2.info['id'], 'localhost', l2.port)
> fut.result(TIMEOUT)
```

The while loop would somtimes go infinitely long if no payments fail.

Changelog-None

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Mentions testing or verification
Lower-prioritytests: fix test_bwatch_spk_watch_reorg_demotes_outputs flakeby daywalker90 · d1603a02 · Aug 11, 2026 · 1 fileMessage 73 · AdequateTriage 8Details
Commit message · daywalker90

tests: fix test_bwatch_spk_watch_reorg_demotes_outputs flake

We need to wait for bwatch to see the deposit block or it won't see a
reorg.

```
assert l1.db_query('SELECT COUNT(*) AS c FROM outputs')[0]['c'] == 1

# Reorg the deposit block away. Deprioritize the returned mempool tx
# (same trick as simple_reorg) so the replacement blocks don't just
# re-confirm it.
bitcoind.rpc.invalidateblock(bitcoind.rpc.getblockhash(deposit_height))
memp = bitcoind.rpc.getrawmempool()
assert txid in memp
for t in memp:
bitcoind.rpc.prioritisetransaction(t, None, -1000000)
bitcoind.generate_block(2)

> l1.daemon.wait_for_log(r'Reorg detected', timeout=60)
```

Changelog-None

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
defensive validation
AI review queuedlightningd: handle amountless invoices in the onchain payment checkby Níckolas Goline · f818385d · Aug 11, 2026 · 2 filesMessage 73 · AdequateModerate 69Details
Commit message · Níckolas Goline

lightningd: handle amountless invoices in the onchain payment check

invoice_check_onchain_payment() compared the received amount against
*details->msat, which is NULL when the invoice was created with
amount_msat="any":

FATAL SIGNAL 11
backtrace: lightningd/invoice.c:971 (invoice_check_onchain_payment)
backtrace: lightningd/chaintopology.c:84 (filter_block_txs)
backtrace: lightningd/chaintopology.c:1020 (add_tip)
backtrace: lightningd/chaintopology.c:1117 (get_new_block)

The HTLC path already checks this; do the same onchain, where an
amountless invoice likewise accepts any amount.

Changelog-Fixed: lightningd: crash when an onchain payment arrived for the fallback address of an invoice created with amount_msat="any".
(cherry picked from commit 6d025a3dab76ec5380474b2a8065c48aec309f33)

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
second-pass: broader security terminology
AI analysis · Moderate 69/100

This fix repairs a crash in Core Lightning's invoice handling. When someone paid the on-chain fallback address of an invoice that accepted 'any' amount, the software dereferenced a NULL pointer and died with a fatal signal (segmentation fault). The patch simply skips the amount comparison when no specific amount was set, matching the behavior already used for regular Lightning payments.

Lower-prioritypytest: onchain payment to an amountless invoice's fallback addressby Níckolas Goline · 50dd3be7 · Aug 11, 2026 · 1 fileMessage 73 · AdequateTriage 0Details
Commit message · Níckolas Goline

pytest: onchain payment to an amountless invoice's fallback address

invoice() attaches a fallback address whatever the amount, so "any"
invoices get one too. details->msat is NULL for those, and we never
covered that case.

Changelog-None

(cherry picked from commit c5e8064ca3eb5000d9030dd96391fa20c9763c8b)

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Lower-prioritypyln-testing: give btcproxy a port and choose better portsby daywalker90 · f80895ba · Aug 10, 2026 · 2 filesMessage 83 · StrongTriage 0Details
Commit message · daywalker90

pyln-testing: give btcproxy a port and choose better ports

btcproxy was using port 0 by default without going through our port
reservation logic, so it may have caused "Address already in use"
issues. It was also binding to 0.0.0.0, so on all addresses. For the
port reservations to work we use 127.0.0.1 here too.

We choose from outside the source-port range of ports in hopes of
avoiding more port bind race conditions.

Changelog-None

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification