Realtek rtl819x Jungle SDK boa formRoute stack-based buffer overflow vulnerability
A stack-based buffer overflow exists in the boa formRoute function of the Realtek rtl819x Jungle SDK, triggered by an overly long subnet parameter. An attacker could exploit this to achieve remote code execution.
Originally disclosed on Cisco Talos
A stack-based buffer overflow vulnerability exists in the boa formRoute functionality of Realtek rtl819x Jungle SDK v3.4.11. A specially crafted series of HTTP requests can lead to remote code execution.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
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
The formRoute function uses sprintf to copy the subnet parameter into a fixed-size stack buffer without bounds checking.
Impact
An attacker could exploit this vulnerability to achieve arbitrary code execution.
What the attacker needed
Admin credentials (default admin:admin); access to the web interface
The fix
Realtek has provided updates to their customers, but LevelOne has declined to patch the issues in their software.
How it was found
- Load the route.htm page to satisfy CSRF protection.
- Send a POST request to /boafrm/formRoute with addRoute=1 and an overly long subnet parameter.
- The boa process crashes due to the buffer overflow.
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 router's web server copies a user-supplied value into a fixed-size memory buffer without checking its length. If the value is too long, it overflows the buffer and can overwrite nearby memory, potentially allowing an attacker to run their own code on the device.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.