monerod JSON RPC server remote DoS
The monerod JSON RPC server did not limit the Content-Length value on incoming HTTP requests, so a request could make the daemon allocate an arbitrary amount of memory. An unauthenticated attacker with access to the RPC port could exhaust memory and have the process killed by the OOM killer, stopping the daemon remotely.
- Triaged in 32 hours
- Fixed in 48 days
- Disclosed after 6 months
Monero daemon (monerod) does not limit Content-length variable when processing incoming HTTP requests. We can force monerod to allocate arbitrary amount of memory.
How to reproduce:
- compile monero https://github.com/monero-project/monero
- run it:
$ ulimit -Sv 1000000000 $ ./bin/monerod --rpc-login test:test --rpc-bind-ip 0.0.0.0 --confirm-external-bind
- run attached script m1.py
$ python2 ./m1.py 192.168.1.34
- after some time OOM killer will stop monerod
Impact
monerod process can be stopped remotely, no authentication is required. An access to JSON RPC port is enough.
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 HTTP request parser allocated a buffer based on the client-supplied Content-Length without enforcing an upper bound.
Impact
The monerod process could be stopped remotely without authentication, needing only access to the JSON RPC port.
What the attacker needed
Network access to the JSON RPC port
How it was found
- Build monerod from the Monero source.
- Start monerod with RPC login enabled and bound to an external interface, under a memory ulimit.
- Run the provided script against the target's IP address.
- Wait until the OOM killer stops the monerod process.
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.
The daemon did not cap the Content-Length value, so requests could make it allocate large amounts of memory. When memory runs out, the OOM killer stops the process, taking the service offline.
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.