-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix --anonymous-inbound data leak #9632
base: master
Are you sure you want to change the base?
Conversation
20dd81b
to
dc7e3ed
Compare
After "rubber ducking" things, I decided on the following changes from the initial PR:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make sure I understand the comment and its implications (which are relevant to this PR):
Let's say my node has anonymous inbound setup. I make an outgoing connection to another tor node. That outgoing node will then initiate the timed sync request to my node over the connection, and my node will respond with my node's onion address and peer ID shuffled somewhere in the peerlist. If the outgoing node then initiates connections to all nodes in the peerlist that my node sent, it will be able to map my node's peer ID to my node's onion address.
Is the above accurate?
The peer ID <-> onion address link happens as soon as the peerlist is sent, there's no need for another connection. Did you mean that the peer ID could be used as an identifier in other connections? Every Tor peer id defaults to |
dc7e3ed
to
2c1c673
Compare
This is what I meant. This part of the comment is what made me think it might be possible:
Seems like it wouldn't be possible to link onion address to random peer_id thanks to the fact that every Tor peer id defaults to 1. Can you clarify the comment? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good. I have a question on the comment, but code LGTM.
Is there any benefit to shuffling the entire list versus a single random insertion? |
The list is already randomized (as part of |
2c1c673
to
8e14699
Compare
|
8e14699
to
e2eea7b
Compare
As the title says. Hopefully get some testers to make sure nothing for broken (it is fairly basic).