Skip to content
Memory corruption Advisory Advanced CVE-2025-1919

Out of bounds read in Media (CVE-2025-1919)

Hou Xiantong Follow

Originally disclosed on Chrome VRP

Bounty$2,000 Medium View original
  • Fix shipped in 38 days

Steps to reproduce the problem

  1. Build the chrome:
gn gen out/MediaMojoRelease --args="is_debug=false symbol_level=2 enable_nacl=false is_component_build=true dcheck_always_on=false"
  1. Launch chrome with mojo enable:
Release\chrome.exe  --enable-blink-features=MojoJS,MojoJSTest
  1. Attach the GPU process with a debugger(I don't know why ASAN can't capture this case).
  2. Visit the poc.html to trigger crash.

Problem Description

There is an insufficient validation of the frame_count parameter when creating an AudioBuffer from mojo data.

And the frame_count is used to calculate data_size_per_channel, which represents the size of the data per audio channel.

The data_size_per_channel value is subsequently used as the size parameter in a memcpy, , resulting in an out-of-bounds memory read.

Additionally, the out-of-bounds data located on the heap can be transmitted back to the renderer process after encoding, leading to potential data leakage or further exploitation opportunities.

Additional Comments

BISECT

The vulnerability may exist in the first commit of AudioBuffer: https://source.chromium.org/chromium/chromium/src/+/55de3108f586fc00efa0a1352f7b63960fb8d15d:media/base/audio_buffer.cc;dlc=fd45eed1e4973593cc55c45424e1fde808bd6d9d

Summary

Information Leak via Out-of-Bounds Read in media::AudioBuffer

Custom Questions

Type of crash:

GPU Process

Crash state:

00 0000008a`c97fc838 00007fff`09cd0762     VCRUNTIME140!memcpy_avx_ermsb_Intel+0x2e9 [D:\a\_work\1\s\src\vctools\crt\vcruntime\src\string\amd64\Intel\memcpy_avx_ermsb_aligned.asm @ 363] 
01 0000008a`c97fc840 00007fff`09cd1767     media!media::AudioBuffer::AudioBuffer+0x7a2 [F:\Chromium\src\media\base\audio_buffer.cc @ 211] 
*** WARNING: Unable to verify checksum for D:\Chromium\dev_6876\Release\media_mojo_services.dll
02 0000008a`c97fc940 00007ffe`9319e359     media!media::AudioBuffer::CopyFrom+0xd7 [F:\Chromium\src\media\base\audio_buffer.cc @ 305] 
03 0000008a`c97fca30 00007ffe`92fe96e1     media_mojo_services!mojo::TypeConverter<scoped_refptr<media::AudioBuffer>,mojo::StructPtr<media::mojom::AudioBuffer> >::Convert+0x679 [F:\Chromium\src\media\mojo\common\media_type_converters.cc @ 250] 
04 (Inline Function) --------`--------     media_mojo_services!mojo::StructPtr<media::mojom::AudioBuffer>::To+0x8 [F:\Chromium\src\mojo\public\cpp\bindings\struct_ptr.h @ 67] 
05 0000008a`c97fcc40 00007ffe`9306879c     media_mojo_services!media::MojoAudioEncoderService::Encode+0x61 [F:\Chromium\src\media\mojo\services\mojo_audio_encoder_service.cc @ 52] 
06 0000008a`c97fcd00 00007ffe`92fd9d9c     media_mojo_services!media::mojom::AudioEncoderStubDispatch::AcceptWithResponder+0x59c [F:\Chromium\src\out\Release\gen\media\mojo\mojom\audio_encoder.mojom.cc @ 1005] 
*** WARNING: Unable to verify checksum for D:\Chromium\dev_6876\Release\mojo_public_cpp_bindings.dll
07 0000008a`c97fce80 00007fff`c14841e7     media_mojo_services!media::mojom::AudioEncoderStub<mojo::UniquePtrImplRefTraits<media::mojom::AudioEncoder,std::__Cr::default_delete<media::mojom::AudioEncoder> > >::AcceptWithResponder+0x3c [F:\Chromium\src\out\Release\gen\media\mojo\mojom\audio_encoder.mojom.h @ 229] 
08 0000008a`c97fced0 00007fff`c148e13d     mojo_public_cpp_bindings!mojo::InterfaceEndpointClient::HandleValidatedMessage+0x727 [F:\Chromium\src\mojo\public\cpp\bindings\lib\interface_endpoint_client.cc @ 1032] 
09 0000008a`c97fd100 00007fff`c1486b85     mojo_public_cpp_bindings!mojo::MessageDispatcher::Accept+0xed [F:\Chromium\src\mojo\public\cpp\bindings\lib\message_dispatcher.cc @ 48] 
0a 0000008a`c97fd1b0 00007fff`c1493c9a     mojo_public_cpp_bindings!mojo::InterfaceEndpointClient::HandleIncomingMessage+0x375 [F:\Chromium\src\mojo\public\cpp\bindings\lib\interface_endpoint_client.cc @ 751] 
0b 0000008a`c97fd370 00007fff`c14931a8     mojo_public_cpp_bindings!mojo::internal::MultiplexRouter::ProcessIncomingMessage+0x5ca [F:\Chromium\src\mojo\public\cpp\bindings\lib\multiplex_router.cc @ 1120] 
0c 0000008a`c97fd4a0 00007fff`c148e189     mojo_public_cpp_bindings!mojo::internal::MultiplexRouter::Accept+0x1f8 [F:\Chromium\src\mojo\public\cpp\bindings\lib\multiplex_router.cc @ 737] 
0d 0000008a`c97fd6f0 00007fff`c147861b     mojo_public_cpp_bindings!mojo::MessageDispatcher::Accept+0x139 [F:\Chromium\src\mojo\public\cpp\bindings\lib\message_dispatcher.cc @ 43] 
0e 0000008a`c97fd7a0 00007fff`c147926d     mojo_public_cpp_bindings!mojo::Connector::DispatchMessageW+0x38b [F:\Chromium\src\mojo\public\cpp\bindings\lib\connector.cc @ 561] 
0f 0000008a`c97fd930 00007fff`c1478ef7     mojo_public_cpp_bindings!mojo::Connector::ReadAllAvailableMessages+0x14d [F:\Chromium\src\mojo\public\cpp\bindings\lib\connector.cc @ 620] 
10 (Inline Function) --------`--------     mojo_public_cpp_bindings!mojo::Connector::OnHandleReadyInternal+0x2c [F:\Chromium\src\mojo\public\cpp\bindings\lib\connector.cc @ 452] 
11 0000008a`c97fd9e0 00007fff`c1479d8a     mojo_public_cpp_bindings!mojo::Connector::OnWatcherHandleReady+0x57 [F:\Chromium\src\mojo\public\cpp\bindings\lib\connector.cc @ 418] 
*** WARNING: Unable to verify checksum for D:\Chromium\dev_6876\Release\mojo_public_system_cpp.dll
12 0000008a`c97fda30 00007fff`56c1d002     mojo_public_cpp_bindings!base::RepeatingCallback<void (unsigned int)>::Run+0xaa [F:\Chromium\src\base\functional\callback.h @ 345] 
13 0000008a`c97fdac0 00007fff`56c1ce19     mojo_public_system_cpp!base::RepeatingCallback<void (unsigned int, const mojo::HandleSignalsState &)>::Run+0xb2 [F:\Chromium\src\base\functional\callback.h @ 345] 
*** WARNING: Unable to verify checksum for D:\Chromium\dev_6876\Release\base.dll
14 0000008a`c97fdb50 00007fff`26601b64     mojo_public_system_cpp!mojo::SimpleWatcher::OnHandleReady+0x139 [F:\Chromium\src\mojo\public\cpp\system\simple_watcher.cc @ 279] 
15 0000008a`c97fdbf0 00007fff`266d5614     base!base::OnceCallback<void ()>::Run+0x94 [F:\Chromium\src\base\functional\callback.h @ 156] 
16 0000008a`c97fdc70 00007fff`2673a373     base!base::TaskAnnotator::RunTaskImpl+0x154 [F:\Chromium\src\base\task\common\task_annotator.cc @ 209] 
17 (Inline Function) --------`--------     base!base::TaskAnnotator::RunTask+0x54 [F:\Chromium\src\base\task\common\task_annotator.h @ 106] 
18 (Inline Function) --------`--------     base!base::internal::TaskTracker::RunTaskImpl+0x78 [F:\Chromium\src\base\task\thread_pool\task_tracker.cc @ 677] 
19 0000008a`c97fdd10 00007fff`267396e5     base!base::internal::TaskTracker::RunSkipOnShutdown+0xc3 [F:\Chromium\src\base\task\thread_pool\task_tracker.cc @ 662] 
1a (Inline Function) --------`--------     base!base::internal::TaskTracker::RunTaskWithShutdownBehavior+0x43 [F:\Chromium\src\base\task\thread_pool\task_tracker.cc @ 692] 
1b 0000008a`c97fddd0 00007fff`26738ea0     base!base::internal::TaskTracker::RunTask+0x495 [F:\Chromium\src\base\task\thread_pool\task_tracker.cc @ 520] 
1c 0000008a`c97ff770 00007fff`267481c1     base!base::internal::TaskTracker::RunAndPopNextTask+0x310 [F:\Chromium\src\base\task\thread_pool\task_tracker.cc @ 417] 
1d 0000008a`c97ffa20 00007fff`26747cd8     base!base::internal::WorkerThread::RunWorker+0x3c1 [F:\Chromium\src\base\task\thread_pool\worker_thread.cc @ 493] 
1e 0000008a`c97ffbd0 00007fff`267cbc47     base!base::internal::WorkerThread::RunSharedWorker+0x18 [F:\Chromium\src\base\task\thread_pool\worker_thread.cc @ 390] 
1f 0000008a`c97ffc10 00007ff8`0053e8d7     base!base::`anonymous namespace'::ThreadFunc+0xe7 [F:\Chromium\src\base\threading\platform_thread_win.cc @ 118] 
20 0000008a`c97ffc90 00007ff8`01d9fbcc     KERNEL32!BaseThreadInitThunk+0x17
21 0000008a`c97ffcc0 00000000`00000000     ntdll!RtlUserThreadStart+0x2c

Reporter credit:

@Bl1nnnk and @Pisanbao

Additional Data

Category: Security
Chrome Channel: Dev
Regression: N/A

The original report as published on the Chromium issue tracker, by @Bl1nnnk and @Pisanbao. 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. 8 min read.

Context

Google Chrome's media stack includes a Mojo service, MojoAudioEncoderService, that runs in the GPU process and encodes audio data on behalf of the renderer. The renderer sends an AudioBuffer structure over Mojo, and the service converts it into a native media::AudioBuffer before encoding. The conversion is handled by mojo::TypeConverter<scoped_refptr<media::AudioBuffer>, mojo::StructPtr<media::mojom::AudioBuffer>>::Convert in media/mojo/common/media_type_converters.cc. The native AudioBuffer constructor in media/base/audio_buffer.cc takes a frame_count parameter and uses it to compute data_size_per_channel, the number of bytes per channel, which is then passed as the size argument to memcpy.

The report describes an out-of-bounds read caused by insufficient validation of frame_count when an AudioBuffer is created from Mojo data. The bug was assigned CVE-2025-1919 and rated medium severity. The reporters are @Bl1nnnk and @Pisanbao, and the Chrome VRP awarded a bounty of 2000.00 USD. The advisory was disclosed on 2025-03-04.

Setup

The researcher built Chrome with the following GN arguments:

gn gen out/MediaMojoRelease --args="is_debug=false symbol_level=2 enable_nacl=false is_component_build=true dcheck_always_on=false"

This produces a release build with symbols, component build enabled, NaCl disabled, and DCHECKs turned off. The build output directory is out/MediaMojoRelease.

Chrome was then launched with MojoJS and MojoJSTest features enabled:

Release\chrome.exe  --enable-blink-features=MojoJS,MojoJSTest

These flags expose the Mojo JavaScript bindings to web content, allowing a page to talk directly to Mojo interfaces. The researcher notes that they attached a debugger to the GPU process because ASAN did not capture the case. The crash is triggered by visiting a poc.html page.

Finding it

The researcher identified that the frame_count parameter is not sufficiently validated when an AudioBuffer is constructed from Mojo data. In media/base/audio_buffer.cc, frame_count is used to calculate data_size_per_channel, which represents the size of the data per audio channel. That value is subsequently used as the size parameter in a memcpy call. If frame_count is larger than the actual amount of data supplied, the memcpy reads beyond the end of the source buffer, producing an out-of-bounds read.

The report also notes that the out-of-bounds data located on the heap can be transmitted back to the renderer process after encoding, leading to potential data leakage or further exploitation opportunities.

A bisect note says the vulnerability may exist in the first commit of AudioBuffer, referencing commit [redacted] for media/base/audio_buffer.cc.

Exploitation

Step 1: Build Chrome

gn gen out/MediaMojoRelease --args="is_debug=false symbol_level=2 enable_nacl=false is_component_build=true dcheck_always_on=false"

This generates a release build with symbols and component build, disabling NaCl and DCHECKs. The output goes to out/MediaMojoRelease.

Step 2: Launch Chrome with MojoJS enabled

Release\chrome.exe  --enable-blink-features=MojoJS,MojoJSTest

The --enable-blink-features=MojoJS,MojoJSTest flag exposes the Mojo JavaScript bindings to web pages, which is necessary for the proof of concept to reach the Mojo interfaces directly.

Step 3: Attach a debugger to the GPU process

The researcher attached a debugger to the GPU process because ASAN did not capture the crash. This is a debugging aid, not part of the attack itself.

Step 4: Visit poc.html

Loading the poc.html page triggers the crash. The report does not include the contents of poc.html, so the exact Mojo messages and parameters used are not shown here.

The crash state shows the call stack at the point of the out-of-bounds read:

00 0000008a`c97fc838 00007fff`09cd0762     VCRUNTIME140!memcpy_avx_ermsb_Intel+0x2e9 [D:\a\_work\1\s\src\vctools\crt\vcruntime\src\string\amd64\Intel\memcpy_avx_ermsb_aligned.asm @ 363]
01 0000008a`c97fc840 00007fff`09cd1767     media!media::AudioBuffer::AudioBuffer+0x7a2 [F:\Chromium\src\media\base\audio_buffer.cc @ 211]
*** WARNING: Unable to verify checksum for D:\Chromium\dev_6876\Release\media_mojo_services.dll
02 0000008a`c97fc940 00007ffe`9319e359     media!media::AudioBuffer::CopyFrom+0xd7 [F:\Chromium\src\media\base\audio_buffer.cc @ 305]
03 0000008a`c97fca30 00007ffe`92fe96e1     media_mojo_services!mojo::TypeConverter<scoped_refptr<media::AudioBuffer>,mojo::StructPtr<media::mojom::AudioBuffer> >::Convert+0x679 [F:\Chromium\src\media\mojo\common\media_type_converters.cc @ 250]
04 (Inline Function) --------`--------     media_mojo_services!mojo::StructPtr<media::mojom::AudioBuffer>::To+0x8 [F:\Chromium\src\mojo\public\cpp\bindings\struct_ptr.h @ 67]
05 0000008a`c97fcc40 00007ffe`9306879c     media_mojo_services!media::MojoAudioEncoderService::Encode+0x61 [F:\Chromium\src\media\mojo\services\mojo_audio_encoder_service.cc @ 52]
06 0000008a`c97fcd00 00007ffe`92fd9d9c     media_mojo_services!media::mojom::AudioEncoderStubDispatch::AcceptWithResponder+0x59c [F:\Chromium\src\out\Release\gen\media\mojo\mojom\audio_encoder.mojom.cc @ 1005]
*** WARNING: Unable to verify checksum for D:\Chromium\dev_6876\Release\mojo_public_cpp_bindings.dll
07 0000008a`c97fce80 00007fff`c14841e7     media_mojo_services!media::mojom::AudioEncoderStub<mojo::UniquePtrImplRefTraits<media::mojom::AudioEncoder,std::__Cr::default_delete<media::mojom::AudioEncoder> > >::AcceptWithResponder+0x3c [F:\Chromium\src\out\Release\gen\media\mojo\mojom\audio_encoder.mojom.h @ 229]
08 0000008a`c97fced0 00007fff`c148e13d     mojo_public_cpp_bindings!mojo::InterfaceEndpointClient::HandleValidatedMessage+0x727 [F:\Chromium\src\mojo\public\cpp\bindings\lib\interface_endpoint_client.cc @ 1032]
09 0000008a`c97fd100 00007fff`c1486b85     mojo_public_cpp_bindings!mojo::MessageDispatcher::Accept+0xed [F:\Chromium\src\mojo\public\cpp\bindings\lib\message_dispatcher.cc @ 48]
0a 0000008a`c97fd1b0 00007fff`c1493c9a     mojo_public_cpp_bindings!mojo::InterfaceEndpointClient::HandleIncomingMessage+0x375 [F:\Chromium\src\mojo\public\cpp\bindings\lib\interface_endpoint_client.cc @ 751]
0b 0000008a`c97fd370 00007fff`c14931a8     mojo_public_cpp_bindings!mojo::internal::MultiplexRouter::ProcessIncomingMessage+0x5ca [F:\Chromium\src\mojo\public\cpp\bindings\lib\multiplex_router.cc @ 1120]
0c 0000008a`c97fd4a0 00007fff`c148e189     mojo_public_cpp_bindings!mojo::internal::MultiplexRouter::Accept+0x1f8 [F:\Chromium\src\mojo\public\cpp\bindings\lib\multiplex_router.cc @ 737]
0d 0000008a`c97fd6f0 00007fff`c147861b     mojo_public_cpp_bindings!mojo::MessageDispatcher::Accept+0x139 [F:\Chromium\src\mojo\public\cpp\bindings\lib\message_dispatcher.cc @ 43]
0e 0000008a`c97fd7a0 00007fff`c147926d     mojo_public_cpp_bindings!mojo::Connector::DispatchMessageW+0x38b [F:\Chromium\src\mojo\public\cpp\bindings\lib\connector.cc @ 561]
0f 0000008a`c97fd930 00007fff`c1478ef7     mojo_public_cpp_bindings!mojo::Connector::ReadAllAvailableMessages+0x14d [F:\Chromium\src\mojo\public\cpp\bindings\lib\connector.cc @ 620]
10 (Inline Function) --------`--------     mojo_public_cpp_bindings!mojo::Connector::OnHandleReadyInternal+0x2c [F:\Chromium\src\mojo\public\cpp\bindings\lib\connector.cc @ 452]
11 0000008a`c97fd9e0 00007fff`c1479d8a     mojo_public_cpp_bindings!mojo::Connector::OnWatcherHandleReady+0x57 [F:\Chromium\src\mojo\public\cpp\bindings\lib\connector.cc @ 418]
*** WARNING: Unable to verify checksum for D:\Chromium\dev_6876\Release\mojo_public_system_cpp.dll
12 0000008a`c97fda30 00007fff`56c1d002     mojo_public_cpp_bindings!base::RepeatingCallback<void (unsigned int)>::Run+0xaa [F:\Chromium\src\base\functional\callback.h @ 345]
13 0000008a`c97fdac0 00007fff`56c1ce19     mojo_public_system_cpp!base::RepeatingCallback<void (unsigned int, const mojo::HandleSignalsState &)>::Run+0xb2 [F:\Chromium\src\base\functional\callback.h @ 345]
*** WARNING: Unable to verify checksum for D:\Chromium\dev_6876\Release\base.dll
14 0000008a`c97fdb50 00007fff`26601b64     mojo_public_system_cpp!mojo::SimpleWatcher::OnHandleReady+0x139 [F:\Chromium\src\mojo\public\cpp\system\simple_watcher.cc @ 279]
15 0000008a`c97fdbf0 00007fff`266d5614     base!base::OnceCallback<void ()>::Run+0x94 [F:\Chromium\src\base\functional\callback.h @ 156]
16 0000008a`c97fdc70 00007fff`2673a373     base!base::TaskAnnotator::RunTaskImpl+0x154 [F:\Chromium\src\base\task\common\task_annotator.cc @ 209]
17 (Inline Function) --------`--------     base!base::TaskAnnotator::RunTask+0x54 [F:\Chromium\src\base\task\common\task_annotator.h @ 106]
18 (Inline Function) --------`--------     base!base::internal::TaskTracker::RunTaskImpl+0x78 [F:\Chromium\src\base\task\thread_pool\task_tracker.cc @ 677]
19 0000008a`c97fdd10 00007fff`267396e5     base!base::internal::TaskTracker::RunSkipOnShutdown+0xc3 [F:\Chromium\src\base\task\thread_pool\task_tracker.cc @ 662]
1a (Inline Function) --------`--------     base!base::internal::TaskTracker::RunTaskWithShutdownBehavior+0x43 [F:\Chromium\src\base\task\thread_pool\task_tracker.cc @ 692]
1b 0000008a`c97fddd0 00007fff`26738ea0     base!base::internal::TaskTracker::RunTask+0x495 [F:\Chromium\src\base\task\thread_pool\task_tracker.cc @ 520]
1c 0000008a`c97ff770 00007fff`267481c1     base!base::internal::TaskTracker::RunAndPopNextTask+0x310 [F:\Chromium\src\base\task\thread_pool\task_tracker.cc @ 417]
1d 0000008a`c97ffa20 00007fff`26747cd8     base!base::internal::WorkerThread::RunWorker+0x3c1 [F:\Chromium\src\base\task\thread_pool\worker_thread.cc @ 493]
1e 0000008a`c97ffbd0 00007fff`267cbc47     base!base::internal::WorkerThread::RunSharedWorker+0x18 [F:\Chromium\src\base\task\thread_pool\worker_thread.cc @ 390]
1f 0000008a`c97ffc10 00007ff8`0

The stack shows the path from the Mojo message dispatch (mojo::Connector::DispatchMessageW) through media::mojom::AudioEncoderStubDispatch::AcceptWithResponder and media::MojoAudioEncoderService::Encode, into the type converter, then media::AudioBuffer::CopyFrom, and finally the AudioBuffer constructor where memcpy is called. The crash occurs in memcpy_avx_ermsb_Intel at audio_buffer.cc line 211, inside the AudioBuffer constructor.

Root cause

The AudioBuffer constructor in media/base/audio_buffer.cc computes data_size_per_channel from the frame_count parameter without sufficiently validating that frame_count matches the actual size of the data provided in the Mojo message. The data_size_per_channel value is then used as the size argument to memcpy, so if frame_count is larger than the real data, memcpy reads past the end of the source buffer. The report does not detail the exact validation that is missing or the precise check that should have been in place. The issue is reachable in this setup because the renderer can send Mojo messages to the GPU process, and with MojoJS enabled, web content can construct those messages directly.

Impact

The immediate effect is an out-of-bounds read on the heap in the GPU process. The report states that the out-of-bounds data can be transmitted back to the renderer process after encoding, which could lead to data leakage or further exploitation opportunities. The severity is medium, and the report does not provide a concrete demonstration of leaked data or of exploitation beyond the crash.

Fix

The report does not describe the fix that was applied. It only identifies the vulnerable code path and the missing validation of frame_count. A fix would need to ensure that frame_count is validated against the actual data size before data_size_per_channel is computed and used in memcpy.

Variants to test

  • Other Mojo interfaces that accept a frame count or size field and use it to compute a buffer length for memcpy or similar operations. A positive result is a crash or an out-of-bounds read when the field is larger than the supplied data.
  • Audio or video buffer creation paths in other services (for example, other media services) that convert Mojo structs into native buffers. A positive result is a similar mismatch between the declared size and the actual data.
  • Any place where a Mojo message field is used directly as a size argument without cross-checking against the actual payload length. A positive result is a sanitizer report or a debugger break on an out-of-bounds access.

Hunting notes

This kind of bug tends to hide in Mojo service boundaries where a renderer-supplied structure is converted into a native object and a length field is trusted. During recon, look for Mojo interfaces exposed to the renderer, especially those that deal with media buffers, and check whether size or count fields are validated against the actual data. The researcher showed impact by triggering a crash in the GPU process and by explaining that the out-of-bounds data could be returned to the renderer after encoding. The report does not include the proof-of-concept file, so the exact Mojo message construction is not shown.

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. 18 min read.

What happened, in plain words

Google Chrome is made of several separate programs that run side by side. One of them, the renderer, is the part that turns a web page into something you can see and click. Another, the GPU process, handles graphics and some media work. These programs are deliberately kept apart so that a broken or malicious web page cannot easily reach the rest of the computer. To get anything done across that wall, they send each other messages through a system called Mojo.

This report is about one of those messages. With MojoJS enabled, a web page can ask Chrome to encode some audio. The request travels from the renderer to a media service running in the GPU process. The message contains an audio buffer, which is simply a block of sound data plus a description of it: how many channels, how many samples per channel, and so on. One of those description fields is called frame_count, the number of audio frames (individual samples) in the buffer.

When the GPU process receives the message, it builds a native object called media::AudioBuffer from it. To do that, it works out how many bytes each channel occupies by multiplying the frame count by the size of one sample. It then copies that many bytes out of the incoming data with a low-level copying function called memcpy. The problem: the frame count is not checked properly against how much data actually arrived. If a page claims a bigger frame count than the data it sent, memcpy keeps reading past the end of the real data. That is an out-of-bounds read: reading memory that was never meant to be read.

The report goes further. The data read past the end sits on the heap, the general-purpose memory area where programs keep their working data. After the audio is encoded, that data can travel back to the renderer. In other words, the report warns that a page might be able to make Chrome hand it fragments of memory it should never see. That is why the report calls it an information leak.

The bug was given the identifier CVE-2025-1919 and rated medium severity. The reporters are @Bl1nnnk and @Pisanbao, the Chrome VRP paid a bounty of 2000.00 USD, and the advisory was disclosed on 2025-03-04.

Context

Chrome's media stack includes a Mojo service called MojoAudioEncoderService. It runs in the GPU process and encodes audio on behalf of the renderer. The renderer sends an AudioBuffer structure over Mojo, and the service converts it into a native media::AudioBuffer before encoding. The conversion is handled by mojo::TypeConverter<scoped_refptr<media::AudioBuffer>, mojo::StructPtr<media::mojom::AudioBuffer>>::Convert in media/mojo/common/media_type_converters.cc. The native AudioBuffer constructor in media/base/audio_buffer.cc takes a frame_count parameter and uses it to compute data_size_per_channel, the number of bytes per channel, which is then passed as the size argument to memcpy.

A few of those words deserve a plain explanation before we go on.

  • A service here is a piece of Chrome that offers a specific job to other parts of the browser, like a counter clerk who only handles one kind of form.
  • Mojo is Chrome's internal messaging system. Think of it as the internal post office: one part of the browser writes a message, the post office delivers it to another part, and the receiving part acts on it.
  • A type converter is the translator at the receiving end. The message arrives in Mojo's own format, and the converter turns it into the native C++ object the rest of the code expects. If the translator trusts a number in the message without checking it, trouble follows.
  • memcpy is a standard C library function that copies a given number of bytes from one place in memory to another. It does exactly what it is told. If you tell it to copy more bytes than exist at the source, it happily reads whatever lies beyond, which is the bug in this report.

The report describes an out-of-bounds read caused by insufficient validation of frame_count when an AudioBuffer is created from Mojo data. The bug was assigned CVE-2025-1919 and rated medium severity. The reporters are @Bl1nnnk and @Pisanbao, and the Chrome VRP awarded a bounty of 2000.00 USD. The advisory was disclosed on 2025-03-04.

Setup

The researcher built Chrome with the following GN arguments:

Text
gn gen out/MediaMojoRelease --args="is_debug=false symbol_level=2 enable_nacl=false is_component_build=true dcheck_always_on=false"

Line by line:

  • gn gen out/MediaMojoRelease asks GN, Chrome's build-file generator, to prepare a build in a folder called out/MediaMojoRelease. GN does not compile anything itself; it writes the instructions that the compiler will follow.
  • --args="..." passes a list of build settings.
  • is_debug=false produces a release build, the optimised kind you would ship to users rather than a slow debugging build.
  • symbol_level=2 keeps full debugging symbols, the extra information that lets a debugger show function names and line numbers instead of bare addresses.
  • enable_nacl=false turns off NaCl, an older sandboxing technology for running native code in the browser. It is not needed here.
  • is_component_build=true builds Chrome as many separate shared libraries instead of one huge executable.
  • dcheck_always_on=false turns off DCHECKs, Chrome's internal consistency checks.

This produces a release build with symbols, component build enabled, NaCl disabled, and DCHECKs turned off. The build output directory is out/MediaMojoRelease.

Chrome was then launched with MojoJS and MojoJSTest features enabled:

Text
Release\chrome.exe  --enable-blink-features=MojoJS,MojoJSTest
  • Release\chrome.exe is the browser executable that was just built, inside the Release folder.
  • --enable-blink-features=MojoJS,MojoJSTest is a command-line switch. Blink is Chrome's rendering engine, and this switch turns on two experimental features. MojoJS exposes the Mojo messaging system to JavaScript running in a page, and Normally a web page has no way to speak Mojo directly; this flag gives it one.

These flags expose the Mojo JavaScript bindings to web content, allowing a page to talk directly to Mojo interfaces. The researcher notes that they attached a debugger to the GPU process because ASAN did not capture the case. ASAN is AddressSanitizer, a tool that watches memory accesses during a special instrumented build and reports out-of-bounds reads and writes. Here it did not catch the problem, so the researcher used a debugger instead: a program that lets you pause another program and inspect it. The crash is triggered by visiting a poc.html page, a proof-of-concept page written for the experiment.

Finding it

The researcher identified that the frame_count parameter is not sufficiently validated when an AudioBuffer is constructed from Mojo data. In media/base/audio_buffer.cc, frame_count is used to calculate data_size_per_channel, which represents the size of the data per audio channel. That value is subsequently used as the size parameter in a memcpy call. If frame_count is larger than the actual amount of data supplied, the memcpy reads beyond the end of the source buffer, producing an out-of-bounds read.

An everyday comparison: imagine a form that says "I have enclosed 100 pages" and a clerk who copies 100 pages out of the envelope without counting what is really inside. If the envelope holds 10 pages, the clerk keeps copying whatever happens to lie on the desk next to it. The frame count is the claim on the form, and memcpy is the clerk.

The report also notes that the out-of-bounds data located on the heap can be transmitted back to the renderer process after encoding, leading to potential data leakage or further exploitation opportunities. The heap is the area of memory a program uses for data whose size is only known while it runs, as opposed to the stack, which holds short-lived local variables. Reading past the end of a heap buffer can pick up other data the same process was working with.

A bisect note says the vulnerability may exist in the first commit of AudioBuffer, referencing commit [redacted] for media/base/audio_buffer.cc. A bisect is a way of finding when a bug appeared by testing versions in the middle of a range and narrowing down, the same way you find a word in a dictionary by opening it in the middle. Here the note suggests the flaw may have existed since the file was first added.

Exploitation

Step 1: Build Chrome

Text
gn gen out/MediaMojoRelease --args="is_debug=false symbol_level=2 enable_nacl=false is_component_build=true dcheck_always_on=false"

This generates a release build with symbols and component build, disabling NaCl and DCHECKs. The output goes to out/MediaMojoRelease.

Step 2: Launch Chrome with MojoJS enabled

Text
Release\chrome.exe  --enable-blink-features=MojoJS,MojoJSTest

The --enable-blink-features=MojoJS,MojoJSTest flag exposes the Mojo JavaScript bindings to web pages, which is necessary for the proof of concept to reach the Mojo interfaces directly.

Step 3: Attach a debugger to the GPU process

The researcher attached a debugger to the GPU process because ASAN did not capture the crash. This is a debugging aid, not part of the attack itself. It lets the researcher pause the process at the moment of the bad read and look at the call stack, the list of function calls that led there.

Step 4: Visit poc.html

Loading the poc.html page triggers the crash. The report does not include the contents of poc.html, so the exact Mojo messages and parameters used are not shown here.

The crash state shows the call stack at the point of the out-of-bounds read:

Text
00 0000008a`c97fc838 00007fff`09cd0762     VCRUNTIME140!memcpy_avx_ermsb_Intel+0x2e9 [D:\a\_work\1\s\src\vctools\crt\vcruntime\src\string\amd64\Intel\memcpy_avx_ermsb_aligned.asm @ 363]
01 0000008a`c97fc840 00007fff`09cd1767     media!media::AudioBuffer::AudioBuffer+0x7a2 [F:\Chromium\src\media\base\audio_buffer.cc @ 211]
*** WARNING: Unable to verify checksum for D:\Chromium\dev_6876\Release\media_mojo_services.dll
02 0000008a`c97fc940 00007ffe`9319e359     media!media::AudioBuffer::CopyFrom+0xd7 [F:\Chromium\src\media\base\audio_buffer.cc @ 305]
03 0000008a`c97fca30 00007ffe`92fe96e1     media_mojo_services!mojo::TypeConverter<scoped_refptr<media::AudioBuffer>,mojo::StructPtr<media::mojom::AudioBuffer> >::Convert+0x679 [F:\Chromium\src\media\mojo\common\media_type_converters.cc @ 250]
04 (Inline Function) --------`--------     media_mojo_services!mojo::StructPtr<media::mojom::AudioBuffer>::To+0x8 [F:\Chromium\src\mojo\public\cpp\bindings\struct_ptr.h @ 67]
05 0000008a`c97fcc40 00007ffe`9306879c     media_mojo_services!media::MojoAudioEncoderService::Encode+0x61 [F:\Chromium\src\media\mojo\services\mojo_audio_encoder_service.cc @ 52]
06 0000008a`c97fcd00 00007ffe`92fd9d9c     media_mojo_services!media::mojom::AudioEncoderStubDispatch::AcceptWithResponder+0x59c [F:\Chromium\src\out\Release\gen\media\mojo\mojom\audio_encoder.mojom.cc @ 1005]
*** WARNING: Unable to verify checksum for D:\Chromium\dev_6876\Release\mojo_public_cpp_bindings.dll
07 0000008a`c97fce80 00007fff`c14841e7     media_mojo_services!media::mojom::AudioEncoderStub<mojo::UniquePtrImplRefTraits<media::mojom::AudioEncoder,std::__Cr::default_delete<media::mojom::AudioEncoder> > >::AcceptWithResponder+0x3c [F:\Chromium\src\out\Release\gen\media\mojo\mojom\audio_encoder.mojom.h @ 229]
08 0000008a`c97fced0 00007fff`c148e13d     mojo_public_cpp_bindings!mojo::InterfaceEndpointClient::HandleValidatedMessage+0x727 [F:\Chromium\src\mojo\public\cpp\bindings\lib\interface_endpoint_client.cc @ 1032]
09 0000008a`c97fd100 00007fff`c1486b85     mojo_public_cpp_bindings!mojo::MessageDispatcher::Accept+0xed [F:\Chromium\src\mojo\public\cpp\bindings\lib\message_dispatcher.cc @ 48]
0a 0000008a`c97fd1b0 00007fff`c1493c9a     mojo_public_cpp_bindings!mojo::InterfaceEndpointClient::HandleIncomingMessage+0x375 [F:\Chromium\src\mojo\public\cpp\bindings\lib\interface_endpoint_client.cc @ 751]
0b 0000008a`c97fd370 00007fff`c14931a8     mojo_public_cpp_bindings!mojo::internal::MultiplexRouter::ProcessIncomingMessage+0x5ca [F:\Chromium\src\mojo\public\cpp\bindings\lib\multiplex_router.cc @ 1120]
0c 0000008a`c97fd4a0 00007fff`c148e189     mojo_public_cpp_bindings!mojo::internal::MultiplexRouter::Accept+0x1f8 [F:\Chromium\src\mojo\public\cpp\bindings\lib\multiplex_router.cc @ 737]
0d 0000008a`c97fd6f0 00007fff`c147861b     mojo_public_cpp_bindings!mojo::MessageDispatcher::Accept+0x139 [F:\Chromium\src\mojo\public\cpp\bindings\lib\message_dispatcher.cc @ 43]
0e 0000008a`c97fd7a0 00007fff`c147926d     mojo_public_cpp_bindings!mojo::Connector::DispatchMessageW+0x38b [F:\Chromium\src\mojo\public\cpp\bindings\lib\connector.cc @ 561]
0f 0000008a`c97fd930 00007fff`c1478ef7     mojo_public_cpp_bindings!mojo::Connector::ReadAllAvailableMessages+0x14d [F:\Chromium\src\mojo\public\cpp\bindings\lib\connector.cc @ 620]
10 (Inline Function) --------`--------     mojo_public_cpp_bindings!mojo::Connector::OnHandleReadyInternal+0x2c [F:\Chromium\src\mojo\public\cpp\bindings\lib\connector.cc @ 452]
11 0000008a`c97fd9e0 00007fff`c1479d8a     mojo_public_cpp_bindings!mojo::Connector::OnWatcherHandleReady+0x57 [F:\Chromium\src\mojo\public\cpp\bindings\lib\connector.cc @ 418]
*** WARNING: Unable to verify checksum for D:\Chromium\dev_6876\Release\mojo_public_system_cpp.dll
12 0000008a`c97fda30 00007fff`56c1d002     mojo_public_cpp_bindings!base::RepeatingCallback<void (unsigned int)>::Run+0xaa [F:\Chromium\src\base\functional\callback.h @ 345]
13 0000008a`c97fdac0 00007fff`56c1ce19     mojo_public_system_cpp!base::RepeatingCallback<void (unsigned int, const mojo::HandleSignalsState &)>::Run+0xb2 [F:\Chromium\src\base\functional\callback.h @ 345]
*** WARNING: Unable to verify checksum for D:\Chromium\dev_6876\Release\base.dll
14 0000008a`c97fdb50 00007fff`26601b64     mojo_public_system_cpp!mojo::SimpleWatcher::OnHandleReady+0x139 [F:\Chromium\src\mojo\public\cpp\system\simple_watcher.cc @ 279]
15 0000008a`c97fdbf0 00007fff`266d5614     base!base::OnceCallback<void ()>::Run+0x94 [F:\Chromium\src\base\functional\callback.h @ 156]
16 0000008a`c97fdc70 00007fff`2673a373     base!base::TaskAnnotator::RunTaskImpl+0x154 [F:\Chromium\src\base\task\common\task_annotator.cc @ 209]
17 (Inline Function) --------`--------     base!base::TaskAnnotator::RunTask+0x54 [F:\Chromium\src\base\task\common\task_annotator.h @ 106]
18 (Inline Function) --------`--------     base!base::internal::TaskTracker::RunTaskImpl+0x78 [F:\Chromium\src\base\task\thread_pool\task_tracker.cc @ 677]
19 0000008a`c97fdd10 00007fff`267396e5     base!base::internal::TaskTracker::RunSkipOnShutdown+0xc3 [F:\Chromium\src\base\task\thread_pool\task_tracker.cc @ 662]
1a (Inline Function) --------`--------     base!base::internal::TaskTracker::RunTaskWithShutdownBehavior+0x43 [F:\Chromium\src\base\task\thread_pool\task_tracker.cc @ 692]
1b 0000008a`c97fddd0 00007fff`26738ea0     base!base::internal::TaskTracker::RunTask+0x495 [F:\Chromium\src\base\task\thread_pool\task_tracker.cc @ 520]
1c 0000008a`c97ff770 00007fff`267481c1     base!base::internal::TaskTracker::RunAndPopNextTask+0x310 [F:\Chromium\src\base\task\thread_pool\task_tracker.cc @ 417]
1d 0000008a`c97ffa20 00007fff`26747cd8     base!base::internal::WorkerThread::RunWorker+0x3c1 [F:\Chromium\src\base\task\thread_pool\worker_thread.cc @ 493]
1e 0000008a`c97ffbd0 00007fff`267cbc47     base!base::internal::WorkerThread::RunSharedWorker+0x18 [F:\Chromium\src\base\task\thread_pool\worker_thread.cc @ 390]
1f 0000008a`c97ffc10 00007ff8`0

How to read this: each line is one frame of the call stack, numbered from the top. The top line is where the program was at the moment of the crash, and each line below is the function that called the one above it. The first column is the frame number, the next two are memory addresses, then comes the function name with an offset, and finally the source file and line number.

  • Frame 00 is memcpy_avx_ermsb_Intel, the low-level copy routine, inside the Visual C++ runtime library VCRUNTIME140. This is where the bad read physically happens.
  • Frame 01 is the media::AudioBuffer::AudioBuffer constructor at audio_buffer.cc line 211. This is the code that called memcpy with the oversized length.
  • Frame 02 is media::AudioBuffer::CopyFrom at line 305, the function that fills the buffer with incoming data.
  • Frame 03 is the type converter Convert at media_type_converters.cc line 250, the translator that turns the Mojo message into a native buffer.
  • Frame 04 is an inlined helper, mojo::StructPtr<media::mojom::AudioBuffer>::To, which simply calls the converter.
  • Frame 05 is media::MojoAudioEncoderService::Encode, the service method that received the encode request.
  • Frames 06 and 07 are the generated Mojo dispatch code that routes an incoming message to the right method.
  • Frames 08 to 11 are Mojo's plumbing for receiving and validating a message on an endpoint.
  • Frames 0b to 0f are the lower-level router and connector that read bytes off the pipe and dispatch them.
  • Frames 12 to 1e are Chrome's task system: callbacks, task runners and worker threads that schedule work.
  • Frame 1f is Chrome's thread entry function, and frames 20 to 21 are the operating system's thread start-up code.

The stack shows the path from the Mojo message dispatch (mojo::Connector::DispatchMessageW) through media::mojom::AudioEncoderStubDispatch::AcceptWithResponder and media::MojoAudioEncoderService::Encode, into the type converter, then media::AudioBuffer::CopyFrom, and finally the AudioBuffer constructor where memcpy is called. The crash occurs in memcpy_avx_ermsb_Intel at audio_buffer.cc line 211, inside the AudioBuffer constructor.

Root cause

The AudioBuffer constructor in media/base/audio_buffer.cc computes data_size_per_channel from the frame_count parameter without sufficiently validating that frame_count matches the actual size of the data provided in the Mojo message. The data_size_per_channel value is then used as the size argument to memcpy, so if frame_count is larger than the real data, memcpy reads past the end of the source buffer. The report does not detail the exact validation that is missing or the precise check that should have been in place. The issue is reachable in this setup because the renderer can send Mojo messages to the GPU process, and with MojoJS enabled, web content can construct those messages directly.

In plain terms: the receiving side believes a number supplied by the sender. A sender that lies about how much data it enclosed makes the receiver copy more than exists. The fix would be to compare the claimed frame count with the real payload size before doing any copying.

Impact

The immediate effect is an out-of-bounds read on the heap in the GPU process. The report states that the out-of-bounds data can be transmitted back to the renderer process after encoding, which could lead to data leakage or further exploitation opportunities. The severity is medium, and the report does not provide a concrete demonstration of leaked data or of exploitation beyond the crash.

Why does reading the wrong memory matter? The heap holds other values the process was working with. Next to the audio data there may be other values the program was working with, and if those bytes are copied into the encoded output and sent back, the page that asked for the encoding receives them. That is the information leak. The report stops at describing the possibility; it does not show actual leaked content.

Fix

It only identifies the vulnerable code path and the missing validation of frame_count. A fix would need to ensure that frame_count is validated against the actual data size before data_size_per_channel is computed and used in memcpy.

Variants to test

Once you understand one bug of this shape, you can look for siblings.

  • Other Mojo interfaces that accept a frame count or size field and use it to compute a buffer length for memcpy or similar operations. A positive result is a crash or an out-of-bounds read when the field is larger than the supplied data.
  • Audio or video buffer creation paths in other services (for example, other media services) that convert Mojo structs into native buffers. A positive result is a similar mismatch between the declared size and the actual data.
  • Any place where a Mojo message field is used directly as a size argument without cross-checking against the actual payload length. A positive result is a sanitizer report or a debugger break on an out-of-bounds access.

Hunting notes

This kind of bug tends to hide in Mojo service boundaries where a renderer-supplied structure is converted into a native object and a length field is trusted. During recon, look for Mojo interfaces exposed to the renderer, especially those that deal with media buffers, and check whether size or count fields are validated against the actual data. The researcher showed impact by triggering a crash in the GPU process and by explaining that the out-of-bounds data could be returned to the renderer after encoding. The report does not include the proof-of-concept file, so the exact Mojo message construction is not shown.

Glossary

  • API: a defined way for one piece of software to ask another piece of software to do something, like a service counter with a fixed list of forms you can submit.
  • ASAN (AddressSanitizer): a tool built into a special version of a program that watches memory accesses and reports reads or writes outside the intended area.
  • Audio buffer: a block of sound data together with a description of it, such as channel count and sample count.
  • Bisect: finding the change that introduced a bug by testing versions in the middle of a range and narrowing the range step by step.
  • Blink: Chrome's rendering engine, the part that turns HTML and CSS into what you see.
  • Bounty: a payment made by a vendor to a researcher who reports a valid security bug.
  • Callback: a function handed to another piece of code so it can be called later when something happens.
  • Channel (audio): one stream of sound, for example the left or right speaker.
  • Commit: a recorded change in a source code repository, identified by a long hexadecimal string.
  • Component build: a build of Chrome made of many separate shared libraries rather than one large executable.
  • CVE: a public identifier for a known security vulnerability, so people can refer to it unambiguously.
  • Debugger: a program that lets you pause another program, inspect its memory and step through its code.
  • DCHECK: an internal consistency check in Chrome that aborts the program when a condition fails; usually only active in development builds.
  • Frame (audio): one sample per channel at a given moment in time; the unit that frame_count counts.
  • GPU process: the separate Chrome process that handles graphics and some media work.
  • GN: Chrome's build-file generator, which prepares instructions for the compiler.
  • Heap: the area of memory a program uses for data whose size is only known while it runs.
  • Information leak: a bug that lets data the program was not supposed to reveal reach someone who can read it.
  • Interface (Mojo): a named set of methods that one part of Chrome offers to another over Mojo.
  • JavaScript bindings: code that lets JavaScript call into a lower-level system, here Mojo.
  • memcpy: a standard C function that copies a given number of bytes from one memory location to another, trusting the caller about the length.
  • Mojo: Chrome's internal messaging system used for communication between its processes.
  • MojoJS: an experimental Chrome feature that exposes Mojo to JavaScript in web pages.
  • NaCl: an older Chrome technology for running native code inside a sandbox; disabled in this build.
  • Out-of-bounds read: reading memory outside the area a program intended to read, which can expose unrelated data.
  • Proof of concept (PoC): a small file or program that demonstrates a bug, here poc.html.
  • Release build: an optimised build intended for normal use, as opposed to a debugging build.
  • Renderer: the Chrome process that turns a web page into what you see and interact with.
  • Sandbox: a restriction that keeps one part of a program from freely touching the rest of the system.
  • Service (Chrome): a part of Chrome that offers a specific job to other parts.
  • Severity: a rating of how serious a vulnerability is, here medium.
  • Stack (call stack): the list of function calls currently in progress, from the most recent at the top to the oldest at the bottom.
  • Symbols: extra information in a build that lets a debugger show function names and line numbers instead of raw addresses.
  • Type converter: code that translates a message in one format into a native object in another.
  • Validation: checking that incoming data is sensible and consistent before using it.
  • VRP (Chrome Vulnerability Reward Program): Google's programme that pays researchers for reporting Chrome security bugs.

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.