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

gossipd: save gossip store writes, try them again (and fsync) if we get a read issue.

Public commit record

What the developer wrote

Authored by Rusty Russell

73/100 · Adequate
gossipd: save gossip store writes, try them again (and fsync) if we get a read issue.

This is a last resort, but what else are we supposed to do when we wrote
something and it didn't appear?

In particular, ZFS doesn't just "fix itself":

```
remaining_fd=200001b0c9761dff0000000001009411e26cd56d68aabc285ee1c8ee43d59be6f939b0ce353d80213918680a7438356b9c5ea6bb001a6
bb37a4dea93776f4abc8cd371525b4d1605a74b89d7cb1bfc8865ddf22288c7ea08b9d98b34155b4aed159eb81732957e6bf79b996752bf2a9995aae
ad1d65e7889e826ea0ba42f7746c176fe12f2fe6c04af1a74b4f0a262d20efd57133eb32693c789eb3f09caf4f4c6ecd2f734b3b36e751ffcc2748c5
8feabce4173c4ce6098a2c5397aabf1be5442cb67b5030be11ebd8b9841838dae127fe30000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000002000000a218b9d93000000001005000000000000c060
```

Note the record appended on the end *after all the zeroes*.

Changelog-Changed: gossipd: add gossip_store recovery for filesystems which do not synchronize read and write (e.g. ZFS on Linux), by disabling mmap reads and rewriting the last records.
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 change is a defensive fix for Core Lightning's gossip daemon, which stores network routing information on disk. On some filesystems (the commit specifically mentions ZFS on Linux), writes to this store can appear incomplete or out of order when later read back, causing the daemon to detect corruption. The patch keeps a short-term copy of recent writes in memory, disables memory-mapped reads when a mismatch is detected, and rewrites the last records with an explicit disk sync. It is a reliability/recovery fix, not a typical security vulnerability patch, and there is no evidence it was triggered by an attacker.

Recommended action

Treat as a reliability fix rather than a security patch. Operators on ZFS-on-Linux or other non-synchronizing filesystems should upgrade to benefit from improved gossip store recovery. No immediate incident response is indicated. If running Core Lightning on ZFS, monitor logs for `remaining_fd` warnings and ensure the node is on a version containing this fix.

Security signals we found

01

Defensive recovery for filesystem-level write-read inconsistency

02

Disables mmap reads and forces fsync when store read-back mismatch detected

03

Keeps in-memory copy of recent store writes for potential rewrite

04

No input sanitization, auth, or crypto changes observed

05

Commit message frames issue as ZFS-on-Linux behavior, not as an exploit

Risk score

Why this scored 30/100

Our methodology →
Potential impact 8/30
Exploitability 2/25
Stealth signal 4/15
Affected reach 6/15
Confidence 7/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.