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

routerrpc: fix payment address deep copy

Public commit record

What the developer wrote

Authored by ziggie

68/100 · Adequate
routerrpc: fix payment address deep copy

using copy for a slice of size 0 will not copy anything so we need
to first initialize the slice before we do the deep copy.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit fixes a bug in LND's router RPC code where a payment address was not being properly copied before use. The original code called `copy()` on a slice that had not been created yet, so nothing was actually copied. As a result, the payment address could be left empty when it should have contained a required 32-byte value. This could cause payment probes or related routing operations to behave incorrectly, potentially leading to failed payments or unexpected routing behavior.

Recommended action

Treat as a bug fix with possible security implications. Review whether the missing payment address could be exploited to probe routes without proper payment constraints, or whether it could lead to privacy or payment-integrity issues. Apply the patch and consider adding regression tests that assert the payment address is preserved through probe request construction.

Security signals we found

01

Silent data loss: a 32-byte payment address was not copied due to uninitialized destination slice

02

Payment address omission could affect route probing or payment handling

03

Fix pattern is allocation-before-copy, a common Go deep-copy mistake

04

No explicit security claim in commit message or diff

Risk score

Why this scored 43/100

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