-
Notifications
You must be signed in to change notification settings - Fork 106
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
security(net): Stop sending peer addresses from handshakes directly to the address book #7977
Conversation
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.
All changes in this PR look good to me, so I'm approving. However, I don't know the implications of sending handshake peer addresses to the per-connection address cache.
This PR prevents two attacks:
Here are some potential drawbacks:
|
Co-authored-by: teor <teor@riseup.net>
Motivation
We want to stop sending connection addresses directly to the address book, because that's insecure.
Close #7951
PR Author Checklist
Check before marking the PR as ready for review:
For significant changes:
If a checkbox isn't relevant to the PR, mark it as done.
Complex Code or Requirements
This is actually simpler than the previous code, because it doesn't have concurrency issues with other updates for the same address.
Using gossiped addresses changes the outbound connection priority slightly.
Solution
Testing
@arya2 what tests should we write here?
Is inspection enough, or should we have a "not sent to the address book" or "sent to the cache" test?
Review
This is a routine fix.
Reviewer Checklist
Check before approving the PR:
PR blockers can be dealt with in new tickets or PRs.
And check the PR Author checklist is complete.
Follow Up Work
There are some cleanups in #7824 that depend on this.