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

graph/db: treat empty channel signatures as missing

Public commit record

What the developer wrote

Authored by Elle Mouton

100/100 · Strong
graph/db: treat empty channel signatures as missing

This commit improves handling of missing channel signatures in the
database:

- Return nil from auth proof accessors instead of empty slices so that
missing signatures are stored as NULL in SQL.
- Update public channel checks to require signature length > 0, which
properly handles existing empty bytea values in the database.
- Add regression test covering empty v1 and v2 channel signatures to
prevent future issues.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification✓ Names security-relevant behavior explicitly
The short version

What changed, and why it matters

This commit fixes a bug in LND's Lightning Network graph database where empty channel signatures were being treated as valid proof that a channel was publicly announced. Because the code previously treated empty byte slices the same as real signatures, a node connected only by such a 'channel' could incorrectly be considered public. The fix makes the database store empty signatures as NULL and changes all public-channel checks to require a signature length greater than zero. The commit message frames this as a correctness improvement and adds regression tests, but does not label it a security vulnerability.

Recommended action

Treat as a bug-fix commit with possible security side effects. Review whether any existing node/channel was incorrectly marked public due to empty signatures and consider re-evaluating public-node state. No immediate emergency response is indicated, but operators running versions prior to this commit may be exposed to incorrect gossip visibility decisions.

Security signals we found

01

Logic flaw: empty byte slice treated as valid authentication proof

02

Public-node/channel classification depends on signature presence

03

SQL NULL vs empty bytea inconsistency in stored proof data

04

Regression test added for empty V1 and V2 signatures

05

Potential information-disclosure / gossip-policy bypass if nodes are incorrectly advertised as public

Risk score

Why this scored 51/100

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