EP
← All projectsElements Project

Core Lightning

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

BitcoinLightning NetworkActive incident
Repository coverage

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

184security candidates280second-pass queue1894AI analyses
56commits · 30 days
192commits · 60 days
678commits · 180 days
1671commits · 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.

70/100 average clarity
489Strong · 80–100
1231Adequate · 60–79
259Thin · 40–59
30Opaque · 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.
cdecker14910384
Níckolas Goline63844277
Rusty Russell96475958172
daywalker90118895165
Lagrang386578170
Vincenzo Palazzo13411182
dovgopoly15015164
Sangbida Chaudhuri14931146066
Dusty Daemon821378066
ShahanaFarooqui931093063
Peter Neuroth1024101071
Christian Decker36436072
Analysis record

Published AI watches

Last scanned 11 minutes ago

Informational 15 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

contrib: add jaonoctus's signing key

This commit simply adds a new person's PGP public-key fingerprint to the list of trusted release signers in two documentation files. It does not change any code, fix any bug, or alter any security behavior of the software itself.

41278b4eby jaonoctus+2−02 files
No security note in commit
Informational 15 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

wallet: fixed timestamps for invented bookkeeper deposits

This is a tiny internal fix to make a bookkeeping migration produce stable event ordering. It changes the timestamp used when creating historical 'deposit' records during a one-time database migration, so the records sort consistently with…

498e5086by daywalker90+2−01 file
No security note in commit
Informational 21 AI analysisMessage 85 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

docs: document missing and fix erroneous JSON-RPC error codes

This commit is a documentation-only cleanup of the JSON-RPC command help files. It corrects which numeric error codes are listed for each command so the published schemas match what the software actually returns. No program logic, validati…

Documentation-only change with no executable code modificationsCorrects RPC schema error-code metadata to match actual handler behaviorNo change to input parsing, authorization, cryptography, or network behavior
d1b6963bby daywalker90+204−1224 files
No security note in commit
Low 46 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

channeld: initialize tx_sigs_allowed on startup

This commit fixes a bug where a setting that controls whether unexpected transaction signatures are allowed was not initialized when the channel daemon starts. If a peer sent such signatures before the channel was fully ready, the program …

use of uninitialized variableundefined behavior (invalid bool load)network-triggered code path
c09c4520by Erick Cestari+1−01 file
No security note in commit
Informational 15 AI analysisMessage 100 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

ci: fix the coverage nightly's profile handling

This commit fixes the project's internal nightly code-coverage CI workflow. It changes how test coverage files are collected, ensures the same LLVM compiler version is used to generate and merge coverage data, and uploads a Codecov-compati…

5685c9a3by cdecker+12−211 file
No security note in commit
Low 37 AI analysisMessage 78 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

schemas: make required fields match the code

This commit is a large cleanup of Core Lightning's API schemas, generated RPC bindings, and related plugin code. The stated goal is to make the documented 'required' fields match what the C code actually always produces or expects. In prac…

Large schema-only change with no accompanying security advisory or CVEOne semantic change to plugin hook response: invoice_payment hook can now reject with only failure_message and no resultMany fields change from optional to required in public RPC/protobuf interfaces
ddbd2963by daywalker90+1786−173950 files
No security note in commit
Informational 15 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

doc: document error 313 on every command which can return it

This commit only updates documentation. It adds error code 313 to the documented error lists for several Core Lightning commands (fundpsbt, utxopsbt, txprepare, multiwithdraw, and upgradewallet). The error code already existed in the code …

a34b9758by Peter Neuroth+30−86 files
No security note in commit
Low 25 AI analysisMessage 88 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

tools/build-release.sh: name the checksum file when verifying the signature

This commit fixes a release-script check that verifies the cryptographic signature on a file of checksums. Previously, the script only told GPG to verify the signature file itself. If someone replaced that signature file with an inline-sig…

Incorrect cryptographic verification logic in release toolingPotential false-positive signature verification with inline-signed .asc substitutionRelease-integrity hardening
8e495707by Peter Neuroth+5−21 file
No security note in commit
Low 42 AI analysisMessage 95 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

doc: pass the manifest explicitly to gpg --verify

This commit updates Core Lightning's release documentation to tell users and release managers to run gpg --verify with both the signature file and the manifest file named explicitly. The old one-argument form can silently succeed even if t…

Verification bypass risk in release artifact validationgpg --verify single-argument form can exit 0 without reading the intended manifestDocumentation-only hardening of release process
2dee8699by Peter Neuroth+9−62 files
Vendor flagged security relevance
Low 25 AI analysisMessage 58 · Thin
EP Elements ProjectCore Lightning BitcoinLightning Network

Cargo.lock: update dependencies

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…

Routine dependency refresh with no stated security rationaleUpdates to security-sensitive transitive crates (rustls, hyper, h2, tokio, webpki-roots) but no evidence these versions fix known vulnerabilitiesNo source-code changes or patch-specific fixes visible in the diff
c1551c55by daywalker90+298−2761 file
No security note in commit
High 80 AI analysisMessage 85 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

common: bound JSON nesting depth when parsing

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 fo…

Stack-overflow via deeply nested JSONRecursive JSON traversal without depth boundDenial-of-service vector in JSON-RPC input parsing
83f92e4bby Níckolas Goline+90−22 files
Vendor flagged security relevance
Informational 15 AI analysisMessage 28 · Opaque
EP Elements ProjectCore Lightning BitcoinLightning Network

common: minor typo fixes

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 se…

273d7f02by w3lld1+3−32 files
No security note in commit
Informational 20 AI analysisMessage 90 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

pyln-testing: truncate long testnames

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 …

No security-relevant signal: change is in test framework code onlyFixes a test reliability issue, not a runtime vulnerabilityNo input sanitization, authentication, cryptography, or network changes
c4fe4cbaby Peter Neuroth+59−12 files
No security note in commit
Moderate 60 AI analysisMessage 73 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

wallet: exclude immature coinbase outputs from fee rescue selection

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 n…

Consensus-invalid transaction generation preventedFee rescue / CPFP failure mode mitigatedCoinbase maturity check added to coin selection
34883ff7by cdecker+5−12 files
Vendor flagged security relevance
Moderate 59 AI analysisMessage 91 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

askrene: fix crash loading node bias with description

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 i…

Use-after-free / double-take of a tal-allocated string during plugin startupDenial-of-service-like symptom: lightningd aborts before replying to init, node cannot restartFixes publicly reported issue #9433 by endothermicdev
4681177dby Vincenzo Palazzo+2−32 files
No security note in commit
Informational 12 AI analysisMessage 91 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

tests: restart the node which owns the layer in node bias test

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 …

0f3f67a0by Vincenzo Palazzo+3−21 file
No security note in commit
High 78 AI analysisMessage 68 · Adequate
EP Elements ProjectCore Lightning BitcoinLightning Network

dualopend: bound the feerates a peer opens at

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 …

Missing input validation on wire-parsed feerate fieldsPeer could induce signing and storage of feerate == 0RBF remote path allowed unbounded upward feerate walks
ba08356fby cdecker+140−04 files
Vendor flagged security relevance
High 72 AI analysisMessage 100 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

tests: regression coverage for out-of-range feerates

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…

Integer overflow in feerate conversion (u32 wrap from 0xFFFFFFFF perkb to 0 perkw)Absurd feerate from external fee source bypassing sanity ceilingDatabase-stored out-of-range feerate causing startup abort/crash loop
65bdbc47by cdecker+137−02 files
No security note in commit
Moderate 64 AI analysisMessage 86 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

lightningd: don't assert on funding feerates read from the db

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 interna…

Integer overflow in RBF escalation (u32 * 25 / 24) leading to assertion failureAssertion failure in read-only introspection RPC (listpeerchannels) causing crash-loop at startupDatabase value treated as invariant despite originating from external fee estimator
d67c4936by cdecker+72−227 files
Vendor flagged security relevance
Moderate 53 AI analysisMessage 86 · Strong
EP Elements ProjectCore Lightning BitcoinLightning Network

wallet: clamp absurd inflight funding feerates on upgrade

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 …

Integer overflow in fee-rate calculation (u32 overflow when multiplying by 25/24)Assertion failure leading to daemon crash loop at startupDatabase migration clamps out-of-range stored funding feerates
f057c692by cdecker+34−01 file
Vendor flagged security relevance
Repository ledger

Explore captured commits

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

AI review queuedcommon: add new_htable() macro to allocate, initialize and setup memleak coverage for any typed hash table.by Rusty Russell · 75616f6b · Oct 24, 2025 · 23 filesMessage 83 · StrongInformational 18Details
Commit message · Rusty Russell

common: add new_htable() macro to allocate, initialize and setup memleak coverage for any typed hash table.

You can now simply add per-tal-object helpers for memleak, but our older pattern required
calling memleak functions explicitly during memleak handling. Hash tables in particular need
to be dynamically allocated (we override the allocators using htable_set_allocator and assume
this), so it makes sense to have a helper macro that does all three.

This eliminates a huge amount of code.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
signing or wallet pathsecond-pass: unusually broad changesecond-pass: security-sensitive path
AI analysis · Informational 18/100

This is a code cleanup change that introduces a helper macro to reduce repeated boilerplate when creating hash tables and registering them with the project's memory-leak detection tooling. It does not fix a known security bug, change protocol behavior, or alter access controls. The patch removes many manual memleak-registration calls and replaces them with a single macro that performs allocation, initialization, and registration together.

AI review queuedlightningd: cancel watching original funding when we switch to the new one via splice.by Rusty Russell · 89eaf834 · Oct 24, 2025 · 6 filesMessage 73 · AdequateLow 32Details
Commit message · Rusty Russell

lightningd: cancel watching original funding when we switch to the new one via splice.

This happens if the channel is *not* announcable yet. Then we hit the assertion
in funding_depth_cb that the txid is the same as the current funding.txid.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-EXPERIMENTAL: fixed crash when we splice a channel which hasn't been announced yet.

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: broader security terminologysecond-pass: security-sensitive path
AI analysis · Low 32/100

This patch fixes a crash in Core Lightning that could happen when using the experimental splicing feature on a channel that hasn't been publicly announced yet. The crash was caused by the node still watching the old funding transaction while switching to a new one after a splice. The fix stops watching the old funding transaction before updating to the new one. It is a bug fix for an experimental feature and does not appear to be an exploitable security vulnerability.

AI review queuedlightningd: fix crash in channel_control.by Rusty Russell · 5a530e6c · Oct 24, 2025 · 1 fileMessage 78 · AdequateLow 30Details
Commit message · Rusty Russell

lightningd: fix crash in channel_control.

I got a NULL deref on `infcopy->remote_funding = *inflight->funding->splice_remote_funding`
at once point in testing, so this should prevent that from happening,
yet still allow us to catch it in CI if it happens again.

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: broader security terminology
AI analysis · Low 30/100

This commit fixes a programming bug where Core Lightning could crash because it tried to use a missing piece of data (a NULL pointer) when preparing information about an in-progress channel funding transaction. The fix adds a safety check: if the expected data is missing, it logs a backtrace for debugging and skips that entry instead of crashing. The crash appears to have been triggered during internal testing of a newer feature (splicing), and the patch is defensive rather than a complete fix for why the data might be missing.

Security candidatewallet: make sure to watch all txids in transactions table.by Rusty Russell · 478a0d57 · Oct 24, 2025 · 5 filesMessage 85 · StrongInformational 24Details
Commit message · Rusty Russell

wallet: make sure to watch all txids in transactions table.

We watch if they are to do with a channel, or have outputs going to us, but otherwise
we didn't, so we never updated the blockheight in the db.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: JSON-RPC: `listtransactions` now correctly updates `blockheight` for txs created by `sendpsbt` which have no change outputs.

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 boundarysigning or wallet path
AI analysis · Informational 24/100

This commit fixes a bookkeeping bug in Core Lightning's wallet. When a user broadcast a transaction created with `sendpsbt` that had no change output coming back to the node, the node did not track the transaction's confirmation status. As a result, `listtransactions` would never show the correct `blockheight` for that transaction. The fix makes the node explicitly watch all unconfirmed transactions in its database so their confirmation height gets updated. There is no direct security exploit here; it is a data-correctness and user-experience issue.

Security candidatepytest: add test that we notice height change of sendpsbt with no change.by Rusty Russell · 2591ac48 · Oct 24, 2025 · 1 fileMessage 75 · AdequateInformational 12Details
Commit message · Rusty Russell

pytest: add test that we notice height change of sendpsbt with no change.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

75/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Mentions testing or verification
Why it was queued
signing boundarysigning or wallet path
AI analysis · Informational 12/100

This commit only adds a new automated test to the project's test suite. It does not change any production code, so it cannot directly fix or introduce a security vulnerability. The test checks that a wallet transaction created via sendpsbt is correctly tracked from unconfirmed to confirmed status, including after a node restart. It is currently marked as expected to fail (xfail), meaning the underlying behavior may not yet work as intended.

Lower-priorityadd .clangd to gitignoreby Peter Neuroth · 29999efb · Oct 24, 2025 · 1 fileMessage 51 · ThinInformational 15Details
Commit message · Peter Neuroth

add .clangd to gitignore

I use .clangd to configure compiler flags for the lsp (language server)
I use in nvim.

Changelog-None

Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>

51/100 · ThinMessage clarity
✓ Subject identifies a change✓ Provides detailed explanatory context
AI analysis · Informational 15/100

This commit adds '.clangd' to the .gitignore file, which simply tells Git to ignore local configuration files for a C language server used by some developers. It does not change any program code, build process, or security behavior.

Lower-prioritycommon: add brace hack for jsonrpc_async_parse.by Rusty Russell · eb0d0426 · Oct 24, 2025 · 2 filesMessage 48 · ThinInformational 18Details
Commit message · Rusty Russell

common: add brace hack for jsonrpc_async_parse.

This is a trick from bcli: we ask bitcoind for the block, and it hands
us a 2MB hex blob (which we read in multiple parts). Our parser wades
through it all, but a quick search for '}' makes it much faster.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

48/100 · ThinMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context! Contains work-in-progress language
AI analysis · Informational 18/100

This commit is a performance optimization, not a security fix. It speeds up how Core Lightning handles very large JSON responses from Bitcoin by first checking for a closing brace before running the full parser. The test change is just to match the new behavior.

Lower-prioritylibplugin: use jsonrpc_io for reading replies to our async commands.by Rusty Russell · 690f95ff · Oct 24, 2025 · 1 fileMessage 65 · AdequateLow 26Details
Commit message · Rusty Russell

libplugin: use jsonrpc_io for reading replies to our async commands.

This will also be more efficient than doing memmove every time.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Low 26/100

This commit refactors how plugin code reads JSON-RPC replies from Core Lightning. It replaces a custom buffer-and-memmove parser with a shared helper called jsonrpc_io. The stated reason is efficiency and code reuse. There is no direct evidence in the commit that this fixes a security bug, but any change to network-facing JSON parsing can affect reliability and potentially security if the old code mishandled malformed input.

Lower-prioritylightningd: wean parse_request off referencing jcon->buffer.by Rusty Russell · cbdffe07 · Oct 24, 2025 · 1 fileMessage 65 · AdequateInformational 15Details
Commit message · Rusty Russell

lightningd: wean parse_request off referencing jcon->buffer.

Hand it in as a parameter to reduce churn in the next patch.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Informational 15/100

This is a small internal code cleanup in Core Lightning's JSON-RPC request parser. It changes the parse_request function so it receives the JSON text buffer as a parameter instead of reading it from a connection structure. The behavior is unchanged; the same buffer is still passed in at the only call site. There is no security fix or vulnerability here.

Lower-prioritylightningd: use jsonrpc_io for reading JSON commands.by Rusty Russell · c88c8eac · Oct 24, 2025 · 2 filesMessage 65 · AdequateLow 31Details
Commit message · Rusty Russell

lightningd: use jsonrpc_io for reading JSON commands.

This is more efficient if we have lots of incoming commands, too.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Low 31/100

This commit refactors how the Core Lightning daemon reads JSON commands from RPC connections, switching to a shared helper module called jsonrpc_io. The stated goal is efficiency with many incoming commands. The change removes hand-rolled buffer and JSON parsing state from the connection object and delegates that to the new helper. A test was adjusted because sending a malformed '[]' array now causes the server to close the connection, whereas before it apparently returned an error and kept the connection open. There is no explicit security claim in the commit, but the behavioral change around malformed input handling is a security-relevant signal worth noting.

Lower-prioritylibplugin: use jsonrpc_io for stdin from lightningd.by Rusty Russell · cbfd65f6 · Oct 24, 2025 · 1 fileMessage 65 · AdequateInformational 11Details
Commit message · Rusty Russell

libplugin: use jsonrpc_io for stdin from lightningd.

This is also more efficient if there are many commands at once.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Informational 11/100

This commit refactors how Core Lightning plugins read JSON commands from the main lightningd process. It replaces a hand-rolled JSON buffering and parsing loop with a shared helper called jsonrpc_io. The change is described by the author as a cleanup and efficiency improvement, not a security fix. There is no direct evidence in the commit or supplied references that this resolves a vulnerability.

Lower-prioritylibplugin: wean ld_command_handle off referncing plugin->buffer.by Rusty Russell · cb2cf034 · Oct 24, 2025 · 1 fileMessage 65 · AdequateInformational 15Details
Commit message · Rusty Russell

libplugin: wean ld_command_handle off referncing plugin->buffer.

Hand it in as a parameter to reduce churn in next patch.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Informational 15/100

This is a small internal code cleanup in Core Lightning's plugin library. It changes one function so that it receives its input text buffer as a parameter instead of reading it from a shared plugin object. The behavior is unchanged; the same buffer is passed in at the only call site. There is no security fix or vulnerability here.

Lower-prioritylightningd: wean pligun_log_handle/plugin_notify_handle/plugin_response_handle off plugin->buffer.by Rusty Russell · 203dbaab · Oct 24, 2025 · 1 fileMessage 65 · AdequateInformational 15Details
Commit message · Rusty Russell

lightningd: wean pligun_log_handle/plugin_notify_handle/plugin_response_handle off plugin->buffer.

Hand buffer in as a parameter to reduce churn in the next patch.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Informational 15/100

This commit is a small internal cleanup in Core Lightning's plugin handling code. It changes several functions so they receive the JSON message buffer as a function argument instead of reading it from a shared plugin structure. There is no change to behavior, no bug fix, and no security-relevant change visible in the diff.

Lower-prioritycommon: add json_dup_contents() to duplicate toks and buffer.by Rusty Russell · e5318ee6 · Oct 24, 2025 · 4 filesMessage 65 · AdequateInformational 12Details
Commit message · Rusty Russell

common: add json_dup_contents() to duplicate toks and buffer.

We do this in several places, might as well make it common code.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Informational 12/100

This commit is a routine code cleanup. It introduces a shared helper function that copies a JSON buffer and its associated tokens, then replaces two existing hand-rolled copy operations in the JSON-RPC code with that helper. There is no indication of a security fix or behavior change.

Lower-prioritylibplugin: use jsonrpc_io logic for sync requests too.by Rusty Russell · bc4bb2b0 · Oct 24, 2025 · 3 filesMessage 65 · AdequateLow 26Details
Commit message · Rusty Russell

libplugin: use jsonrpc_io logic for sync requests too.

It's a little overkill, but it's clear.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Low 26/100

This commit refactors how Core Lightning plugins read JSON-RPC replies when they make synchronous requests to lightningd. It replaces a custom, simpler read-and-parse loop with the same shared JSON-RPC I/O machinery already used for asynchronous requests. The change is described by the author as 'a little overkill, but it's clear'—meaning it is a code-quality/consistency refactor rather than a fix for a known security bug. There is no direct evidence in the commit or supplied references that this resolves an exploitable vulnerability.

Lower-priorityplugins: remove unused json_buffer / json_toks members from libplugin-pay.by Rusty Russell · dd7cc71b · Oct 24, 2025 · 3 filesMessage 73 · AdequateInformational 15Details
Commit message · Rusty Russell

plugins: remove unused json_buffer / json_toks members from libplugin-pay.

They were never referenced, and saving the toks is questionable since their
lifetime is not guaranteed to live beyond this call (at least the buffer was
duplicated, but that also assumed it was at the start of the object).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Informational 15/100

This commit removes two unused data fields from the payment-handling code in Core Lightning's plugins. The fields stored a copy of the incoming JSON command buffer and a pointer to its parsed tokens, but nothing in the code actually read them. The commit message notes that keeping the parsed token pointer was especially questionable because the tokens could become invalid after the call. This is a code cleanup with no direct security fix; it eliminates a latent risk of future misuse but does not change any active behavior.

Lower-prioritylightningd: use jsonrpc_io for plugin JSON commands.by Rusty Russell · 4958cd32 · Oct 24, 2025 · 2 filesMessage 65 · AdequateLow 26Details
Commit message · Rusty Russell

lightningd: use jsonrpc_io for plugin JSON commands.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

65/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Low 26/100

This commit refactors how Core Lightning reads JSON messages from plugins, switching from a custom hand-rolled parser buffer to a shared helper called jsonrpc_io. The change removes a lot of duplicated parsing logic and may fix subtle bugs where the old code could mis-handle partial or large plugin responses. There is no direct evidence in the commit that this fixes a known security vulnerability, but centralizing JSON-RPC input handling is generally a hardening move that reduces the chance of parser-related crashes or misrouting of plugin messages.

Lower-prioritycommon: export helper membuf_tal_realloc.by Rusty Russell · 7c9e016f · Oct 24, 2025 · 4 filesMessage 70 · AdequateInformational 15Details
Commit message · Rusty Russell

common: export helper membuf_tal_realloc.

We have to call it membuf_tal_resize() because the other on is
a ccan/json_out static function!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

70/100 · AdequateMessage clarity
✓ Descriptive subject✓ Provides detailed explanatory context✓ Explains rationale or failure mode
AI analysis · Informational 15/100

This commit simply moves an existing memory-resizing helper function from two separate source files into a shared utility file so both places can call the same copy. The actual behavior of the code does not change; it is a routine code cleanup (refactoring).

Lower-priorityplugins: make fatal errors neater.by Rusty Russell · e28fed75 · Oct 24, 2025 · 1 fileMessage 60 · AdequateInformational 15Details
Commit message · Rusty Russell

plugins: make fatal errors neater.

Without this they get run together on stderr.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

60/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
AI analysis · Informational 15/100

This is a trivial formatting fix. When a plugin crashes with a fatal error, the message printed to the terminal was missing a final newline, so multiple error messages could appear squashed together. The change adds that missing newline. It has no security relevance.

Lower-prioritycommon/jsonrpc_io: helper routines for reading JSON from sockets.by Rusty Russell · 68f6a1a1 · Oct 24, 2025 · 5 filesMessage 73 · AdequateInformational 11Details
Commit message · Rusty Russell

common/jsonrpc_io: helper routines for reading JSON from sockets.

The efficient way to do this is to use membuf, which handles the buffer
control (only using memmove when necessary). We have multiple places
where we opencoded this, some of which did not use membuf at all.

So now we create common infrastructure. I tried making it a single
function but the various users are quite different, so instead I opted
for a toolbox approach.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
AI analysis · Informational 11/100

This commit adds a new shared helper library for reading and parsing JSON-RPC messages from network sockets. It is purely a code-organization change: it introduces reusable routines and a unit test, but does not change any existing callers or fix any reported bug. There is no indication in the commit message or diff that this is a security patch.

Security candidateplugins: fix %*.s typo.by Rusty Russell · 8f6d3d87 · Oct 24, 2025 · 5 filesMessage 64 · AdequateModerate 68Details
Commit message · Rusty Russell

plugins: fix %*.s typo.

And add a check for new uses creeping in, since it got cut & paste
everywhere.

This means "this is a valid string, but truncate it to this many characters"
vs "%.*s" which means "only read this many characters of string":

```
['lightningd-3 2025-10-23T02:31:40.890Z **BROKEN** plugin-funder: Plugin marked as important, shutting down lightningd!']
--------------------------- Captured stderr teardown ---------------------------
#0 0x557da58ad1dc in printf_common(void*, char const*, __va_list_tag*) asan_interceptors.cpp.o
#1 0x557da5aff814 in json_out_addv /home/runner/work/lightning/lightning/ccan/ccan/json_out/json_out.c:239:11
#2 0x557da59740ce in plugin_logv /home/runner/work/lightning/lightning/plugins/libplugin.c:1777:2
#3 0x557da5969b6f in plugin_log /home/runner/work/lightning/lightning/plugins/libplugin.c:1934:2
#4 0x557da595c4f6 in datastore_del_success /home/runner/work/lightning/lightning/plugins/funder.c:161:2
#5 0x557da598b837 in handle_rpc_reply /home/runner/work/lightning/lightning/plugins/libplugin.c:1072:10
#6 0x557da598a4b0 in rpc_conn_read_response /home/runner/work/lightning/lightning/plugins/libplugin.c:1361:3
#7 0x557da5adbea5 in next_plan /home/runner/work/lightning/lightning/ccan/ccan/io/io.c:60:9
#8 0x557da5ae06ff in do_plan /home/runner/work/lightning/lightning/ccan/ccan/io/io.c:422:8
#9 0x557da5adfb58 in io_ready /home/runner/work/lightning/lightning/ccan/ccan/io/io.c:439:10
#10 0x557da5aec2ce in io_loop /home/runner/work/lightning/lightning/ccan/ccan/io/poll.c:455:5
#11 0x557da59757ac in plugin_main /home/runner/work/lightning/lightning/plugins/libplugin.c:2409:3
#12 0x557da594fe23 in main /home/runner/work/lightning/lightning/plugins/funder.c:1723:2
#13 0x7f6572229d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#14 0x7f6572229e3f in __libc_start_main csu/../csu/libc-start.c:392:3
#15 0x557da588b584 in _start (/home/runner/work/lightning/lightning/plugins/funder+0x10d584) (BuildId: 71ba63ab577fc6fa60573d3e8555f6db7d5c584d)

0x624000009d28 is located 0 bytes to the right of 7208-byte region [0x624000008100,0x624000009d28)
allocated by thread T0 here:
#0 0x557da590e7f6 in __interceptor_realloc (/home/runner/work/lightning/lightning/plugins/funder+0x1907f6) (BuildId: 71ba63ab577fc6fa60573d3e8555f6db7d5c584d)
#1 0x557da5b2149b in tal_resize_ /home/runner/work/lightning/lightning/ccan/ccan/tal/tal.c:755:13
#2 0x557da59f2032 in membuf_tal_resize /home/runner/work/lightning/lightning/common/utils.c:203:2
#3 0x557da5b03934 in membuf_prepare_space_ /home/runner/work/lightning/lightning/ccan/ccan/membuf/membuf.c:45:12
#4 0x557da59d4289 in jsonrpc_io_read_ /home/runner/work/lightning/lightning/common/jsonrpc_io.c:127:2
#5 0x557da598a635 in rpc_conn_read_response /home/runner/work/lightning/lightning/plugins/libplugin.c:1366:9
#6 0x557da5adbea5 in next_plan /home/runner/work/lightning/lightning/ccan/ccan/io/io.c:60:9
#7 0x557da5ae06ff in do_plan /home/runner/work/lightning/lightning/ccan/ccan/io/io.c:422:8
#8 0x557da5adfb58 in io_ready /home/runner/work/lightning/lightning/ccan/ccan/io/io.c:439:10
#9 0x557da5aec2ce in io_loop /home/runner/work/lightning/lightning/ccan/ccan/io/poll.c:455:5
#10 0x557da59757ac in plugin_main /home/runner/work/lightning/lightning/plugins/libplugin.c:2409:3
#11 0x557da594fe23 in main /home/runner/work/lightning/lightning/plugins/funder.c:1723:2
#12 0x7f6572229d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16

SUMMARY: AddressSanitizer: heap-buffer-overflow asan_interceptors.cpp.o in printf_common(void*, char const*, __va_list_tag*)
Shadow bytes around the buggy address:
0x0c487fff9350: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c487fff9360: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c487fff9370: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c487fff9380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c487fff9390: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c487fff93a0: 00 00 00 00 00[fa]fa fa fa fa fa fa fa fa fa fa
0x0c487fff93b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c487fff93c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c487fff93d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c487fff93e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c487fff93f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==26122==ABORTING
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

64/100 · AdequateMessage clarity
✓ Subject identifies a change✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
Why it was queued
memory safetydefensive validation
AI analysis · Moderate 68/100

This commit fixes a typo in several Core Lightning plugins where the wrong printf format string was used. The buggy '%*.s' tells the program to treat a string pointer as a width and then read an unlimited number of bytes from another pointer, which can read past the end of a buffer and crash or leak memory. The fix changes it to '%.*s', which correctly limits how many bytes are read from the string. The commit also adds a build-time check to stop the typo from being reintroduced.

Security candidatetests/fuzz: fix include order.by Rusty Russell · d8ee3a5e · Oct 22, 2025 · 7 filesMessage 70 · AdequateInformational 15Details
Commit message · Rusty Russell

tests/fuzz: fix include order.

Nobody ever runs `make check-includes` with fuzzing enabled.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

70/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Mentions testing or verification
Why it was queued
fuzzing or regression evidencecryptography-sensitive pathparser or protocol path
AI analysis · Informational 15/100

This commit only reorders #include lines in fuzz-test source files and adds minor indentation to two direct .c file includes. It is a coding-style/build-hygiene fix with no functional code changes and no security relevance.

Security candidateMakefile: create a library containing common, wire and bitcoin objects.by Rusty Russell · e120f870 · Oct 22, 2025 · 83 filesMessage 95 · StrongInformational 15Details
Commit message · Rusty Russell

Makefile: create a library containing common, wire and bitcoin objects.

This means we don't have to manually choose what to link against,
which is much of the complexity of our Makefiles: the compiler will
automatically use any object files it needs to link.

We already do this for ccan as libccan.a, now we have libcommon.a.

We don't link against it for *everything*, as some tests require their own
versions.

Notes:
1. I get rid of the weird plugins/test/Makefile2 (accidental commit?)
2. Many tests change due to update-mocks.
3. In some places I added the missing dependency on the Makefile itself, though most are in the next
patch.

Before:
Total program size: 221366528
Total tests size: 364243856

After:
Total program size: 190733656
Total tests size: 337880888

Build time from make clean (RUST=0) (includes building external libs):

Before:
real 0m38.227000-44.245000(41.8222+/-1.6)s
user 3m2.105000-33.696000(23.1442+/-8.4)s
sys 0m35.054000-42.269000(39.7231+/-2)s
After:
real 0m38.944000-40.416000(40.1131+/-0.4)s
user 3m6.790000-17.159000(15.0571+/-2.8)s
sys 0m35.304000-37.336000(36.8942+/-0.57)s

Build time after touch config.vars (RUST=0):

Before:
real 0m18.928000-22.776000(21.5084+/-1.1)s
user 2m8.613000-36.567000(27.7281+/-7.7)s
sys 0m20.458000-23.436000(22.3963+/-0.77)s

After:
real 0m19.831000-21.862000(21.5528+/-0.58)s
user 2m15.361000-30.731000(28.4798+/-4.4)s
sys 0m21.056000-22.339000(22.0346+/-0.35)s

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

rusty@rusty-Framework:~/devel/cvs/lightni

95/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
Why it was queued
signing or wallet pathboot or update path
AI analysis · Informational 15/100

This commit is a build-system cleanup. It creates a new static library (libcommon.a) containing common, wire, and bitcoin object files so that Makefiles no longer need to list individual object files by hand. It also removes many auto-generated mock function stubs from unit tests because those functions are now provided by the library. There is no runtime behavior change to Core Lightning itself, and no security issue is introduced or fixed.

Security candidateMakefile: run fuzzing corpora as normal unit tests in non-fuzzing mode.by Rusty Russell · 2adfdfd0 · Oct 22, 2025 · 15 filesMessage 83 · StrongInformational 15Details
Commit message · Rusty Russell

Makefile: run fuzzing corpora as normal unit tests in non-fuzzing mode.

This means we can make sure the compile and run in normal builds.

Side note: various tests call common_setup(), which means we called it
twice in unit testing mode, so we conditionalize those.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

83/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
fuzzing or regression evidencecryptography-sensitive pathparser or protocol path
AI analysis · Informational 15/100

This commit changes the build system so that existing fuzz tests can also run as ordinary unit tests in normal (non-fuzzing) builds. It does not fix a bug, change runtime behavior of Core Lightning in production, or introduce any user-facing feature. It is purely a testing/CI infrastructure improvement.

Security candidateglobal: remove unnecessary includes from C files.by Rusty Russell · 6e5cb299 · Oct 22, 2025 · 177 filesMessage 68 · AdequateInformational 15Details
Commit message · Rusty Russell

global: remove unnecessary includes from C files.

Basically, `devtools/reduce-includes.sh */*.c`.

Build time from make clean (RUST=0) (includes building external libs):

Before:
real 0m38.944000-40.416000(40.1131+/-0.4)s
user 3m6.790000-17.159000(15.0571+/-2.8)s
sys 0m35.304000-37.336000(36.8942+/-0.57)s
After:
real 0m37.872000-39.974000(39.5466+/-0.59)s
user 3m1.211000-14.968000(12.4556+/-3.9)s
sys 0m35.008000-36.830000(36.4143+/-0.5)s

Build time after touch config.vars (RUST=0):

Before:
real 0m19.831000-21.862000(21.5528+/-0.58)s
user 2m15.361000-30.731000(28.4798+/-4.4)s
sys 0m21.056000-22.339000(22.0346+/-0.35)s

After:
real 0m18.384000-21.307000(20.8605+/-0.92)s
user 2m5.585000-26.843000(23.6017+/-6.7)s
sys 0m19.650000-22.003000(21.4943+/-0.69)s

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

68/100 · AdequateMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing or wallet pathauthentication pathparser or protocol path
AI analysis · Informational 15/100

This commit is a routine code cleanup: it removes unused C-language #include directives from many source files and adds a few that were needed but previously inherited indirectly. The stated goal is faster build times, and the diff shows no functional code changes. There is no security-relevant behavior change.