ObolNetwork / ObolNetwork/charon

Research libp2p DDoS attack mitigation

Open
#538 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

protocol security
Dominant language
Go
Stars
222
Forks
138
Avg merge
2d 6h
Merged PRs (30d)
35

Description

Problem to be solved

Charon nodes in a cluster communicate via libp2p. There are multiple libp2p protocols inside charon (dkg/qbft/ping/parsigex). A Byzantine node can DDoS other nodes by spamming them with valid (or invalid) connections and messages, causing OOM and or CPU problems.

DDoS can happen on the following resources:

  • Number of libp2p connections
  • Number of messages per connection
  • Size of messages

This is however a common problem, so there might be existing solutions to the problem.

Proposed solution

  • Research different ways to mitigate DDoS attacks (by Byzantine cluster peers).
  • Look at libp2p connmgr.ConnManager to limit connections
  • Look at libp2p network.ResourceManager to limit memory, streams, connections, and file descriptors
  • Look at something like for bandwith throttling: https://github.com/corverroos/rateconn
  • Look at custom message rate limiters and custom message size rate limiters (both detecting and then throttling)

Write a document with findings and recommendations.

Out of Scope

Nothing needs to be implemented yet.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing libp2p's connmgr.ConnManager and network.ResourceManager, then compare rateconn and custom message and size limiters. Document the available mitigation approaches, their trade-offs for Charon's connections and protocols, and recommendations; no implementation is required.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
distributed-systems, networking, security
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.