Skip to content
Memory corruption Advisory Advanced CVE-2018-4029

Novatek NT9665X HFS Recv buffer overflow code execution vulnerability

The HTTP request parser in the NT9665X firmware writes incoming data into a fixed-size buffer without checking the total length, allowing an attacker to overflow memory. A specially crafted packet can cause an unlimited and arbitrary write to memory, resulting in code execution.

Lilith >_> Follow

Originally disclosed on Cisco Talos

Critical 10.0 View original

An exploitable code execution vulnerability exists in the HTTP request-parsing function of the NT9665X Chipset firmware running on the Anker Roav A1 Dashcam, version “RoavA1SWV1.9.” A specially crafted packet can cause an unlimited and arbitrary write to memory, resulting in 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 recv_loop in parse_http lacks a bounds check, so repeated 0x800-byte reads increment the destination pointer without limit, eventually overwriting the http_session struct and causing a memcpy to read from a user-controlled address.

What the attacker needed

Wi-Fi AP enabled on dashcam; Attacker connected to dashcam Wi-Fi; Default Wi-Fi password unchanged

The fix

The vendor fixed the issue and provided a patch to their IDH.

How it was found

  1. Enable the Wi-Fi AP setting on the dashcam and connect to its SSID using the default password.
  2. Send an HTTP request larger than about 0x11044 bytes to port 80 without a terminating CRLFCRLF sequence.
  3. The device crashes inside recv_or_select due to the 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.

The dashcam's web server reads incoming HTTP requests into a fixed-size memory area but never checks if the request is too long. By sending a very long request, an attacker can overwrite adjacent memory, which can lead to running their own code on 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.

More by Lilith >_>

View all

5 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.