Effective Fuzzing - A Dav1d Case Study
An integer overflow in the dav1d AV1 decoder, when multiple decoding threads are used, leads to an out-of-bounds write. An attacker could exploit this by supplying a crafted AV1 video or AVIF image, potentially leading to remote code execution.
googleprojectzero.blogspot.com
Published on googleprojectzero.blogspot.com
Late in 2023, while working on a 20% project with Project Zero, I found an integer overflow in the dav1d AV1 video decoder. That integer overflow leads to an out-of-bounds write to memory.
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
Likely a signed 32-bit integer overflow when calculating tile start offsets with multiple decoding threads, leading to out-of-bounds pointer arithmetic.
Impact
A parsing vulnerability in AV1 decoders could be used as part of an attack to gain remote code execution, and in the right context, this could allow a 0-click exploit.
What the attacker needed
Victim processes a crafted AV1 video or AVIF image; multiple decoding threads are used
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 video decoder is a program that turns compressed video data into pictures. In this case, a calculation error when handling large frames with multiple threads caused the program to write data outside the intended memory area. This could let an attacker run their own code on a victim's device by sending a malicious video file.
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.