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

Fix string slicing in TXT record validation

Public commit record

What the developer wrote

Authored by Matt Corallo

73/100 · Adequate
Fix string slicing in TXT record validation

Rust's panicy string slicing behavior has always been a sharp edge
and here it finally caught up with us. Ensure we don't slice into
a string provided in an onion message until we're sure the index
is a character boundary.

Reported by Jordan Mecom of Block's Security Team
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
The short version

What changed, and why it matters

This commit fixes a crash bug in how rust-lightning checks DNS text records embedded in private onion messages. The old code used string slicing that could panic if a TXT record contained multi-byte characters and the prefix length landed in the middle of a character. The fix compares raw bytes instead, avoiding the panic. A malicious or malformed onion message could have triggered a denial-of-service crash in the node processing it.

Recommended action

Upgrade to a release containing this commit. Nodes that process onion-message DNSSEC queries for BIP 353 human-readable names are exposed to a remote crash; prioritise updating public or well-connected nodes that may receive such messages.

Security signals we found

01

panic due to non-character-boundary string slicing

02

denial-of-service vector via crafted onion message TXT record

03

BIP 353 DNSSEC resolution input validation

04

third-party security report from Block's Security Team

Risk score

Why this scored 62/100

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