Skip to content
Memory corruption Advisory Advanced CVE-2026-3916

Out of bounds read in Web Speech (CVE-2026-3916)

The browser process's SpeechRecognizerImpl did not check that the audio data array size matched the declared channel and frame counts, allowing a compromised renderer to read arbitrary amounts of browser heap memory. The leaked data was encoded and sent to Google's speech API, enabling exfiltration.

Grischa Hauser Follow

Originally disclosed on Chrome VRP

Bounty$36,000 High View original
  • Fix shipped in 30 days

Summary

SpeechRecognizerImpl fails to validate that the size of the data array in the AudioDataS16 Mojo struct matches the declared channel_count * frame_count. This allows a compromised renderer to trigger a heap out-of-bounds read in the Browser Process.

VULNERABILITY DETAILS

Heap-buffer-overflow (OOB read) in the browser process via SpeechRecognizerImpl::AddAudioFromRenderer(). A compromised renderer can read attacker-controlled amounts of browser-process heap memory through the media.mojom.SpeechRecognitionAudioForwarder Mojo interface. No permissions are required, the audio forwarder path bypasses the microphone permission check.

The per-packet AudioDataS16 Mojo struct has independent channel_count, frame_count, and data fields with no validation that data.size() >= channel_count * frame_count. The deprecated raw-pointer FromInterleaved() overload at speech_recognizer_impl.cc:341 reads channel_count * frame_count int16 values from the undersized data buffer, causing an OOB heap read. The read size is (channel_count * frame_count - data.size()) * 2 bytes, fully attacker-controlled per packet.

There is also a secondary integer overflow at line 345 where channel_count * frame_count * 16 / 8 is computed in int32 this can undersize the AudioChunk allocation, but requires a 1GB+ AudioBus to trigger so it's only DoS.

The OOB-read data is converted to float, written to an AudioChunk, then FLAC-encoded (level 0, lossless) and uploaded to Google's speech API. The int16→float32→int16→FLAC pipeline is bit-for-bit lossless (float32 mantissa exceeds int16 precision), so the heap bytes survive encoding intact.

Introduced in commit 881ab7a9d5 ("Add MediaStreamTrack support to the Web Speech API", Evan Liu, 2024-08-01, https://chromium-review.googlesource.com/c/chromium/src/+/5631655).

VERSION Chrome Version: 146.0.7673.0 (trunk) affected since Chrome 129 (Aug 2024) Operating System: Ubuntu 22.04 / WSL2

REPRODUCTION CASE

Attached: poc-speech-oob-read.html (primary), poc-variable-read-sizes.html (shows 100/1024/4096/65536-byte reads)

The PoCs use MojoJS to simulate a compromised renderer crafting raw Mojo messages. A real attacker with renderer RCE would construct identical messages directly.

cd chromium/src ASAN_OPTIONS=detect_odr_violation=0 ./out/asan-debug/chrome
--no-sandbox --enable-blink-features=MojoJS,MojoJSTest --disable-gpu
file:///path/to/poc-speech-oob-read.html 2>&1 | tee /tmp/asan.log

Build: is_debug=true is_asan=true is_lsan=true is_component_build=true --no-sandbox is a WSL2 requirement; the bug is in the browser-process Mojo handler and is hit regardless of sandbox state. detect_odr_violation=0 is needed for ASan component builds (expected cppgc ODR violation).

The PoC binds media.mojom.SpeechRecognizer, sends Start() with an audio_forwarder receiver (bypasses mic permission), waits for the session to initialize, then sends AddAudioFromRenderer with channel_count=2, frame_count=1024, data=[10 values] reads 4076 bytes past the 20-byte allocation.

In release builds the OOB read is silent with no crash.

FOR CRASHES Type of crash: browser process (Chrome_IOThread) Crash State (full ASan log attached)

==35997==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x717bf9f18bf4 at pc 0x754d48186b8b bp 0x714be7753730 sp 0x714be7753728 READ of size 2 at 0x717bf9f18bf4 thread T8 (Chrome_IOThread) #0 0x754d48186b8a in void media::AudioBus::CopyConvertFromInterleavedSourceToAudioBus<media::FixedSampleTypeTraits<short>>(...) media/base/audio_bus.h:494:27 #1 0x754d481869ce in void media::AudioBus::FromInterleavedPartial<media::FixedSampleTypeTraits<short>>(...) media/base/audio_bus.h:422:3 #2 0x754d4817f758 in void media::AudioBus::FromInterleaved<media::FixedSampleTypeTraits<short>>(...) media/base/audio_bus.h:390:3 #3 0x754d48173ecc in content::SpeechRecognizerImpl::AddAudioFromRenderer(...) content/browser/speech/speech_recognizer_impl.cc:341:9 #4 0x754d3e126c20 in media::mojom::SpeechRecognitionAudioForwarderStubDispatch::Accept(...) gen/media/mojo/mojom/speech_recognition_audio_forwarder.mojom.cc:192:13

0x717bf9f18bf4 is located 0 bytes after 20-byte region [0x717bf9f18be0,0x717bf9f18bf4) allocated by thread T8 (Chrome_IOThread) here: #0 0x5db19b595a5d in operator new(unsigned long) ... #8 0x754d3e03269f in mojo::ArrayTraits<std::vector<short>>::Resize(...) mojo/public/cpp/bindings/array_traits.h:149:17

SUMMARY: AddressSanitizer: heap-buffer-overflow media/base/audio_bus.h:494:27 in void media::AudioBus::CopyConvertFromInterleavedSourceToAudioBus<...>(...)

SUGGESTED FIX

Attached: suggested-fix.patch

Validate data.size() == channel_count * frame_count (with base::CheckMul for overflow) before the FromInterleaved call, and switch to the span-based FromInterleaved overload which has CHECK_LE. The speech service at chrome/services/speech/ already does this validation. The browser-process SpeechRecognizerImpl just lacks it.

CREDIT INFORMATION

Reporter credit: Grischa Hauser

The original report as published on the Chromium issue tracker, by Grischa Hauser. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 6 min read.

Context

This report concerns Google Chrome, specifically the Web Speech API and its browser-process implementation. The Web Speech API lets a web page send audio to a speech recognition service. In Chrome, the renderer side talks to the browser process over Mojo, and the browser process forwards audio to Google's speech service.

The vulnerable component is SpeechRecognizerImpl, the browser-process handler for the media.mojom.SpeechRecognizer interface. Audio is delivered through the media.mojom.SpeechRecognitionAudioForwarder interface, one AudioDataS16 struct per packet. Each struct carries three independent fields: channel_count, frame_count and data (an array of int16 samples).

The report was filed through the Chrome VRP by Grischa Hauser, rated high severity, with a bounty of 36000.00 USD, and disclosed on 2026-03-10. The weakness class is an out of bounds read.

Setup

The researcher tested on Ubuntu 22.04 under WSL2, against Chrome 146.0.7673.0 (trunk). The bug was reported as affecting Chrome since version 129 (August 2024).

The reproduction uses a local ASan build of Chromium with MojoJS enabled, so a page can craft raw Mojo messages and simulate a compromised renderer. The build configuration given is:

Text
is_debug=true is_asan=true is_lsan=true is_component_build=true

The PoC is launched as follows:

Bash
cd chromium/src
ASAN_OPTIONS=detect_odr_violation=0 ./out/asan-debug/chrome \
  --no-sandbox --enable-blink-features=MojoJS,MojoJSTest --disable-gpu \
  file:///path/to/poc-speech-oob-read.html 2>&1 | tee /tmp/asan.log

Two flags deserve a note. --no-sandbox is described as a WSL2 requirement, and the report states the bug is in the browser-process Mojo handler and is hit regardless of sandbox state. detect_odr_violation=0 is needed for ASan component builds because of an expected cppgc ODR violation.

Two PoC files are attached: poc-speech-oob-read.html (primary) and poc-variable-read-sizes.html, which demonstrates reads of 100, 1024, 4096 and 65536 bytes. A suggested-fix.patch is also attached. The PoCs use MojoJS to simulate a compromised renderer crafting raw Mojo messages; the report notes that a real attacker with renderer RCE would construct identical messages directly.

Finding it

The per-packet AudioDataS16 Mojo struct has no validation tying the size of data to the declared channel_count and frame_count. The three fields are independent, and nothing checks that data.size() >= channel_count * frame_count.

The deprecated raw-pointer FromInterleaved() overload at speech_recognizer_impl.cc:341 then reads channel_count * frame_count int16 values from the data buffer. If the buffer is smaller than that product, the read runs past the end of the heap allocation. The overshoot is (channel_count * frame_count - data.size()) * 2 bytes, fully attacker-controlled per packet.

There is also a secondary integer overflow at line 345, where channel_count * frame_count * 16 / 8 is computed in int32. This can undersize the AudioChunk allocation, but it requires a 1GB+ AudioBus to trigger, so it is only a denial of service.

The bug was introduced in commit 881ab7a9d5 ("Add MediaStreamTrack support to the Web Speech API", Evan Liu, 2024-08-01, https://chromium-review.googlesource.com/c/chromium/src/+/5631655).

Exploitation

Step 1: Bind the speech recognizer and start a session

The PoC binds media.mojom.SpeechRecognizer and sends Start() with an audio_forwarder receiver. Supplying the forwarder this way bypasses the microphone permission check, so no permissions are required. The PoC then waits for the session to initialise.

Step 2: Send an undersized audio packet

The PoC sends AddAudioFromRenderer with channel_count=2, frame_count=1024 and data=[10 values]. The declared product is 2048 samples, but the buffer holds 10 int16 values, a 20-byte allocation. The handler reads 2048 int16 values from it, which is 4076 bytes past the end of the allocation.

Step 3: Observe the ASan report

In the ASan build the read is caught in the browser process on Chrome_IOThread:

Text
==35997==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x717bf9f18bf4 at pc 0x754d48186b8b bp 0x714be7753730 sp 0x714be7753728
READ of size 2 at 0x717bf9f18bf4 thread T8 (Chrome_IOThread)
    #0 0x754d48186b8a in void media::AudioBus::CopyConvertFromInterleavedSourceToAudioBus<media::FixedSampleTypeTraits<short>>(...) media/base/audio_bus.h:494:27
    #1 0x754d481869ce in void media::AudioBus::FromInterleavedPartial<media::FixedSampleTypeTraits<short>>(...) media/base/audio_bus.h:422:3
    #2 0x754d4817f758 in void media::AudioBus::FromInterleaved<media::FixedSampleTypeTraits<short>>(...) media/base/audio_bus.h:390:3
    #3 0x754d48173ecc in content::SpeechRecognizerImpl::AddAudioFromRenderer(...) content/browser/speech/speech_recognizer_impl.cc:341:9
    #4 0x754d3e126c20 in media::mojom::SpeechRecognitionAudioForwarderStubDispatch::Accept(...) gen/media/mojo/mojom/speech_recognition_audio_forwarder.mojom.cc:192:13

0x717bf9f18bf4 is located 0 bytes after 20-byte region [0x717bf9f18be0,0x717bf9f18bf4)
allocated by thread T8 (Chrome_IOThread) here:
    #0 0x5db19b595a5d in operator new(unsigned long)
    ...
    #8 0x754d3e03269f in mojo::ArrayTraits<std::vector<short>>::Resize(...) mojo/public/cpp/bindings/array_traits.h:149:17

SUMMARY: AddressSanitizer: heap-buffer-overflow media/base/audio_bus.h:494:27 in void media::AudioBus::CopyConvertFromInterleavedSourceToAudioBus<...>(...)

The stack shows the read in AudioBus::CopyConvertFromInterleavedSourceToAudioBus, reached through FromInterleavedPartial and FromInterleaved, called from AddAudioFromRenderer at line 341. The allocation site is mojo::ArrayTraits<std::vector<short>>::Resize, confirming the 20-byte buffer is the Mojo-decoded data array.

Step 4: Vary the read size

The second PoC, poc-variable-read-sizes.html, shows reads of 100, 1024, 4096 and 65536 bytes, demonstrating that the overshoot scales with the attacker-chosen fields.

Step 5: Exfiltrate the heap bytes

The report explains that the OOB-read data is converted to float, written to an AudioChunk, then FLAC-encoded (level 0, lossless) and uploaded to Google's speech API. The int16 to float32 to int16 to FLAC pipeline is bit-for-bit lossless because the float32 mantissa exceeds int16 precision, so the heap bytes survive encoding intact. The attacker can therefore read attacker-controlled amounts of browser-process heap memory through the audio forwarder path.

In release builds the OOB read is silent with no crash.

Root cause

The AudioDataS16 struct has independent channel_count, frame_count and data fields, and the browser-process handler does not validate that data.size() >= channel_count * frame_count. The deprecated raw-pointer FromInterleaved() overload at speech_recognizer_impl.cc:341 trusts the declared counts and reads that many int16 values from the buffer.

The secondary issue at line 345 is an int32 overflow in channel_count * frame_count * 16 / 8, which can undersize the AudioChunk allocation. Triggering it needs a 1GB+ AudioBus, so it is only a denial of service.

The report states that the speech service at chrome/services/speech/ already performs this validation. The browser-process SpeechRecognizerImpl simply lacks it. The microphone permission check is also bypassed because the audio_forwarder receiver is supplied directly in Start().

Impact

A compromised renderer can read attacker-controlled amounts of browser-process heap memory through the media.mojom.SpeechRecognitionAudioForwarder Mojo interface. No permissions are required, and the audio forwarder path bypasses the microphone permission check. The read size is fully attacker-controlled per packet. In release builds the read is silent, and the leaked bytes are uploaded to Google's speech API as part of the normal FLAC-encoded audio stream.

The secondary integer overflow is limited to a denial of service because it requires a 1GB+ AudioBus.

Fix

The report attaches suggested-fix.patch. The suggested fix validates data.size() == channel_count * frame_count (with base::CheckMul for overflow) before the FromInterleaved call, and switches to the span-based FromInterleaved overload which has CHECK_LE. The report notes that the speech service at chrome/services/speech/ already does this validation, and the browser-process SpeechRecognizerImpl lacks it.

Variants to test

  1. Other Mojo structs with independent count and buffer fields: look for handlers that read count elements from a data array without checking data.size(). A positive result is an ASan heap-buffer-overflow in the browser process when the counts exceed the buffer.
  2. Other audio or media forwarder interfaces that accept renderer-supplied buffers: check whether the permission check is bypassed when the receiver is supplied directly. A positive result is audio processing without a microphone permission prompt.
  3. Integer overflow in size computations: look for channel_count * frame_count * bytes_per_sample style expressions computed in a narrow type. A positive result is an undersized allocation followed by a write or read past it.
  4. Lossless encoding pipelines: check whether leaked bytes survive conversion and encoding intact, as the int16 to float32 to int16 to FLAC path does here. A positive result is recovered heap bytes in the encoded output.
  5. Deprecated raw-pointer overloads: search for FromInterleaved and similar APIs that lack bounds checks, and compare against span-based overloads with CHECK_LE. A positive result is a crash or ASan report on an undersized buffer.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 19 min read.

What happened, in plain words

Google Chrome has a feature called the Web Speech API. It lets a website send sound (for example, from your microphone) to a speech recognition service, which turns the sound into text. Inside Chrome, the part of the program that runs a website (the renderer) is kept separate from the part that runs the browser itself (the browser process). The two talk to each other through a messaging system called Mojo.

This report describes a bug in the browser process, in the code that receives audio from the renderer and forwards it to Google's speech service. The code trusts two numbers that the renderer sends (how many channels and how many frames of audio there are) but never checks that the actual audio data is big enough to match those numbers. A malicious renderer can therefore claim there is far more audio than it actually sent, and Chrome will read past the end of the real data, picking up whatever happens to sit next to it in memory. That extra memory is then encoded as audio and uploaded to Google's speech service, so the attacker can read it back.

This kind of bug is called an out of bounds read: a program reads memory it was not supposed to read. The report was filed through the Chrome VRP (Google's bug bounty programme for Chrome) by Grischa Hauser, rated high severity, with a bounty of 36000.00 USD, and disclosed on 2026-03-10.

Context

What Chrome is and how it is split up

Chrome is a web browser. To keep a malicious website from taking over your whole computer, Chrome splits itself into pieces:

  • The renderer runs the web page: HTML, JavaScript, and so on. Each tab usually gets its own renderer. It is treated as untrusted, because it runs code from the internet.
  • The browser process is the trusted part. It handles things like the address bar, tabs, file access, the microphone and network requests. If a website could run code here, it could do almost anything on your machine.

Because the two parts are separate, they need a way to talk. Chrome uses a system called Mojo for this. Mojo is an inter-process communication (IPC) framework: it lets one process call functions in another process as if they were local, sending structured messages back and forth.

What the Web Speech API is

The Web Speech API is a feature that web pages can use to do speech recognition: the page sends audio, and a service returns text. In Chrome, the renderer sends the audio to the browser process over Mojo, and the browser process forwards it to Google's speech service.

An API (Application Programming Interface) is simply a defined way for one piece of software to ask another piece of software to do something. A comparison: a restaurant menu is an API. You do not go into the kitchen; you pick from a list of dishes, and the kitchen handles the rest. The Web Speech API is the menu a web page uses to ask Chrome for speech recognition.

The vulnerable component

The bug is in SpeechRecognizerImpl. This is the browser-process handler for the media.mojom.SpeechRecognizer interface. In plain terms: it is the piece of trusted Chrome code that receives speech recognition requests from the renderer.

Audio arrives through a second interface, media.mojom.SpeechRecognitionAudioForwarder, one packet at a time. Each packet is an AudioDataS16 struct. A struct is a bundle of related fields grouped together, like a form with several boxes. This one has three independent fields:

  • channel_count: how many audio channels the packet claims to have (for example, 2 for stereo).
  • frame_count: how many frames (samples per channel) the packet claims to have.
  • data: the actual array of audio samples, stored as int16 values.

An int16 is a whole number that fits in 16 bits, which is the usual format for a single audio sample. The key point is that these three fields are independent: nothing forces data to actually contain channel_count * frame_count samples.

Report metadata

The report was filed through the Chrome VRP by Grischa Hauser. It is rated high severity, the bounty was 36000.00 USD, and it was disclosed on 2026-03-10. The weakness class is an out of bounds read.

Setup

The environment

The researcher tested on Ubuntu 22.04 running under WSL2, against Chrome 146.0.7673.0 (trunk). Trunk means the main development line of the code, not a released stable version. WSL2 (Windows Subsystem for Linux) lets you run Linux inside Windows; it is just the researcher's working environment. The bug was reported as affecting Chrome since version 129 (August 2024).

What an ASan build is

To find memory bugs reliably, the researcher used a special build of Chromium (the open-source project Chrome is built from) with AddressSanitizer, usually shortened to ASan. ASan is a tool that watches every memory access while a program runs. When the program reads or writes outside a block of memory it was given, ASan stops it and prints a detailed report. Think of it as a smoke detector for memory bugs: normal use may not notice anything, but ASan raises the alarm the moment something goes wrong.

The build configuration given is:

Text
is_debug=true is_asan=true is_lsan=true is_component_build=true

Line by line:

  • is_debug=true: build a debug version, which keeps extra checks and information.
  • is_asan=true: turn on AddressSanitizer.
  • is_lsan=true: turn on LeakSanitizer, a companion tool that reports memory that was allocated and never freed.
  • is_component_build=true: build Chrome as many separate shared libraries instead of one big binary. This makes rebuilds faster during development.

How the proof of concept is launched

A proof of concept (PoC) is a small program or file that demonstrates a bug actually happens, without doing any real harm. Here the PoC is an HTML file that a special build of Chrome opens. The launch command is:

Bash
cd chromium/src
ASAN_OPTIONS=detect_odr_violation=0 ./out/asan-debug/chrome \
  --no-sandbox --enable-blink-features=MojoJS,MojoJSTest --disable-gpu \
  file:///path/to/poc-speech-oob-read.html 2>&1 | tee /tmp/asan.log

Line by line:

  • cd chromium/src: move into the Chromium source directory, so the relative path to the built browser works.
  • ASAN_OPTIONS=detect_odr_violation=0: an environment variable that configures ASan. It turns off one particular check (ODR violation) that otherwise fires spuriously in component builds. The report says this is expected because of a cppgc ODR violation, which is unrelated to the bug.
  • ./out/asan-debug/chrome: run the ASan-instrumented Chrome binary that was built earlier.
  • --no-sandbox: run without Chrome's sandbox. The report says this is a WSL2 requirement, and that the bug is in the browser-process Mojo handler and is hit regardless of sandbox state. In other words, the sandbox is not what makes the bug work or not work.
  • --enable-blink-features=MojoJS,MojoJSTest: turn on MojoJS and MojoJSTest. MojoJS is a JavaScript binding that lets a web page send raw Mojo messages. Normally web pages cannot do this; it exists for testing. It lets the PoC pretend to be a compromised renderer.
  • --disable-gpu: turn off GPU acceleration, which is not needed here and can complicate debugging.
  • file:///path/to/poc-speech-oob-read.html: open the local PoC file instead of a website.
  • 2>&1 | tee /tmp/asan.log: send both normal output and error output into tee, which prints it on screen and also saves a copy to /tmp/asan.log. This is how the ASan report is captured.

The attached files

Two PoC files are attached: poc-speech-oob-read.html (the primary one) and poc-variable-read-sizes.html, which demonstrates reads of 100, 1024, 4096 and 65536 bytes. A suggested-fix.patch is also attached. A patch is a file describing a change to source code, like a diff between the old and new version.

The PoCs use MojoJS to simulate a compromised renderer crafting raw Mojo messages. The report notes that a real attacker with renderer RCE would construct identical messages directly. RCE stands for remote code execution: the ability to run your own code on someone else's machine. If an attacker already has RCE in the renderer, they can send the same messages without needing MojoJS at all.

Finding it

The missing check

The per-packet AudioDataS16 struct has no validation tying the size of data to the declared channel_count and frame_count. The three fields are independent, and nothing checks that data.size() >= channel_count * frame_count.

In plain words: the form has a box for "how many samples" and a box for "the samples themselves", and nobody checks that the second box actually contains that many samples. A comparison: a delivery note says "10 boxes" but the truck only carries one. If the warehouse worker trusts the note and counts out 10 boxes anyway, they will walk past the end of the truck.

Where the read happens

The deprecated raw-pointer FromInterleaved() overload at speech_recognizer_impl.cc:341 then reads channel_count * frame_count int16 values from the data buffer. Deprecated means the code is old and should no longer be used, but it is still there. An overload is one of several versions of a function with the same name but different inputs. A raw pointer is a direct memory address with no size information attached, so the function has no way to know how big the buffer really is.

If the buffer is smaller than the product, the read runs past the end of the heap allocation. The heap is the area of memory a program uses for data created while it runs, as opposed to the stack, which is used for short-lived local variables. An allocation is a reserved block of heap memory. The overshoot is (channel_count * frame_count - data.size()) * 2 bytes, fully attacker-controlled per packet. The * 2 is because each int16 sample is 2 bytes.

The secondary integer overflow

There is also a secondary integer overflow at line 345, where channel_count * frame_count * 16 / 8 is computed in int32. An integer overflow happens when a calculation produces a number too big for the type used to store it, so the result wraps around to a small or negative value. int32 is a 32-bit signed integer, which can hold values up to about 2.1 billion.

This can undersize the AudioChunk allocation, but it requires a 1GB+ AudioBus to trigger, so it is only a denial of service. A denial of service (DoS) means making something stop working, without gaining any data or control. An AudioBus is Chrome's internal buffer for a block of audio; an AudioChunk is a container for encoded audio data.

When the bug was introduced

The bug was introduced in commit 881ab7a9d5 ("Add MediaStreamTrack support to the Web Speech API", Evan Liu, 2024-08-01, https://chromium-review.googlesource.com/c/chromium/src/+/5631655). A commit is a recorded change to a codebase, with an identifier and a message. This tells maintainers exactly which change brought the bug in, which helps when deciding what to fix and whether older versions are affected.

Exploitation

Step 1: Bind the speech recognizer and start a session

The PoC binds media.mojom.SpeechRecognizer and sends Start() with an audio_forwarder receiver. Binding here means connecting to a Mojo interface so the PoC can call its methods. Supplying the forwarder this way bypasses the microphone permission check, so no permissions are required. The PoC then waits for the session to initialise.

Why this matters: normally, a page that wants your microphone must ask you, and you must click Allow. Here the renderer hands Chrome its own audio channel directly, so Chrome never asks. The permission check is skipped, not defeated.

Step 2: Send an undersized audio packet

The PoC sends AddAudioFromRenderer with channel_count=2, frame_count=1024 and data=[10 values]. The declared product is 2048 samples, but the buffer holds 10 int16 values, a 20-byte allocation. The handler reads 2048 int16 values from it, which is 4076 bytes past the end of the allocation.

Why the numbers work out: 10 int16 values are 10 × 2 = 20 bytes. The handler believes there are 2 × 1024 = 2048 samples, which is 2048 × 2 = 4096 bytes. It reads 4096 bytes from a 20-byte buffer, so it reads 4096 − 20 = 4076 bytes beyond the end. Those 4076 bytes are whatever else happens to be in memory at that moment.

Step 3: Observe the ASan report

In the ASan build the read is caught in the browser process on Chrome_IOThread. A thread is a sequence of instructions running inside a process; Chrome_IOThread is the thread Chrome uses for input/output work.

Text
==35997==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x717bf9f18bf4 at pc 0x754d48186b8b bp 0x714be7753730 sp 0x714be7753728
READ of size 2 at 0x717bf9f18bf4 thread T8 (Chrome_IOThread)
    #0 0x754d48186b8a in void media::AudioBus::CopyConvertFromInterleavedSourceToAudioBus<media::FixedSampleTypeTraits<short>>(...) media/base/audio_bus.h:494:27
    #1 0x754d481869ce in void media::AudioBus::FromInterleavedPartial<media::FixedSampleTypeTraits<short>>(...) media/base/audio_bus.h:422:3
    #2 0x754d4817f758 in void media::AudioBus::FromInterleaved<media::FixedSampleTypeTraits<short>>(...) media/base/audio_bus.h:390:3
    #3 0x754d48173ecc in content::SpeechRecognizerImpl::AddAudioFromRenderer(...) content/browser/speech/speech_recognizer_impl.cc:341:9
    #4 0x754d3e126c20 in media::mojom::SpeechRecognitionAudioForwarderStubDispatch::Accept(...) gen/media/mojo/mojom/speech_recognition_audio_forwarder.mojom.cc:192:13

0x717bf9f18bf4 is located 0 bytes after 20-byte region [0x717bf9f18be0,0x717bf9f18bf4)
allocated by thread T8 (Chrome_IOThread) here:
    #0 0x5db19b595a5d in operator new(unsigned long)
    ...
    #8 0x754d3e03269f in mojo::ArrayTraits<std::vector<short>>::Resize(...) mojo/public/cpp/bindings/array_traits.h:149:17

SUMMARY: AddressSanitizer: heap-buffer-overflow media/base/audio_bus.h:494:27 in void media::AudioBus::CopyConvertFromInterleavedSourceToAudioBus<...>(...)

Line by line, in plain words:

  • ==35997==ERROR: AddressSanitizer: heap-buffer-overflow ...: ASan reports a heap buffer overflow. The long hex numbers are memory addresses and register values; they identify exactly where the program was when it happened.
  • READ of size 2 ... thread T8 (Chrome_IOThread): the program tried to read 2 bytes (one int16 sample) on thread T8, which is Chrome's IO thread.
  • The numbered #0 to #4 lines are the stack trace: the chain of function calls that led to the problem, newest first. #0 is where the bad read happened, inside AudioBus::CopyConvertFromInterleavedSourceToAudioBus. #1 and #2 are the functions that called it (FromInterleavedPartial and FromInterleaved). #3 is SpeechRecognizerImpl::AddAudioFromRenderer at line 341, which is the vulnerable code. #4 is the Mojo dispatcher that delivered the message.
  • 0x717bf9f18bf4 is located 0 bytes after 20-byte region [...]: the read was exactly at the end of a 20-byte block, so it is the first byte past the end. This matches the 10 int16 values from the PoC.
  • allocated by thread T8 ... here: shows where that 20-byte block came from. The #8 line names mojo::ArrayTraits<std::vector<short>>::Resize, which is the code that turned the Mojo message into a C++ array. This confirms the 20-byte buffer is the Mojo-decoded data array.
  • SUMMARY: repeats the key finding in one line: a heap buffer overflow in AudioBus::CopyConvertFromInterleavedSourceToAudioBus.

The stack shows the read in AudioBus::CopyConvertFromInterleavedSourceToAudioBus, reached through FromInterleavedPartial and FromInterleaved, called from AddAudioFromRenderer at line 341. The allocation site is mojo::ArrayTraits<std::vector<short>>::Resize, confirming the 20-byte buffer is the Mojo-decoded data array.

Step 4: Vary the read size

The second PoC, poc-variable-read-sizes.html, shows reads of 100, 1024, 4096 and 65536 bytes, demonstrating that the overshoot scales with the attacker-chosen fields. In other words, the attacker is not stuck with one fixed amount: by changing channel_count and frame_count, they choose how much extra memory to read.

Step 5: Exfiltrate the heap bytes

The report explains that the OOB-read data is converted to float, written to an AudioChunk, then FLAC-encoded (level 0, lossless) and uploaded to Google's speech API. Exfiltrate means to get data out of a system. FLAC is a lossless audio compression format: the decoded audio is exactly the same as the original. Lossless means no information is lost in compression.

The int16 to float32 to int16 to FLAC pipeline is bit-for-bit lossless because the float32 mantissa exceeds int16 precision, so the heap bytes survive encoding intact. In plain words: the leaked bytes are treated as audio samples, converted to a higher-precision number format, converted back, and compressed. Each step preserves the exact values, so when the attacker receives the FLAC file, they can decode it and recover the original heap bytes exactly. A mantissa is the part of a floating-point number that holds its significant digits; float32 has enough of them to represent every int16 value exactly.

The attacker can therefore read attacker-controlled amounts of browser-process heap memory through the audio forwarder path. In release builds the OOB read is silent with no crash. A release build is the normal version users run, without ASan; it does not notice the bad read, which is why the bug is dangerous in the real world and not just in a test build.

Root cause

The AudioDataS16 struct has independent channel_count, frame_count and data fields, and the browser-process handler does not validate that data.size() >= channel_count * frame_count. The deprecated raw-pointer FromInterleaved() overload at speech_recognizer_impl.cc:341 trusts the declared counts and reads that many int16 values from the buffer.

The secondary issue at line 345 is an int32 overflow in channel_count * frame_count * 16 / 8, which can undersize the AudioChunk allocation. Triggering it needs a 1GB+ AudioBus, so it is only a denial of service.

The report states that the speech service at chrome/services/speech/ already performs this validation. The browser-process SpeechRecognizerImpl simply lacks it. The microphone permission check is also bypassed because the audio_forwarder receiver is supplied directly in Start().

In short: the speech service already does this check, but the browser-process handler does not. The fix is to make this handler behave like the one that already does the check.

Impact

A compromised renderer can read attacker-controlled amounts of browser-process heap memory through the media.mojom.SpeechRecognitionAudioForwarder Mojo interface. No permissions are required, and the audio forwarder path bypasses the microphone permission check. The read size is fully attacker-controlled per packet. In release builds the read is silent, and the leaked bytes are uploaded to Google's speech API as part of the normal FLAC-encoded audio stream.

Why this is serious: the browser process is the trusted part of Chrome, and the bug lets a compromised renderer read its heap memory. Being able to read it from a compromised renderer weakens the separation between untrusted web content and the rest of the browser.

The secondary integer overflow is limited to a denial of service because it requires a 1GB+ AudioBus.

Fix

The report attaches suggested-fix.patch. The suggested fix validates data.size() == channel_count * frame_count (with base::CheckMul for overflow) before the FromInterleaved call, and switches to the span-based FromInterleaved overload which has CHECK_LE. The report notes that the speech service at chrome/services/speech/ already does this validation, and the browser-process SpeechRecognizerImpl lacks it.

In plain words:

  • Check that the number of samples actually present equals the number the packet claims, before reading anything.
  • Use base::CheckMul when multiplying the counts, so an overflow is caught instead of silently wrapping around.
  • Switch to the span-based overload. A span is a view of a buffer that carries its length with it, so the function can check the length. CHECK_LE means "check less than or equal": the code refuses to proceed if the requested read is larger than the buffer.

Variants to test

These are ideas for finding similar bugs elsewhere. Each one describes what to look for and what a positive result would look like.

  1. Other Mojo structs with independent count and buffer fields: look for handlers that read count elements from a data array without checking data.size(). A positive result is an ASan heap-buffer-overflow in the browser process when the counts exceed the buffer.
  2. Other audio or media forwarder interfaces that accept renderer-supplied buffers: check whether the permission check is bypassed when the receiver is supplied directly. A positive result is audio processing without a microphone permission prompt.
  3. Integer overflow in size computations: look for channel_count * frame_count * bytes_per_sample style expressions computed in a narrow type. A positive result is an undersized allocation followed by a write or read past it.
  4. Lossless encoding pipelines: check whether leaked bytes survive conversion and encoding intact, as the int16 to float32 to int16 to FLAC path does here. A positive result is recovered heap bytes in the encoded output.
  5. Deprecated raw-pointer overloads: search for FromInterleaved and similar APIs that lack bounds checks, and compare against span-based overloads with CHECK_LE. A positive result is a crash or ASan report on an undersized buffer.

Glossary

  • API (Application Programming Interface): a defined way for one piece of software to ask another to do something, like a menu of available requests.
  • ASan (AddressSanitizer): a tool built into a test version of a program that detects and reports out of bounds memory accesses and similar bugs.
  • Allocation: a reserved block of memory that a program has asked for at runtime.
  • AudioBus: Chrome's internal buffer that holds a block of audio samples.
  • AudioChunk: a container for a piece of encoded audio data.
  • AudioDataS16: the Mojo struct that carries one packet of audio, with channel_count, frame_count and data fields.
  • Binding: connecting to an interface so that its methods can be called.
  • Browser process: the trusted part of Chrome that handles tabs, permissions, files and network access.
  • Bounty: a payment made by a company to a researcher who reports a security bug.
  • base::CheckMul: a Chrome helper that multiplies two numbers and aborts if the result overflows.
  • CHECK_LE: a check that one value is less than or equal to another; the program stops if it is not.
  • Commit: a recorded change to a codebase, identified by a hash and a message.
  • Compromised renderer: a renderer that an attacker has managed to run their own code in.
  • cppgc: Chrome's C++ garbage collector; an ODR violation involving it is an unrelated warning in component builds.
  • Denial of service (DoS): making a system stop working, without gaining data or control.
  • Deprecated: old code that should no longer be used but is still present.
  • Exfiltrate: to get data out of a system, often covertly.
  • FLAC: a lossless audio compression format; decoding gives back exactly the original samples.
  • Frame: one sample per channel; a stereo frame contains two samples, one for each channel.
  • Heap: the area of memory a program uses for data created while it runs.
  • Heap buffer overflow: reading or writing past the end of a block of heap memory.
  • int16: a whole number stored in 16 bits, the usual format for one audio sample.
  • int32: a whole number stored in 32 bits, holding values up to about 2.1 billion.
  • Integer overflow: a calculation producing a number too large for its type, so the result wraps around.
  • IPC (Inter-Process Communication): a way for separate processes to send messages to each other.
  • Lossless: compression that preserves the original data exactly.
  • Mantissa: the part of a floating-point number that holds its significant digits.
  • Mojo: Chrome's IPC framework for sending structured messages between processes.
  • MojoJS: a JavaScript binding that lets a page send raw Mojo messages, used for testing.
  • Out of bounds read (OOB read): a program reading memory outside the block it was given.
  • Overload: one of several versions of a function with the same name but different inputs.
  • Patch: a file describing a change to source code.
  • Proof of concept (PoC): a small file or program that demonstrates a bug without causing real harm.
  • Raw pointer: a direct memory address with no size information attached.
  • RCE (Remote Code Execution): the ability to run your own code on someone else's machine.
  • Release build: the normal version of a program that users run, without debugging tools like ASan.
  • Renderer: the part of Chrome that runs a web page; treated as untrusted.
  • Sandbox: a restricted environment that limits what a process can do, so a compromise is contained.
  • Severity: a rating of how serious a bug is, often high, medium or low.
  • Span: a view of a buffer that carries its length, so the code can check bounds.
  • Stack trace: the chain of function calls that led to a point in a program, newest first.
  • Struct: a bundle of related fields grouped together, like a form with several boxes.
  • Thread: a sequence of instructions running inside a process.
  • Trunk: the main development line of a codebase, not a released stable version.
  • VRP (Vulnerability Reward Program): Google's bug bounty programme for Chrome.
  • WSL2 (Windows Subsystem for Linux 2): a way to run Linux inside Windows.

More from Google Chrome

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.