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

graph/db: fix FetchChannelEdgesByID zombie fallback versioning

Public commit record

What the developer wrote

Authored by Elle Mouton

83/100 · Strong
graph/db: fix FetchChannelEdgesByID zombie fallback versioning

The zombie fallback in SQLStore.FetchChannelEdgesByID unconditionally
constructed a models.NewV1Channel regardless of the requested gossip
version. Use the passed version to select the correct constructor so
that v2 zombie edges carry the right version.

A new testFetchZombieEdgeVersioning versioned test verifies that
zombie edges returned by FetchChannelEdgesByID have the correct
gossip version for both v1 and v2.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit fixes a bug in LND's Lightning graph database where a fallback path for deleted ('zombie') channels always created a version-1 channel object, even when the caller asked for version 2. The fix makes the fallback use the requested gossip version. The bug could cause version mismatches when reading zombie channel data, but it does not appear to be directly exploitable for theft or denial of service.

Recommended action

Apply the patch and run the versioned graph DB tests. Review any code paths that consume FetchChannelEdgesByID zombie results to ensure they handle the corrected version field consistently.

Security signals we found

01

Incorrect version metadata in reconstructed zombie channel edges

02

Potential version mismatch between stored/expected channel features

03

Versioned test added to prevent regression

Risk score

Why this scored 35/100

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