Skip to content
Memory corruption Advisory Advanced CVE-2018-3863CVE-2018-3864CVE-2018-3865CVE-2018-3866

Samsung SmartThings Hub video-core samsungWifiScan Code Execution Vulnerability

The video-core HTTP server on the Samsung SmartThings Hub has multiple stack buffer overflows in its samsungWifiScan handler because it copies user-supplied JSON fields into fixed-size stack buffers without checking length. An attacker who can send HTTP requests to the localhost service could crash the device or execute arbitrary code as root.

Claudio Bozzato Follow

Originally disclosed on Cisco Talos

Critical 9.9 View original

Multiple exploitable buffer overflow vulnerabilities exist in the samsungWifiScan 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.

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 strcpy to copy JSON string values into fixed-size stack buffers without any length check.

Impact

An attacker could crash the device or execute arbitrary code with root privileges on the video-core process, but a local connection to the hub is required.

What the attacker needed

Local network access to the hub; ability to send HTTP requests to localhost:3000; or a SmartApp that can make localhost connections

The fix

The vendor patched the vulnerability, likely by adding length checks before copying JSON values into fixed-size buffers.

How it was found

  1. Send an HTTP POST request to the /samsungWifiScan endpoint on the video-core server at localhost port 3000.
  2. Include a JSON body with a cameraIp key and one of the vulnerable keys (user, password, cameraIp, or callbackUrl) set to an overly long string.
  3. The server parses the JSON and copies the long value into a 40-byte stack buffer, 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.

A buffer overflow happens when a program copies more data into a fixed-size memory space than it can hold, so the extra data spills over and can overwrite other important memory. Here, the video-core service on the SmartThings Hub takes values from a JSON request and copies them into small 40-byte buffers without checking how long they are. An attacker who can reach that service could send a very long value to crash the device or 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.

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.