TCL LinkHub Mesh Wifi confsrv set_mf_rule stack-based buffer overflow vulnerability
The TCL LinkHub Mesh Wifi router's confsrv service has a stack-based buffer overflow in its handling of the ethaddr and name fields of mf_rule messages. An attacker on the same WiFi network can send a crafted protobuf packet to port 9003 to overflow these buffers, potentially leading to remote code execution.
A stack-based buffer overflow vulnerability exists in the confsrv setmfrule functionality of TCL LinkHub Mesh Wifi MS1G0001.0014. A specially-crafted network packet can lead to stack-based buffer overflow.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The code uses memcpy with a length equal to the strlen of user-controlled input, copying into fixed-size stack buffers without bounds checking.
Impact
An attacker on the same WiFi network could crash the service and potentially execute arbitrary code with the privileges of the confsrv process.
What the attacker needed
Access to the LinkHub Mesh WiFi network
How it was found
- Connect to the WiFi network provided by the LinkHub Mesh.
- Send a crafted protobuf message to port 9003 containing an mf_lists message with an oversized ethaddr or name field.
- The ucloud binary routes the message to confsrv, which unpacks it and calls set_mf_rule.
- set_mf_rule copies the oversized field into a fixed-size stack buffer, causing a buffer overflow.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
This report describes a memory corruption bug in a WiFi router. The router runs a service that accepts messages from a phone app over the local network. When it copies a user-supplied string into a fixed-size memory area without checking the length, a long string can overwrite adjacent memory, crash the service, and possibly let an attacker run their own code.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.