-
Notifications
You must be signed in to change notification settings - Fork 120
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: Zebra should stop gossiping unreachable addresses to other nodes, Action: re-deploy all nodes #1867
Closed
2 of 11 tasks
Labels
A-rust
Area: Updates to Rust code
C-bug
Category: This is a bug
C-security
Category: Security issues
I-invalid-data
Zebra relies on invalid or untrusted data, or sends invalid data
Milestone
Comments
3 tasks
Closed
3 tasks
|
3 tasks
Moving this to sprint 10, so Zebra can clear out the bad addresses created by the bug in #2120. |
Closed
15 tasks
This is larger now we've added proptests. |
This was referenced Jun 8, 2021
3 tasks
3 tasks
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-rust
Area: Updates to Rust code
C-bug
Category: This is a bug
C-security
Category: Security issues
I-invalid-data
Zebra relies on invalid or untrusted data, or sends invalid data
User Actions for the Changelog
Re-deploy all running Zebra nodes after fixing this bug. This bug fix allows the network to delete the unreachable peer addresses introduced by #2120, and kept alive by #1868.
Motivation
Zebra relays peer addresses to other nodes, even if it hasn't been able to contact those peers itself, and even if the
untrusted_last_seen
time gossiped by other nodes is a long way in the past.Zebra is currently keeping unreachable addresses in its address book, and sending them to other peers, so this security fix is important and urgent.
Specification
"The typical presumption is that a node is likely to be active if it has been sending a message within the last three hours."
https://en.bitcoin.it/wiki/Protocol_documentation#getaddr
This time period is a network health / network view leakage design tradeoff.
Solution
This fix depends on #1849 and #1871.
Zebra should stop gossiping peers that haven't had a successful connection or sent a message for 3 hours.
To avoid sending old peers from other nodes, Zebra should stop gossiping peers where:
last_success_time
is older than 3 hourslast_success_time
isNone
, and theuntrusted_last_seen_time
is older than 3 hours (requires the far-future fix in Security: Zebra should stop believing far-future last_seen times from peers #1871)We can make these changes in the
AddressBook::sanitized
function.Zebra should also:
MetaAddr
to simplify the interface to thelast_success_time
anduntrusted_last_seen_time
Property testing:
MetaAddr
sAddressBook
last_success_time
s anduntrusted_last_seen_time
s are handled correctlyAcceptance testing:
debug_gossip_max_peer_age
config10
secondsAlternatives
This is a serious security issue, so we must do something. If we find a simpler design that fixes this security issue, we should use it.
Context
zcashd
and Zebra will check addresses for connectivity, then move on to other addresses. So this is not a critical security issue.Follow-Up Tasks
We might want to do #1865 after this ticket - they modify the same code.
As a follow-up, we should review this design, and make sure that we're minimising network-based metadata leaks in Zebra.
The text was updated successfully, but these errors were encountered: