-
Notifications
You must be signed in to change notification settings - Fork 119
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: Spawn each initial peer handshake in a separate task, Credit: Equilibrium #2163
Comments
This is a high-risk change, so we'll leave it until after NU5 testnet activation. |
Each initial handshake is a future, so they all run in the same task: zebra/zebra-network/src/peer_set/initialize.rs Lines 292 to 300 in a6d56b2
Instead, we need to spawn a new task to run each future, like this code: zebra/zebra-network/src/peer_set/initialize.rs Lines 510 to 527 in a6d56b2
|
Is your feature request related to a problem? Please describe.
Zebra can hang if there are a small number of initial peers. (It eventually continues after 3*75 seconds, but that's a long time to wait.)
There might also be some potential deadlocks between the initial peer handshakes, the candidate set, and the peer set.
Reported by Niklas Long of Equilibrium.
Describe the solution you'd like
Spawn each initial peer handshake in a separate task, so they can make progress independently.
Additional context
This is the same fix as #1950, but for the initial peer handshakes.
This is a follow-up to #2154, which fixed part of this security issue.
The text was updated successfully, but these errors were encountered: