Skip to content
Crypto Advisory Advanced CVE-2018-3920

Yi Technology Home Camera 27US Firmware 7z CRC Collision Vulnerability

The firmware update process for the Yi Home Camera only protects the first part of the firmware file with a private key, leaving the rest of the 7-Zip archive editable. An attacker can modify the unencrypted portion and craft a CRC collision to bypass integrity checks, allowing a malicious firmware update and code execution.

Lilith >_> Follow

Originally disclosed on Cisco Talos

High 7.6 View original

An exploitable code execution vulnerability exists in the firmware update functionality of the Yi Home Camera 27US 1.8.7.0D. A specially crafted 7-Zip file can cause a CRC collision, resulting in a firmware update and code execution.

Lilith <(^_^)>, 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

Likely the firmware update only encrypts the first 1366 bytes of the 7-Zip archive, leaving the rest unprotected, and the integrity check relies on a CRC that can be collided.

Impact

An attacker with physical access can install a modified firmware, leading to code execution on the device.

What the attacker needed

Physical access to the camera; an SD card; a crafted firmware file

The fix

The firmware update process should protect the entire 7-Zip archive with the private key encryption and use a stronger integrity check than CRC.

How it was found

  1. Insert an SD card containing a crafted home_y18m file into the camera.
  2. The camera's init script detects the file and compares its version string to the current version.
  3. If different, the script loads kernel modules and runs extpkg.sh to unpack the firmware.
  4. extpkg.sh extracts the version, encrypted key, and the rest of the file, then decrypts the key and reconstructs the 7-Zip archive.
  5. The exthome binary runs 7za to extract the archive, using a password derived from the file.
  6. The update script runs, installing the modified firmware.

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 camera updates its software by reading a file from an SD card. The file is partly locked with a secret key, but the rest is not, so someone can change the unlocked part and still make the camera accept it. This lets them run their own code on the camera.

What is Crypto?

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.

More by Lilith >_>

View all

1 more disclosed report, 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.

Cryptographic weaknesses

The lesson behind this report.

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.