Skip to content
Memory corruption Advisory Advanced CVE-2020-6072

Videolabs libmicrodns 0.1.0 rr_decode return value remote code execution vulnerability

The rr_decode function in libmicrodns does not check the return value of a recursive call, which can lead to a double free when parsing a crafted mDNS message. An attacker could exploit this to execute arbitrary code.

Claudio Bozzato Follow

Originally disclosed on Cisco Talos

Critical 9.8 View original

An exploitable code execution vulnerability exists in the label-parsing functionality of Videolabs libmicrodns 0.1.0. When parsing compressed labels in mDNS messages, the rrdecode function’s return value is not checked, leading to a double free that could be exploited to execute arbitrary code.

Claudio Bozzato, on Cisco Talos

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

The recursive call to rr_decode can return NULL on error, but the caller does not check this return value and proceeds to use and free the buffer, causing a double free.

Impact

An attacker could send a crafted mDNS message to trigger a double free, potentially leading to arbitrary code execution.

What the attacker needed

Send a crafted mDNS message

The fix

The fix should check the return value of the recursive rr_decode call and handle errors properly to avoid the double free.

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 report describes a bug in a small library that handles mDNS, a protocol used to discover devices on a local network. When the library parses a specially crafted network message, it can free the same memory twice, which can crash the program or let an attacker run their own 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 Claudio Bozzato

View all

185 more disclosed reports, best first.

More from Cisco Talos

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.