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

discovery: enforce non-zero timestamp in gossip messages

Public commit record

What the developer wrote

Authored by Olaoluwa Osuntokun

85/100 · Strong
discovery: enforce non-zero timestamp in gossip messages

In this commit, we add validation for channel updates and node
announcements to ensure that we reject gossip messages with zero
timestamps at the discovery layer.

From BOLT 7:
"MUST set timestamp to greater than 0, AND to greater than any
previously-sent channel_update for this short_channel_id."

This validation is performed in the gossip handlers (handleNodeAnnouncement
and handleChanUpdate) rather than at the wire protocol level. This approach
ensures we can still decode messages from disk or embedded in onion errors
while rejecting invalid gossip from peers.

Remote peers sending zero-timestamp gossip will have their ban score
incremented.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
The short version

What changed, and why it matters

This change tightens validation in LND's gossip message handling. It now rejects network announcements (channel updates and node announcements) that carry a timestamp of zero, which the Lightning BOLT specification forbids for channel updates. Remote peers sending zero-timestamp channel updates will also have their 'ban score' increased, moving them closer to being disconnected. The patch is defensive and does not appear to fix an active exploit, but it closes a spec-compliance gap that could be abused to propagate invalid routing data.

Recommended action

No immediate action required beyond normal patching. Operators should upgrade to LND 0.20.1 when available to benefit from the improved gossip validation. Monitor peer ban-score logs for any unexpected spikes from remote peers sending malformed channel updates.

Security signals we found

01

Spec-compliance validation added for BOLT 7 timestamp requirement

02

Peer ban-score increment for invalid channel_update messages

03

Rejection of zero-timestamp node_announcement as defensive sanity check

04

Validation placed in gossip handlers rather than wire decoder to avoid breaking stored/onion-embedded messages

Risk score

Why this scored 48/100

Our methodology →
Potential impact 12/30
Exploitability 8/25
Stealth signal 6/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.