-
Notifications
You must be signed in to change notification settings - Fork 107
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: Stop disconnecting from nodes that send unexpected messages, to prevent disconnection attacks, Credit: Equilibrium #2107
Labels
A-network
Area: Network protocol updates or fixes
A-rust
Area: Updates to Rust code
C-security
Category: Security issues
I-hang
A Zebra component stops responding to requests
I-invalid-data
Zebra relies on invalid or untrusted data, or sends invalid data
I-slow
Problems with performance or responsiveness
S-needs-investigation
Status: Needs further investigation
Milestone
Comments
teor2345
added
C-bug
Category: This is a bug
A-rust
Area: Updates to Rust code
S-needs-triage
Status: A bug report needs triage
S-needs-investigation
Status: Needs further investigation
P-High
C-security
Category: Security issues
I-hang
A Zebra component stops responding to requests
I-slow
Problems with performance or responsiveness
I-invalid-data
Zebra relies on invalid or untrusted data, or sends invalid data
A-network
Area: Network protocol updates or fixes
labels
May 4, 2021
teor2345
changed the title
Stop immediately disconnecting from nodes that send unexpected messages
Security: Stop immediately disconnecting from nodes that send unexpected messages
May 24, 2021
7 tasks
teor2345
changed the title
Security: Stop immediately disconnecting from nodes that send unexpected messages
Security: Stop immediately disconnecting from nodes that send unexpected messages, Credit: Equilibrium
Jun 8, 2021
4 tasks
teor2345
changed the title
Security: Stop immediately disconnecting from nodes that send unexpected messages, Credit: Equilibrium
Security: Stop immediately disconnecting from nodes that send unexpected messages to prevent disconnection attacks, Credit: Equilibrium
Oct 25, 2021
teor2345
changed the title
Security: Stop immediately disconnecting from nodes that send unexpected messages to prevent disconnection attacks, Credit: Equilibrium
Security: Stop immediately disconnecting from nodes that send unexpected messages, to prevent disconnection attacks, Credit: Equilibrium
Oct 25, 2021
teor2345
changed the title
Security: Stop immediately disconnecting from nodes that send unexpected messages, to prevent disconnection attacks, Credit: Equilibrium
Security: Stop disconnecting from nodes that send unexpected messages, to prevent disconnection attacks, Credit: Equilibrium
Oct 25, 2021
9 tasks
1 task
This was referenced Nov 28, 2021
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-network
Area: Network protocol updates or fixes
A-rust
Area: Updates to Rust code
C-security
Category: Security issues
I-hang
A Zebra component stops responding to requests
I-invalid-data
Zebra relies on invalid or untrusted data, or sends invalid data
I-slow
Problems with performance or responsiveness
S-needs-investigation
Status: Needs further investigation
Motivation
When Zebra receives an unexpected network message from a peer, it disconnects from that peer. This resets a remote
zcashd
node's internal connection state for Zebra. So Zebra gets the messages it expects once it reconnects.There are a few issues with this approach:
This is a denial of service risk, because Zcash network protocol messages are unauthenticated.
Disconnecting due to protocol differences could be stopping Zebra from being listed by block explorers and DNS seeders.
Priority
This is a medium-priority issue, because:
Solution
Unrecognised Messages
NODE_BLOOM
messages.Protocol Differences
When Zebra can parse a message that a peer has sent, but doesn't expect that message:
Be strict with the handshake
Be permissive after a successful handshake
Alternatives
Work out how to restore unusable peers without disconnecting:
Context
We might want to follow what
zcashd
does here pretty closely.As
zcashd
's network behaviour becomes better specified, Zebra will have fewer unexpected network messages.The text was updated successfully, but these errors were encountered: