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

Pass the `addr` field of `tor_connect_outbound` to connection setup

Public commit record

What the developer wrote

Authored by Leo Nash

73/100 · Adequate
Pass the `addr` field of `tor_connect_outbound` to connection setup

When `setup_outbound` was used to setup a connection proxied over Tor,
it previously set the remote address of the peer to the address of the
Tor proxy.

This address of the Tor proxy was assigned to the
`PeerDetails::socket_address` for that peer in
`PeerManager::list_peers`, and if it was not a private IPv4 or IPv6
address, it was also reported to the peer in our init message.

This commit refactors `tor_connect_outbound` to pass its own peer
address parameter directly to the connection setup code.

This peer address will now appear in `PeerManager::list_peers` for
outbound Tor connections made using `tor_connect_outbound`, and will be
reported to the peer in our init message if it is not a private IPv4 or
IPv6 address.
✓ Specific, 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 the Lightning Dev Kit's Tokio networking code where Tor-proxied outbound connections were accidentally advertising the Tor proxy's address as the peer's address. After the fix, the actual peer address is used instead. This is mainly a privacy and correctness issue: previously a node might leak its Tor proxy's address to the peer and misreport who it was connected to.

Recommended action

Treat as a low-severity privacy/correctness fix. Users relying on Tor outbound connections should upgrade to ensure their node does not leak proxy addresses or misreport peer socket addresses. No immediate mitigation required beyond applying the patch.

Security signals we found

01

Information disclosure: Tor proxy address leaked to peer in init message

02

Address misattribution: PeerManager::list_peers reported proxy address instead of peer address

03

Privacy degradation for Tor users

04

Correctness fix with no cryptographic or memory-safety changes

Risk score

Why this scored 38/100

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