Out of bounds read and write in WebAudio (CVE-2026-4459)
A hand-written SIMD loop in WebAudio's HandleNaNValues processes four floats at a time but only checks that the starting index is in bounds, so when the buffer length is not a multiple of four it reads and writes up to 12 bytes past the end. An attacker could trigger this with a crafted page using a non-aligned render quantum, causing an out-of-bounds heap access and a renderer crash.
Originally disclosed on Chrome VRP
- Fix shipped in 13 days
Steps to reproduce the problem
-
Build ASan Chrome for Linux (dcheck_always_on=false)
-
Save the attached PoC as
poc.html -
Run:
./chrome --enable-blink-features=WebAudioConfigurableRenderQuantum \ --no-sandbox poc.html
Problem Description
Root Cause
HandleNaNValues() in audio_param_handler.cc:51-94 has a hand-rolled SIMD loop that processes 4 floats at a time using SSE/NEON intrinsics:
void HandleNaNValues(base::span<float> values, float default_value) {
unsigned k = 0;
#if defined(ARCH_CPU_X86_FAMILY)
if (values.size() >= 4) {
for (k = 0; k < values.size(); k += 4) { // BUG: k+3 can exceed size()
__m128 v = _mm_loadu_ps(values.data() + k); // reads [k..k+3]
// ... NaN replacement logic ...
_mm_storeu_ps(values.data() + k, result); // writes [k..k+3]
}
}
#endif
std::ranges::replace_if(values.subspan(k), ...); // subspan(k) where k > size() => CHECK crash
}
The loop condition k < values.size() only guarantees k is within bounds, NOT k + 3. When values.size() % 4 != 0, the last iteration reads and writes up to 3 floats (12 bytes) past the end of the buffer. The "SAFETY" comments on lines 57 and 65 are incorrect -- they claim the loop condition is sufficient, but _mm_loadu_ps accesses 4 consecutive floats.
After the loop, k exceeds values.size(), and values.subspan(k) triggers a hardened bounds CHECK crash in base::span.
How It Triggers
Any AudioParam with an audio-rate rendering connection (another node's output connected to the param) will call HandleNaNValues() during CalculateFinalValues(). The values span size equals render_quantum_frames (from renderSizeHint). When this is not a multiple of 4 (e.g., 5, 6, 7, 9, 10, 11, ...), the SIMD overflow occurs.
The GainNode PoC:
OfflineAudioContext({renderSizeHint: 5})-- creates context with 5-frame render quantumcreateGain()-- GainHandler allocatessample_accurate_gain_values_AudioFloatArray of 5 floats (20 bytes)oscillator.connect(gainNode.gain)-- creates audio-rate rendering connection to gain param- During rendering, GainHandler::Process calls gain_->CalculateSampleAccurateValues(span of 5)
- Inside CalculateFinalValues, NumberOfRenderingConnections() > 0 triggers HandleNaNValues(span of 5, defaultValue)
- SSE loop: k=0 processes [0..3] OK, k=4 processes [4..7] -- 12 bytes OOB read+write
- subspan(8) on 5-element span -- CHECK(8 <= 5) -- crash
Summary
HandleNaNValues SIMD OOB read+write via non-aligned renderSizeHint in WebAudio AudioParam
Custom Questions
Type of crash:
renderer
Crash state:
heap-buffer-overflow
Reporter credit:
Jihyeon Jeong (Compsec Lab, Seoul National University / Research Intern)
Additional Data
Category: Security
Chrome Channel: Not sure
Regression: N/A \
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
The SIMD loop condition only checks the starting index against the span size, not that the full four-float load and store stay within bounds, and the subsequent subspan uses an index that can exceed the size.
Impact
The out-of-bounds read and write could corrupt heap memory and crash the renderer, and the text does not claim code execution.
What the attacker needed
Chrome with the WebAudioConfigurableRenderQuantum flag; Victim loads a crafted page; Render quantum size not a multiple of four
How it was found
- Build an AddressSanitizer-instrumented Chrome for Linux.
- Save the proof-of-concept page as a local HTML file.
- Run Chrome with the WebAudioConfigurableRenderQuantum feature flag and the no-sandbox option, loading the page.
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 buffer is a fixed-size block of memory holding a list of numbers. The code that fills it uses a fast shortcut that handles four numbers at once, but it only checks that the first of those four is inside the buffer, not the last. If the list length is not a multiple of four, the shortcut touches memory just past the end, which can crash the browser tab.
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.