Samsung SmartThings Hub video-core clips Code Execution Vulnerability
The video-core HTTP server on the Samsung SmartThings Hub copies user-supplied JSON fields into fixed-size stack buffers without checking length, causing stack buffer overflows. An attacker who can send requests to the localhost service could crash the device or execute arbitrary code as root.
Originally disclosed on Cisco Talos
Multiple exploitable buffer overflow vulnerabilities exist in the /cameras/XXXX/clips handler of video-core’s HTTP server of Samsung SmartThings Hub. The video-core process incorrectly extracts fields from a user-controlled JSON payload, leading to a buffer overflow on the stack.
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 strncpy with a length taken from the input string itself, without limiting it to the destination buffer size.
Impact
An attacker could crash the device or execute arbitrary code as root on the video-core process, but a local connection to the hub is required.
What the attacker needed
Local network access to the hub; a camera already configured on the hub; ability to send HTTP requests to localhost:3000
The fix
The vendor patched the vulnerability.
How it was found
- Set up a Samsung SmartCam on the hub so a camera exists.
- Send a POST request to the local video-core HTTP server on port 3000 at the /cameras/<camera-id>/clips path.
- Include a JSON body with the required fields, making one field (captureTime, startTime, endTime, correlationId, or callbackUrl) arbitrarily long.
- The server copies the long value into a 52-byte stack buffer, overflowing it and potentially crashing the device or allowing code execution.
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.
A buffer overflow happens when a program copies more data into a fixed-size memory space than it can hold, spilling over into nearby memory. Here, the hub's video service takes values from a web request and copies them without checking their length, so a very long value can overwrite important data and 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.