Samsung SmartThings Hub video-core AWSELB Cookie Code Execution Vulnerability
The video-core process on the Samsung SmartThings Hub copies the value of the AWSELB cookie from a remote video-host server into a fixed-size heap buffer without checking its length. An attacker who can impersonate the remote server could overflow the buffer and execute arbitrary code as root.
Originally disclosed on Cisco Talos
An exploitable buffer overflow vulnerability exists in the remote video-host communication of video-core’s HTTP server of Samsung SmartThings Hub. The video-core process insecurely parses the AWSELB cookie while communicating with remote video-host servers, leading to a buffer overflow on the heap.
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 the AWSELB cookie value into a 512-byte heap buffer without any length check.
Impact
An attacker able to impersonate a video-host server could overflow the heap buffer and execute arbitrary code on the video-core process, which runs as root.
What the attacker needed
Ability to impersonate a video-host server; local connection to port 3000 on the hub
The fix
The vendor patched the vulnerability, though the text does not describe the specific fix.
How it was found
- Send a PUT request to the video-core HTTP server on localhost port 3000 for the camera stream path.
- The video-core process makes an outbound request to the remote video-host server.
- The remote server responds with a Set-Cookie header containing an overly long AWSELB value.
- The video-core process parses the cookie and copies the AWSELB value into a fixed-size heap buffer, causing an 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 hub trusts a cookie sent by a remote server and copies it without checking its size, so someone who can pretend to be that server could take 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.