Skip to content
Memory corruption Advisory Advanced CVE-2024-6031

(Pwn2Own) Tesla Model S oFono AT Command Heap-based Buffer Overflow Code Execution Vulnerability

A heap-based buffer overflow exists in the parsing of AT command responses on the Tesla Model S modem. A local attacker who can already execute code on the modem could exploit this to execute arbitrary code in the context of the device.

Théo Gordyjan from Follow

Originally disclosed on Zero Day Initiative

High 7.8 View original

This vulnerability allows local attackers to execute arbitrary code on affected Tesla Model S vehicles. An attacker must first obtain the ability to execute code on the target modem in order to exploit this vulnerability.

Synacktiv (@Synacktiv), on the Zero Day Initiative

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 code copies AT command response data into a heap buffer without first checking that the data length fits the buffer.

Impact

An attacker with prior code execution on the modem could execute arbitrary code in the context of the device, but the text does not claim this works without that initial foothold.

What the attacker needed

Ability to execute code on the target modem

The fix

The vulnerability was fixed in firmware version 2024.2.

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.

AT commands are simple text instructions used to control modems, like dialling or checking signal. The modem reads replies to these commands and copies them into a fixed-size memory area without checking if the reply is too long, so a long reply can spill over and overwrite nearby memory. An attacker who already controls the modem could use this to run their own code on the car's 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 Théo Gordyjan from

View all

17 more disclosed reports, best first.

More from Zero Day Initiative

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.