Skip to content
Memory corruption Advisory Advanced CVE-2021-30522

Google Chrome WebAudio blink::AudioNodeOutput::Pull code execution vulnerability

A use-after-free in Chrome's WebAudio code lets a malicious page free an audio node while the audio rendering thread still uses it, causing a crash and potentially code execution. The report shows a crash and argues the freed pointer could be controlled to redirect a call.

Piotr Bania Follow

Originally disclosed on Cisco Talos

High 8.3 View original

A code execution vulnerability exists in the WebAudio blink::AudioNodeOutput::Pull functionality of Google Chrome 90.0.4405.0 (Build) (64-bit) and 88.0.4324.146 (Official version) (64-bit). A specially crafted web page can lead to use after free.

Piotr Bania, 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

Likely the audio rendering thread holds a raw pointer to an AudioNodeOutput that the main thread frees during garbage collection, with no synchronisation or lifetime guard.

Impact

A crafted page could crash the browser and, if the attacker can control the freed pointer, may achieve code execution.

What the attacker needed

Victim visits a malicious web page; JavaScript enabled in Chrome

How it was found

  1. Create a gain node with the WebAudio createGain call and connect it to the output.
  2. Use indirect calling such as setInterval, setTimeout or a meta refresh to keep the page running.
  3. Allocate large typed arrays in a loop to force garbage collection.
  4. Wrap the allocations in try-except because large requests can fail with an array buffer allocation error.
  5. Observe the browser crash inside the audio node pull function.

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.

WebAudio lets a web page create and connect sound-processing nodes. Here the page can cause one of those nodes to be thrown away by the browser's memory cleaner while a background audio thread is still using it. That is a use-after-free: reading or writing memory that has already been released, which can crash the browser and, in the worst case, 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 Piotr Bania

View all

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