AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Moderate 53 Bitcoin

bookkeeper: only read listchannelmoves 1000 entries at a time.

Public commit record

What the developer wrote

Authored by Rusty Russell

73/100 · Adequate
bookkeeper: only read listchannelmoves 1000 entries at a time.

If we read all of them, we might get 1.6M at once (after initial
migration). Then we submit a few hundred thousand simultaneous
requests to lightningd, and it gets upset, queueing them all on the
xpay command hook and running out of memory.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: plugins: bookkeeper first invocation after migration from prior to 25.09 with very large databases will not crash.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This update fixes a bug in the bookkeeper plugin of Core Lightning. After a large database migration, the plugin could ask for too many records at once, flood the main lightningd process with hundreds of thousands of requests, and cause it to run out of memory and crash. The fix reads records in batches of 1,000 instead of all at once.

Recommended action

Apply the patch. Operators with large nodes that were running versions before 25.09 should upgrade before restarting bookkeeper after migration to avoid an out-of-memory crash. No immediate incident response is required unless a crash has already occurred.

Security signals we found

01

Denial-of-service via resource exhaustion (memory exhaustion from unbounded request fan-out)

02

Unbounded batch read replaced with paginated/limit-based read

03

Plugin-induced crash of the main daemon (lightningd)

04

Crash triggered by normal operational state (large migrated database), not malformed input

Risk score

Why this scored 53/100

Our methodology →
Potential impact 18/30
Exploitability 5/25
Stealth signal 8/15
Affected reach 10/15
Confidence 8/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.