TCL LinkHub Mesh Wifi confers ucloud_add_node_new stack-based buffer overflow vulnerability
A stack-based buffer overflow exists in the ucloud_add_node_new function of TCL LinkHub Mesh Wi-Fi when parsing a protobuffer message containing an overly long serialNumMd5 field. An attacker on the same Wi-Fi network can send a crafted packet to port 9003 to overwrite the return address and potentially execute arbitrary code.
A stack-based buffer overflow vulnerability exists in the confers ucloudaddnodenew functionality of TCL LinkHub Mesh Wi-Fi 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 function uses sprintf to copy the serialNumMd5 string into a 0x80-byte stack buffer without any length limit, allowing a longer input to overflow the buffer and overwrite the saved return address.
Impact
An attacker on the same Wi-Fi network could crash the device or potentially execute arbitrary code with the privileges of the ucloud process.
What the attacker needed
Attacker on the same Wi-Fi network; ability to send packets to port 9003
How it was found
- Connect to the Wi-Fi network provided by the LinkHub Mesh.
- Send a crafted protobuffer message of type ManualNodeInfo to port 9003 with an overly long serialNumMd5 field.
- The message is routed to the ucloud binary and dispatched to the confsrv handler.
- The ucloud_add_node_new function parses the message and copies serialNumMd5 into a stack buffer using sprintf, 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 is a memory corruption bug in a Wi-Fi router. The router receives a message over the local network and copies a text field into a fixed-size buffer without checking its length. Because the buffer is too small, extra data spills over and can overwrite the return address, which tells the program where to continue after the function finishes. An attacker on the same Wi-Fi can exploit this to crash the router or possibly 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.