(0Day) (Pwn2Own) oFono CUSD AT Command Stack-based Buffer Overflow Code Execution Vulnerability
A stack-based buffer overflow in oFono's parsing of AT command responses allows a local attacker who can execute code on the modem to run arbitrary code as root. The flaw is due to missing validation of the length of user-supplied data before copying it to a stack buffer.
Originally disclosed on Zero Day Initiative
This vulnerability allows local attackers to execute arbitrary code on affected installations of oFono. 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 data from an AT command response into a fixed-size stack buffer without checking its length.
Impact
An attacker with code execution on the modem could execute arbitrary code as root on the affected oFono installation.
What the attacker needed
Ability to execute code on the target modem
The fix
The vulnerability was fixed in an upstream oFono commit.
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.
This is a memory corruption bug in software that handles modem commands. An attacker who already has some control over the modem can send a specially crafted response that overflows a fixed-size memory area, letting them run their own code with high privileges. It is not remotely exploitable without that initial access.
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.