| Title | Tenda AC18 V15.03.05.19_multi Stack-based Buffer Overflow |
|---|
| Description | Title: Remote Stack-Based Buffer Overflow in Tenda AC18 via Insecure Memory Copy in formSetFirewallCfg (firewallEn)
Description:
A critical stack-based buffer overflow vulnerability was identified in the HTTP server daemon (httpd) of the Tenda AC18 router (firmware version V15.03.05.19_multi).
Vulnerability Mechanism:
The issue exists within the web form handler function formSetFirewallCfg, which processes firewall configurations. When a user submits an HTTP POST request containing the firewallEn parameter, the application extracts this untrusted string input and assigns it to the local variable src.
To validate the input, the program calculates the length of src and stores the result in the variable Value. The program then checks if the length is greater than 3 (if (Value > 3)). However, while enforcing a minimum length requirement, the application completely fails to verify or restrict the upper bounds of the input data. Consequently, if the condition is met, the untrusted src string is copied directly into a fixed-size stack destination buffer dest using an unsafe copy operation (such as strcpy). Since dest is allocated with a rigid capacity of only 4 bytes (char dest[4]), any input string significantly longer than 4 bytes will exceed the boundary.
Impact:
By sending a crafted firewallEn parameter that excessively exceeds 4 bytes, a remote attacker can trigger a linear memory overwrite on the stack frame. This memory corruption cleanly obliterates adjacent stack variables and subverts the saved return address (Saved PC). Upon function termination, the execution flow is successfully hijacked, enabling the attacker to induce a permanent Denial of Service (DoS) by crashing the web service or potentially execute arbitrary remote code (RCE) with root privileges. |
|---|
| Source | ⚠️ https://github.com/mz21g/vulnerabilities/tree/main/Tenda/AC18/vuln_10 |
|---|
| User | yanzhichen (UID 98986) |
|---|
| Submission | 06/22/2026 17:25 (4 months ago) |
|---|
| Moderation | 08/08/2026 18:23 (2 months later) |
|---|
| Status | Duplicate |
|---|
| VulDB entry | 257155 [Tenda AC18 15.03.05.05 formSetFirewallCfg firewallEn stack-based overflow] |
|---|
| Points | 0 |
|---|