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

gossip: add COMPLETED bit to mark records which are complete.

Public commit record

What the developer wrote

Authored by Rusty Russell

73/100 · Adequate
gossip: add COMPLETED bit to mark records which are complete.

This should detect partial writes more robustly, since we make a
separate pwrite() call to update this flag after the record is written.

Previously we were playing a bit loose with synchronization assumptions,
which seemed to work on Linux ext4, but not so well elsewhere.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit hardens how Core Lightning writes its gossip store file. It adds a 'COMPLETED' flag that is set only after a full record has been safely written, so the program can detect and skip partial/corrupted records on restart. The change is defensive: it makes crashes or unclean shutdowns less likely to leave the gossip store in a broken state, especially on filesystems other than Linux ext4. There is no direct evidence in the commit of an exploitable security vulnerability.

Recommended action

Treat as a reliability/hardening fix. Review whether partial gossip-store records could previously lead to crashes, memory corruption, or denial-of-service on startup, especially on non-ext4 filesystems. Monitor for follow-up fixes or a security advisory from the project.

Security signals we found

01

Adds explicit COMPLETED flag to detect partial writes

02

Separates record write from completion flag write via pwrite()

03

Bumps gossip store minor version (14 -> 15) with migration logic

04

Commit message notes prior synchronization assumptions 'not so well elsewhere'

05

No explicit vulnerability, CVE, or exploit mechanism described

Risk score

Why this scored 44/100

Our methodology →
Potential impact 12/30
Exploitability 5/25
Stealth signal 8/15
Affected reach 10/15
Confidence 6/10
Evidence quality 3/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.