Skip to content
Memory corruption Advisory Advanced CVE-2018-3873CVE-2018-3874CVE-2018-3875CVE-2018-3876CVE-2018-3877CVE-2018-3878

Samsung SmartThings Hub video-core credentials Code Execution Vulnerability

The video-core HTTP server on the SmartThings Hub copies user-supplied JSON credential fields into fixed-size stack buffers using the source string's own length, so an oversized value overflows the stack. An attacker able to reach the localhost service could crash the device or potentially execute code as root.

Claudio Bozzato Follow

Originally disclosed on Cisco Talos

Critical 9.9 View original

Multiple exploitable buffer overflow vulnerabilities exist in the credentials 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 handler passes the user-controlled string's own length to strncpy as the copy limit, so the fixed-size stack destination is never bounded.

Impact

An attacker could crash the device and potentially execute arbitrary code as root in the video-core process, though the service listens only on localhost so a local connection or a relaying vector is needed.

What the attacker needed

Local access to port 3000; or ability to impersonate SmartThings servers; or a SmartApp making localhost requests

The fix

The vendor patched the issue; the copy should be bounded to the destination buffer size.

How it was found

  1. Send a POST request to the /credentials path on the video-core HTTP server with a JSON body containing all required parameters.
  2. Set one of the s3 credential fields (secretKey, accessKey, sessionToken, bucket, directory or region) to an arbitrarily long value.
  3. The handler parses the JSON and copies that value into a fixed-size stack buffer, overflowing it.

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.

The hub runs a small web service that accepts settings for a camera. When it saves each setting it copies the text into a fixed-size box on the stack (a small area of memory used by the running program) without checking how long the text is. Sending a very long value spills past the box and corrupts memory, which can crash the device or 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.

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.