(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.
Originally disclosed on Zero Day Initiative
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.
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.