Skip to content
Memory corruption Advisory Advanced CVE-2018-3867

Samsung SmartThings Hub video-core samsungWifiScan Callback Code Execution Vulnerability

The video-core process on the Samsung SmartThings Hub has a stack-based buffer overflow when handling the response from a smart camera during a WiFi scan. An attacker who can send HTTP requests to the local video-core server can trigger the overflow and potentially execute arbitrary code as root.

Claudio Bozzato Follow

Originally disclosed on Cisco Talos

Critical 9.9 View original

An exploitable stack-based buffer overflow vulnerability exists in the samsungWifiScan callback notification of video-core’s HTTP server of Samsung SmartThings Hub. The video-core process incorrectly handles the answer received from a smart camera, leading to a buffer overflow on the stack.

Claudio Bozzato, on Cisco Talos

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 sprintf to copy the smart camera's HTTP response into a fixed-size stack buffer without any length check.

Impact

An attacker could execute arbitrary code as root on the video-core process, but they must first be able to send HTTP requests to the localhost-only server, either by impersonating the remote SmartThings servers or via a SmartApp.

What the attacker needed

Ability to send HTTP requests to localhost:3000; control over a server that responds to the camera request

The fix

The vendor patched the vulnerability, likely by adding bounds checking to the sprintf call.

How it was found

  1. Send a POST request to the local video-core HTTP server on port 3000 at the /samsungWifiScan path, specifying a camera IP and a callback URL.
  2. video-core sends an HTTP GET request to the specified camera IP to perform a WiFi scan.
  3. The attacker-controlled server responds with an overly long HTTP response.
  4. video-core copies that response into a fixed-size stack buffer using sprintf, causing a buffer overflow and crashing the process.

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 small program on the hub that handles camera responses copies the camera's reply into a fixed-size memory area without checking its length. If the reply is too long, it spills over into other memory and can crash the program or let an attacker run their own code. The attacker needs a way to send requests to that program, which normally only accepts connections from the hub itself.

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.

More by Claudio Bozzato

View all

185 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.