Samsung SmartThings Hub video-core Database clips Code Execution Vulnerability
A stack-based buffer overflow exists in the video-core process of the Samsung SmartThings Hub when it retrieves fields from the clips table of its SQLite database. An attacker could send crafted HTTP requests to trigger the overflow and potentially execute arbitrary code.
Originally disclosed on Cisco Talos
An exploitable stack-based buffer overflow vulnerability exists in the retrieval of database fields in video-core’s HTTP server of Samsung SmartThings Hub. The video-core process insecurely extracts the fields from the “clips” table of its SQLite database, 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 function copies database column values into a fixed-size stack structure using strcpy without checking the length of the input.
Impact
An attacker could crash the video-core process and potentially execute arbitrary code with root privileges, but the attack requires local access to the hub's localhost interface and a separate SQL injection vulnerability to control the database field.
What the attacker needed
Local access to the hub's localhost interface; a camera already exists in the hub; ability to send HTTP requests to port 3000; separate SQL injection vulnerability (TALOS-2018-0556) to…
The fix
The vulnerability was fixed by the vendor in a firmware update.
How it was found
- Add a clip via an HTTP POST request to the video-core server.
- Modify the captureTime field of that clip in the database to an overlong value, using a separate SQL injection vulnerability.
- Trigger the vulnerable function by causing video-core to process the modified clip, leading to a crash.
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, causing the extra data to spill over and corrupt other memory. Here, the video-core process copies database fields into a fixed-size structure without checking length, so an attacker who can control those fields could overwrite memory and 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.