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

Refuse to set features at index higher than `u16::MAX` bytes

Public commit record

What the developer wrote

Authored by Matt Corallo

65/100 · Adequate
Refuse to set features at index higher than `u16::MAX` bytes

These aren't serialize-able and clearly bogus.

Reported by Project Loupe
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
The short version

What changed, and why it matters

This commit adds a safety check in the code that handles Lightning network feature flags. Feature flags are small on/off settings used when two nodes connect. The change prevents the code from accepting a feature flag position so high that it would require more than 65,535 bytes to store. Such huge positions cannot be serialized to the network format, so they are now rejected as invalid. The commit message says the issue was reported by Project Loupe.

Recommended action

Treat as a low-to-moderate hardening fix. Review callers of set_bit to ensure errors are handled, and consider whether any other feature-bit APIs need similar bounds enforcement.

Security signals we found

01

Bounds check added to prevent unbounded vector growth

02

Rejects feature bits that cannot be serialized per BOLT length constraints

03

Reported by external party (Project Loupe)

04

Potential denial-of-service/resource exhaustion vector mitigated

Risk score

Why this scored 35/100

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