Skip to content
Memory corruption Write-up Advanced

Parrot Module

Two vulnerabilities in the Tesla Model S Parrot Wi-Fi module: a firmware heap overflow when processing a malformed ADDTS action frame, and a kernel driver buffer overflow when handling a crafted command response. An attacker within Wi-Fi range could exploit these to execute code in the Wi-Fi chip and then in the host Linux system, gaining a remote shell.

Tencent Keen Security Lab Follow

Published on keenlab.tencent.com

2020-01-02

Tencent Keen Security Lab, on keenlab.tencent.com

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 write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the firmware calculates a copy length by subtracting 4 from the action frame length without checking if the frame is shorter than 4 bytes, causing an integer underflow; the driver fails to validate the size field in a command response before copying, leading to a buffer overflow.

Impact

An attacker within Wi-Fi range could execute code in the Wi-Fi chip and then in the host Linux system, gaining a remote shell, though the success rate is about 10%.

What the attacker needed

Attacker within Wi-Fi range; victim Tesla connects to a Wi-Fi network; attacker can send crafted Wi-Fi frames

The fix

The vulnerabilities were fixed by Tesla in version 2019.36.2 and by Marvell.

How it was found

  1. The attacker sends DEAUTH frames to all the AP nearby.
  2. When Tesla reconnects to AP, the attacker gets the MAC address of Tesla.
  3. Spray the fake pointer, then trigger the vulnerability in firmware by directly send corrupt Action Frame.
  4. The function memcpy() executed until interrupt occurs.
  5. Gain code execution in the Wi-Fi chip.
  6. Stage 1 shellcode sends the event EVENT_DISASSOCIATED to the driver.

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 write-up has not been written yet. The Original tab links to the source.

The Tesla Model S has a Wi-Fi module that connects the car to wireless networks. The researchers found two bugs: one in the software inside the Wi-Fi chip, and one in the car's main computer that talks to the chip. By sending special Wi-Fi packets, an attacker nearby could take control of the chip and then the car's computer, potentially running commands remotely.

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 Tencent Keen Security Lab

View all

11 more disclosed reports, best first.

More from Tesla

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.