Realtek rtl819x Jungle SDK boa formDnsv6 stack-based buffer overflow vulnerability
The boa web server's formDnsv6 handler copies the routername request parameter into a fixed-size stack buffer without checking its length. An authenticated attacker could send an oversized value to overflow the stack and potentially execute arbitrary code.
Originally disclosed on Cisco Talos
A stack-based buffer overflow vulnerability exists in the boa formDnsv6 functionality of Realtek rtl819x Jungle SDK v3.4.11. A specially crafted series of network requests can lead to arbitrary 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 code uses strcpy to copy the user-supplied routername parameter into a fixed-size stack struct member without any length check.
Impact
An attacker with admin credentials could overflow the stack and potentially achieve arbitrary code execution on the device.
What the attacker needed
Admin credentials (default admin:admin); network access to the device; load dnsv6.htm first for CSRF
The fix
Realtek provided updated software to its customers, but LevelOne declined to patch the issue in its router.
How it was found
- Load the dnsv6.htm page first to satisfy the CSRF protection mechanism
- Send a POST request to the formDnsv6 API with enable_dnsv6 set to a non-zero value and submit set to Save
- Include an oversized routername value in the request body
- The boa process crashes as a result
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 router's web page takes a text value from a form and copies it into a small reserved space in memory without checking how long it is. If the text is too long, it spills over into neighbouring memory and can crash the program or let an attacker run their own code. Here the attacker must already be logged in as admin.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.