Skip to content
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

Tracking: security: Limit ability of synthetic nodes to take up connection slots. Credit: Ziggurat Team #7822

Open
9 tasks
mpguerra opened this issue Oct 25, 2023 · 3 comments
Assignees
Labels
A-network Area: Network protocol updates or fixes C-security Category: Security issues C-tracking-issue Category: This is a tracking issue for other tasks I-remote-trigger Remote nodes can make Zebra do something bad S-needs-triage Status: A bug report needs triage

Comments

@mpguerra
Copy link
Contributor

mpguerra commented Oct 25, 2023

Motivation

"RT-S1 f3" from "Red Team report on Zcash testnet"

Once a connection is established with a synthetic node, a connection can remain active forever. That could easily lead to denial of service when all connection slots would be occupied by synthetic nodes and rightful users wouldn’t have access to the node.
The problem arises when we take into account that synthetic nodes can do almost nothing so it’s cheap (that’s why it can increase the risk of exploitation to medium) to set up thousands of nodes just to connect to many nodes and occupy the connection slots.

Also "Observation #5" from "Red Team report on Zcash testnet":

Synthetic nodes can keep the connection alive without doing any actual blockchain work forever. Sometimes a synthetic node does get disconnected, but a quick reconnect solves the issue.

Specifications

No response

Complex Code or Requirements

There are two scenarios here:

  1. no load: peers that do nothing, provide no useful information, and aren't syncing from us should get disconnected
  2. overload: peers that block readiness by constantly sending inbound requests should get disconnected (follow up to bug: zebrad will not reconnect after an internet connection failure and restore #7772, existing overload defence is global, the only peer-specific defence is the heartbeat)

Potential Fixes

Before starting work, discuss the impact of each potential fix on this vulnerability with the team, and decide on 1-3 fixes that have the greatest impact:

Testing

No response

Related Work

No response

@mpguerra mpguerra added C-enhancement Category: This is an improvement S-needs-triage Status: A bug report needs triage P-Medium ⚡ A-network Area: Network protocol updates or fixes I-remote-trigger Remote nodes can make Zebra do something bad labels Oct 25, 2023
@mpguerra mpguerra added this to Zebra Oct 25, 2023
@github-project-automation github-project-automation bot moved this to 🆕 New in Zebra Oct 25, 2023
@teor2345 teor2345 added C-security Category: Security issues and removed C-enhancement Category: This is an improvement labels Oct 25, 2023
@teor2345 teor2345 changed the title feature: Limit ability of synthetic nodes to take up connection slots. Credit: Ziggurat Team security: Limit ability of synthetic nodes to take up connection slots. Credit: Ziggurat Team Oct 25, 2023
@teor2345
Copy link
Contributor

teor2345 commented Oct 25, 2023

A good first step would be listing our existing defences against this attack, for inbound and outbound connections. The report is unclear about the difference.

@mpguerra who would you like to do that work?

@teor2345
Copy link
Contributor

Most solutions to #7824 also improve this issue for outbound connections (but don't impact inbound connections).

@mpguerra
Copy link
Contributor Author

mpguerra commented Dec 1, 2023

Hey team! Please add your planning poker estimate with Zenhub @arya2 @oxarbitrage @teor2345 @upbqdn

@mpguerra mpguerra changed the title security: Limit ability of synthetic nodes to take up connection slots. Credit: Ziggurat Team Tracking: security: Limit ability of synthetic nodes to take up connection slots. Credit: Ziggurat Team Dec 4, 2023
@mpguerra mpguerra added the C-tracking-issue Category: This is a tracking issue for other tasks label Dec 4, 2023
@arya2 arya2 self-assigned this Oct 29, 2024
@arya2 arya2 moved this from New to Sprint Backlog in Zebra Oct 29, 2024
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 C-security Category: Security issues C-tracking-issue Category: This is a tracking issue for other tasks I-remote-trigger Remote nodes can make Zebra do something bad S-needs-triage Status: A bug report needs triage
Projects
Status: Sprint Backlog
Development

No branches or pull requests

3 participants