Samsung SmartThings Hub hubCore ZigBee firmware update CRC16 check denial-of-service vulnerability
The ZigBee firmware update routine in the hubCore process subtracts two from the file size without checking for files of zero or one byte, causing an integer underflow. An attacker who can place a tiny file in the data directory can make the process loop forever until a watchdog kills it and the device reboots.
Originally disclosed on Cisco Talos
An exploitable integer underflow vulnerability exists in the ZigBee firmware update routine of the hubCore binary of the Samsung SmartThings Hub. The hubCore process incorrectly handles malformed files existing in its “data” directory, leading to an infinite loop, which eventually causes the process to crash.
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 subtracts two from the file size to skip a trailing CRC16 without first checking that the file is at least two bytes long, so a zero or one byte file underflows the length.
Impact
The hubCore process crashes and the device reboots, causing a denial of service; the attack requires a separate vulnerability to write the file first.
What the attacker needed
Ability to write files on the device; another vulnerability to create the file
The fix
The vendor patched the issue according to the timeline.
How it was found
- Create an empty file at the ZigBee firmware path on the device, using a separate file-write vulnerability.
- Wait for the periodic task that checks the firmware files to run.
- The CRC16 routine underflows the length and loops forever reading past the end of the file.
- The watchdog kills hubCore, and because hubCore no longer restarts the system watchdog, the device reboots.
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 checks firmware files by reading them and computing a checksum. It assumes every file is at least two bytes long and subtracts two from the length; for an empty file this wraps around to a huge number, so the reading loop never finishes. A watchdog then kills the stuck program and the whole device restarts.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.