Update on Buffer Overflow Vulnerability

August 15, 2018

Security Notification- Buffer Overflow Vulnerability in Some Hikvision IP Cameras Edited on August 15, 2018

SN No.: HSRC-201808-01
Edit: Hikvision Security Response Center (HSRC)
Initial release date: 2018-08-13
Update Date: 2018-08-23

Summary:
A buffer overflow vulnerability in the web server of some Hikvision IP cameras allows an
attacker to send a specially crafted message to affected devices. Due to the insufficient
input validation, a successful exploit can corrupt memory and lead to arbitrary code
execution or crash the process.

CVE ID:
CVE-2018-6414

Scoring:
CVSS v3 is adopted in this vulnerability scoring (http://www.first.org/cvss/specificationdocument)
Base score: 8.9 (AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:H)
Temporal score: 8.0 (E:P/RL:O/RC:C)

Affected versions and resolved version:
Information of affected versions and resolved versions:
Aug. 15, 2018 Update: Subsequent testing revealed that some of the products listed below are not susceptible to the Buffer Overflow vulnerability. Those products have been crossed out below.

IPC:


Product Name
 


Affected Version(s)
 


Resolved Version(s)
 

DS-2CD2xx5

V5.5.0 build170725 to V5.5.52 build180511

V5.5.61 build180718

DS-2CD2xx3

DS-2CD2X12FWD

V5.5.0 build170725 to V5.5.52 build 180427

V5.5.53 build180730

DS-2CD2X22FWD

DS-2CD2X42FWD

DS-2CD2X52F

DS-2CD4x26FWD

V5.5.0 build170914 to V5.5.52 build180601

V5.5.53 build180719

 

IPD*:


Product Name
 


Affected Version(s)
 


Resolved Version(s)
 

DS-2DF5xxx

V5.5.2 build171201 and previous versions*

V5.5.71 build180723

DS-2DF6xxx

DS-2DF7xxx

DS-2DF8xxx

DS-2DT6223

DS-2DE4xxxW

V5.5.6 build180408 and previous versions*

V5.5.71 build180725

DS-2DE5xxxW

DS-2DE7xxxW

* 2018/08/23 update: The affected version of IPD doesn't include V5.4.0 and previous versions. 


Precondition:

An attacker must have access to the device or the network on which the device is connected.
This is especially true for devices that are directly connected to the Internet.


Attack step:
Send a specially crafted message to the camera over the network.
Obtaining fixed firmware:
(See chart above)


Source of vulnerability information:
This vulnerability was reported to HSRC by Ori Hollander of VDOO Connected Trust LTD.,
an Israeli security company focused on IoT security.


Contact Us:
Should you have a security problem or concern, please contact the Hikvision Security
Response Center at hsrc@hikvision.com.

IMPORTANT! This model requires non-standard firmware. Do Not Install standard firmware (e.g. v.4.1.xx) on this model. Doing so will permanently damage your system. You must use custom firmware v.4.1.25 from the iDS-9632NXI-I8/16S product page.

View the most updated version of this document here:

https://techsupportca.freshdesk.com/en/support/solutions/articles/17000113531-i-series-nvr-firmware-upgrade-instructions

 

The I-series NVR (such as the DS-7716NI-I4) is one of Hikvision's most popular and feature-rich recorders. As such, many firmware revisions have been introduced over the years to continually ensure the product is compatible with the newest technology available. Due to the many revisions, we recommend that the user closely follows the instructions below in order to reduce the amount of time spent as well as the chance of failure.

 

Database Optimization and Repair

As more affordable IP cameras are introduced over time with greater video resolution and data sizes, more efficient database management also becomes necessary. The introduction of firmware v4.0 brought about a new database architecture in order to be futureproof.

 

After upgrading to v4.X, the recorder database will need to be converted and optimized. If you are experiencing issues where playback is expected but not found, make sure "Database Repair" is performed as indicated in the procedures and scenarios below.

 

Preparing the Upgrade

Before proceeding with upgrade, it is recommended that NVR configuration file is exported from the NVR over the network or on to a local USB drive.

 

Upgrading from v3.4.92 build 170518 or Older

  1. All recorders must reach v3.4.92 before proceeding further. Upgrading from versions before v3.4.92 directly to any version of v4.X will likely cause the recorder to fail.
  2. If the recorder is already at v3.4.92, a full factory default is highly recommended before upgrading to any version of v4.X. There is a high chance of unit failure (requiring RMA) if the unit is not defaulted before upgrade.
  3. After reaching v3.4.92 and performing a full factory default, an upgrade directly to v4.50.00 is acceptable.
  4. After the upgrade is completed and the recorder is reprogrammed, it may be beneficial to perform a Database Repair. For details, refer to the section "Database Optimization and Repair" above.
  5. To verify repair progress, you may refer to the HDD status, or search the recorder log for repair started and stopped entries. Note that while the HDD is repairing, new recordings are still being made, but some existing recordings may not be searchable until repair is complete.
  6. If you continue to observe playback issues after database repair, ensure there are no power, network, or motion detection issues. Should the problem persist, contact technical support.

 

Upgrading from Any v4.X Build to v4.50.00.

  1. Any v4.X build can be upgraded directly to v4.50.00.
  2. Export configuration is highly recommended before performing the upgrade.
  3. If upgrading from any v4.X version that was not v4.22.005, a Database Repair is recommended. Refer to Step 4 and onwards in the previous section.

 

Downgrading

Downgrading is not recommended. Due to new features and parameters constantly being added, downgrading may cause the NVR to factory default itself or require a manual default to operate properly.

View the most updated version of this document here:
K-Series DVR upgrade instruction
The Turbo 4 Hybrid DVR K series has multiple models and across different platform and chipset. It also has similar firmware development of other recording product line; DVR K series has also introduced the GUI4.0 to ensure the series to be compatible to the newest technology available. The new database architecture is also brought into the DVR firmware v4.0 to be future proof and for better recording search experience. 
 


Database Optimization and Repair

As more affordable cameras introduced over time with greater video resolution and data sizes, more efficient database management also becomes necessary. The introduction of firmware v4.0 brought about a new database architecture in order to be futureproof.
After upgrading to v4.X, the recorder database will need to be converted and optimize. If you are experiencing issues, where playback is expected but not found, please make sure to perform "Database Rebuild" as indicated in the procedures and scenarios below.
 


Preparing the Upgrade

Before proceeding with upgrade, it is recommend exporting DVR configuration file from the DVR over the network or on to a local USB drive.

 

Action after firmware upgraded 

1. Upgrade the DVR according to the chart above. 

2. Reconfirming Channel's Recording Schedule 

    - Confirm channel's recording schedule is enable. 

    - Check if the channel is on correct recording schedule.

3. Double Check Storage Setting

    - Make sure all channel are assigned to record on its HDD group when the Storage setting is under Group Mode. 

4. Perform Database Rebuild locally. 

    • Some version above support Database Rebuild via web access - K51 and K72

    • Perform Database Rebuild regardless if system is having any database issue symptom. 

    • Database Rebuild process is average ~30 to 60min per TB. The process may still varies depends recording data.

    • After Database Rebuild - Check log to confirm Database Rebuild has went thru properly. 

    • If Database Rebuild Started and Stopped log has been log only within few minutes. Database rebuild may not has been completed properly. It is strongly recommend performing the Database Rebuild again.

    • To check log > System > Log > Information > Database Rebuild Started and Stopped.

    • If the log option is not available - access system via SSH can also obtain similar result.

5. Recording Data is still missing after database rebuild process. 

If the data has not been recorded or has been overwritten, Database rebuild process is not able retrieve those lost data. Have the system upgraded to the latest available firmware version above to prevent any future data lost is strongly recommended for all application.

 

 

 

 

In light of the global semiconductor shortage, Hikvision has made some hardware changes to the DS-76xxNI-Q1(2)/P NVRs, also known as “Q series.”

 

These changes do not have any effect on the performance, specifications, or the user interface of the NVRs. For the ease of reference, these modified units are known as “C-Version” units. This is clearly indicated on the NVR label and on the box by the serial number.

 

The only difference between the “C-Version” and “non-C-Version” is the firmware. The firmware is not interchangeable:

 

  • The C-Version NVRs must use firmware version v4.31.102 or higher.
  • The non-C-Version (Q series) NVRs must use firmware version v4.30.085 or older.

 

Please do not be alarmed if a “Firmware Mismatch” message pops up on the screen during the firmware upgrade. This simply means that the firmware does not match the NVR’s hardware. Simply download the correct firmware and the upgrade will go through without any issue.

In light of the global semiconductor shortage, Hikvision has made some hardware changes to the Value Express Series NVRs

These changes do not have any effect on the performance and specification of the recorders. For ease of reference, these modified units are known as “C-Version” units. This is clearly indicated on the NVR label and on the box by the serial number.

The only difference between the “C-Version” and “non-C-Version” is the firmware. The firmware is not interchangeable:

  • The C-Version NVRs must use firmware version v4.30.216 or higher.
  • The non-C-Version (Q series) NVRs must use firmware version v3.4.104 or older.

Please do not be alarmed if a “Firmware Mismatch” message pops up on the screen during the firmware upgrade. This simply means that the firmware does not match the NVR’s hardware. Simply download the correct firmware and the upgrade will go through without any issue.

By downloading and using software and other materials available via this website, you agree to be legally bound by HIKVISION General Terms of Use . If you don’t agree to these terms, you may not download or use any of those materials.

If you are agreeing on behalf of your company, you represent and warrant that you have legal authority to bind your company to the General Terms of Use above. Also you represent and warrant that you are of the legal age of majority in the jurisdiction in which you reside (at least 18 years of age in many countries).