Wireshark tells me I am sending my local-scope IPv6 address, when connecting over IPv4 (behind NAT)... :/
Context: #8594
Added privacy tag. Leaking internal addresses behind a NAT is a serious privacy issue, see #8594 (comment) . Aren't local-scope addresses based on the MAC address? Ouch.
Hmm, no. I don't seem to actually have the address on any of my interfaces.
Begins with fd87. Second-guessing if this is actually IPv6 local, or perhaps some way of encoding a Tor hidden service?
Yes, that's an onioncat address - the way Bitcoin P2P encodes onion addresses in IPv6.
Closing; feel free to reopen if you see other local addresses being relayed.
Sending an onion address as from-address is a privacy breach, too.
Hmm, I believe the logic is that we send the most compatible known local address to peers. That means that you'd send your onion address to non-tor peers if you don't know of any other local reachable non-onion address.
Perhaps that logic should be revisited, and we should never send an address out except to peers that are already connected to through that interface. That is complicated, as it means we need a way to identify incoming onion connections as belonging to tor.
Which is less privacy-sensitive, at least it's hiding among a crowd there.
Is anyone working on a PR for this? If I'm not stepping on anyone's toes I'd like to put a PR together over the weekend.
@EthanHeilman not aware of anyone working on this
Is this still an issue with a recent version of Bitcoin Core? If yes, what are the steps to reproduce?
To summarize, there are 3 issues here:
VERSION message, fixed by #8740ADDR (or ADDRv2) message. I need to look at this more carefully, but a brief look tells me that maybe the problem exists. I mean sending our IPv4 address to a Tor peer or sending our Tor address to an IPv4 peer. At least CNetAddr::GetReachabilityFrom() does not explicitly disable that:Maybe this can happen if we can make outbound connections to both Tor and IPv4 but only listen on one of them.
Closing as fixed based on prior comments from vasild.