Wavlink AC3000 internet.cgi set_qos() buffer overflow vulnerabilities
The Wavlink AC3000 router's internet.cgi set_qos() function copies three POST parameters into a fixed-size stack buffer without length checks, causing stack-based buffer overflows. An authenticated attacker could overwrite the return address and potentially execute arbitrary code.
Originally disclosed on Cisco Talos
Multiple buffer overflow vulnerabilities exist in the internet.cgi setqos() functionality of Wavlink AC3000 M33A8.V5030.210505. A specially crafted HTTP request can lead to stack-based buffer overflow.
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 set_qos function uses strcat to append user-supplied POST parameters (cli_name, cli_mac, en_enable) to a 0x400-byte stack buffer without any length validation.
Impact
An authenticated attacker could overwrite the return address with arbitrary data, potentially leading to code execution.
What the attacker needed
Valid session cookie (authenticated); network access to the device
How it was found
- Log in to the router's web interface to obtain a valid session cookie.
- Send an HTTP POST request to internet.cgi with page=qos and an overly long cli_name parameter.
- The set_qos function copies the parameter into a fixed-size stack buffer, causing a crash or potential code execution.
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 buffer overflow happens when a program copies more data into a fixed-size memory space than it can hold, spilling over into nearby memory. Here, the router's web interface takes three text fields from a form and copies them into a small stack buffer without checking their length. By sending very long values, an attacker can overwrite the memory that controls where the program goes next, which may let them run their own code.
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.