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

onionmessage: drop onion messages cycling back to the sending peer

Public commit record

What the developer wrote

Authored by Gijs van Dam

73/100 · Adequate
onionmessage: drop onion messages cycling back to the sending peer

Block forwarding of an onion message when the resolved next hop is the
same peer that delivered it. Such a forward would immediately bounce the
message back over the very connection it arrived on, which is never
useful and can be abused to amplify traffic against a peer.

The check runs after the routing action is resolved, so both direct
next-node-ID and SCID-resolved paths are covered. A new
`ErrSamePeerCycle` is returned (and logged at warn level) when a cycle
is detected.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This update fixes a way that a malicious or misconfigured peer could make a Lightning node repeatedly bounce onion messages back to itself, wasting bandwidth and CPU. The node now detects when the next hop of an onion message is the same peer that sent it and drops the message instead of forwarding it.

Recommended action

Apply the patch. It is a targeted, low-risk hardening change. Monitor logs for ErrSamePeerCycle warnings to identify peers attempting or causing cyclic onion message routes.

Security signals we found

01

traffic amplification / loop prevention

02

denial-of-service mitigation

03

new defensive validation in message forwarding path

04

explicit error type introduced for detected cycles

Risk score

Why this scored 65/100

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