Use after free in WebAudio (CVE-2024-8362)
A use-after-free flaw exists in Chromium's WebAudio implementation, triggered by scheduling a delay time value on an audio context. An attacker could crash the browser, and on macOS the flaw manifests as a stack-use-after-return or use-after-free.
Originally disclosed on Chrome VRP
- Fix shipped in 29 days
tested OS: ubuntu 22.04 and MacOS tested chrome version: Chromium 129.0.6630.0(gs://chromium-browser-asan/linux-release/asan-linux-release-1335746.zip) stable & canary & dev
Repro Steps: - Open browser. ~/asan-linux-release/chrome --incognito --user-data-dir=/tmp/xx2 http://localhost:8880 - Manually click on crash.html in the browser's list immediately reproduces the issue. Note: - Manually clicking on crash.html in the browser's list immediately reproduces the issue. However, directly passing crash.html as a command line argument in the terminal does not reproduce the issue as consistently. Therefore, I'm not entirely sure if CF can reproduce this issue. If CF cannot reproduce it, you can try manually.
- This issue is similar to https://issues.chromium.org/issues/40945677. In the PoC code, I only added one line of code to trigger this issue:
- delay.delayTime.setValueAtTime(5, ctx.currentTime);
On Linux, it's a non-ASan instrumented crash, but on macOS, it reproduces a stack-use-after-return or UAF.
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 WebAudio delay node does not correctly manage the lifetime of an object when a scheduled value is set on its delay time, leaving a dangling reference.
What the attacker needed
Victim visits a crafted web page; browser with WebAudio support
How it was found
- Open the browser with the ASan build and a local test page.
- Manually click crash.html in the browser's list to trigger the crash.
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.
A use-after-free is a memory bug where a program keeps using a piece of memory after it has been freed, which can crash the browser or, in worse cases, let an attacker run their own code. Here the bug lives in the part of Chrome that handles audio, and it is triggered by a small web page that schedules a timing value on an audio delay node.
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.