Samsung SmartThings Hub video-core Camera Update Code Execution Vulnerabilities
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 HTTP requests to the local service can overwrite the saved program counter and potentially execute arbitrary code as root.
Originally disclosed on Cisco Talos
Multiple exploitable buffer overflow vulnerabilities exist in the camera “update” feature 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 the length of the user-controlled JSON string as the size argument to memcpy without validating it against the destination buffer size.
Impact
An attacker could overwrite the saved program counter and potentially execute arbitrary code as root on the video-core process, but exploitation requires the ability to send requests to the localhost-bound HTTP server, either by impersonating the remote SmartThings servers or via a SmartApp.
What the attacker needed
Camera already configured on the hub; ability to send HTTP requests to localhost:3000; impersonate remote servers or use a SmartApp
The fix
The vendor patched the vulnerability; the fix likely adds bounds checking before copying user-controlled strings into fixed-size buffers.
How it was found
- Ensure a camera exists and obtain its ID.
- Send a PATCH request to the video-core HTTP server on localhost port 3000 for the /cameras/<camera-id> path.
- Include a JSON body with the required 'url' and 'state' keys, setting one of them to an overly long string.
- The server copies the long value into a 512-byte stack buffer, overflowing it and overwriting the saved program counter.
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 area than it can hold, spilling over into adjacent memory. Here, the program takes a value from a web request and copies it into a small stack buffer without checking its length, so a long value can overwrite the return address and let an attacker control where the program goes next. The vulnerable service runs as root, so successful exploitation could give full control of the device.
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.