Skip to content
Memory corruption Write-up Advanced

4 exploits, 1 bug: exploiting cve-2024-20017 4 different ways

A remotely exploitable buffer overflow in a MediaTek MT7622 SDK component lets an attacker send a crafted packet that overflows a stack buffer. The author shows four exploitation strategies.

hyper Follow

Published on blog.coffinsec.com

Well, here we are. This post was meant to be finished around March of this year to coincide with the publication of the vulnerability I’m going to be writing about, CVE-2024-20017.

hyper, on blog.coffinsec.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

The handler uses an attacker-supplied length field in a memory copy without properly checking it against the destination size.

Impact

An attacker who can reach the vulnerable component could potentially exploit the buffer overflow.

What the attacker needed

Network access to the vulnerable component

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.

A small program on a Wi-Fi router copies data from an incoming network packet into a fixed-size space in memory without first checking how much data is arriving. If an attacker sends more data than that space can hold, the extra bytes spill over and overwrite nearby values the program relies on, such as the address it will jump back to when finished. By choosing those bytes carefully, the attacker can make the program run their own commands instead of its normal code.

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 hyper

View all

7 more disclosed reports, best first.

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.