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

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

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 installations of oFono. 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 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.

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.