A 0-click exploit chain for the Pixel 9 Part 2: Cracking the Sandbox with a Big Wave
A use-after-free in the BigWave driver allowed an attacker with access to the mediacodec sandbox to gain kernel arbitrary read/write on a Pixel 9. The exploit was chained with a Dolby decoder RCE to achieve a 0-click exploit.
Published on projectzero.google
With the advent of a potential Dolby Unified Decoder RCE exploit, it seemed prudent to see what kind of Linux kernel drivers might be accessible from the resulting userland context, the mediacodec context. As per the AOSP documentation, the mediacodec SELinux context is intended to be a constrained (a.k.a sandboxed)…
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 race condition where the driver's worker thread accesses a job structure after the file descriptor is closed and the structure is freed, due to a timeout in the ioctl handler.
Impact
An attacker could escape the mediacodec sandbox and gain kernel arbitrary read/write, leading to full device compromise, though the large write may cause occasional crashes.
What the attacker needed
Access to mediacodec context; ability to open /dev/bigwave; ability to send ioctl commands
The fix
The bug was fixed by correcting the synchronization between the ioctl timeout and the worker thread, as fixes were made available on January 5, 2026.
How it was found
- Open the /dev/bigwave device to allocate a kernel struct.
- Submit a job via the BIGO_IOCX_PROCESS ioctl, which queues the job for the worker thread.
- Wait for the ioctl to time out after 16 seconds, causing it to dequeue the job while the worker thread may still be processing it.
- Close the file descriptor, freeing the inst and job structures while the worker thread still references them.
- Spray attacker-controlled kmalloc allocations to control the freed job->regs pointer.
- Trigger the worker thread to write to the controlled pointer, achieving an arbitrary write.
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 use-after-free happens when a program frees memory but keeps using it, letting an attacker control what that memory contains. Here, a hardware driver for video decoding had this flaw, and by exploiting it, an attacker could read and write kernel memory, which is the core of the operating system. This was part of a chain that could take over a phone without any user interaction.
What is Race condition?
Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.