Use after free in Media (CVE-2025-5958)
A race condition in Chromium's media pipeline lets an AudioRendererImpl object be freed on the media thread while the audio output device thread still calls into it, producing a heap use-after-free. An attacker who gets a victim to load a crafted page with a media element could crash the tab and potentially corrupt memory.
Originally disclosed on Chrome VRP
- Fix shipped in 17 days
Steps to reproduce the problem
- fetch asan-linux-release-1460407
- serve poc.html and big-buck-bunny_trailer.webm on port 8080
- ./chrome --autoplay-policy=no-user-gesture-required http://127.0.0.1:8080/poc.html
Since this is a race condition issue, the POC cannot guarantee stable triggering. You can try a few more times.
Problem Description
When the HTMLMediaElement loads a resource file, it creates a WebMediaPlayerImpl object in HTMLMediaElement::StartPlayerLoad, and subsequently calls WebMediaPlayerImpl::Load.
void HTMLMediaElement::StartPlayerLoad() {
...
web_media_player_ =
frame->Client()->CreateWebMediaPlayer(*this, source, this);
...
auto load_timing = web_media_player_->Load(GetLoadType(), source, CorsMode(),
is_cache_disabled);
...
}
In WebMediaPlayerImpl::Load, WebMediaPlayerImpl::StartPipeline is invoked to start the rendering pipeline. Then, RendererImplFactory::CreateRenderer is called to create an AudioRendererImpl object. The pointer to the AudioRendererImpl object is passed to RendererImpl.
std::unique_ptr<Renderer> RendererImplFactory::CreateRenderer(
const scoped_refptr<base::SequencedTaskRunner>& media_task_runner,
const scoped_refptr<base::TaskRunner>& worker_task_runner,
AudioRendererSink* audio_renderer_sink,
VideoRendererSink* video_renderer_sink,
RequestOverlayInfoCB request_overlay_info_cb,
const gfx::ColorSpace& target_color_space) {
DCHECK(audio_renderer_sink);
std::unique_ptr<AudioRenderer> audio_renderer(new AudioRendererImpl(
media_task_runner, audio_renderer_sink,
// Unretained is safe here, because the RendererFactory is guaranteed to
// outlive the RendererImpl. The RendererImpl is destroyed when WMPI
// destructor calls pipeline_controller_.Stop() -> PipelineImpl::Stop() ->
// RendererWrapper::Stop -> RendererWrapper::DestroyRenderer(). And the
// RendererFactory is owned by WMPI and gets called after WMPI destructor
// finishes.
base::BindRepeating(&RendererImplFactory::CreateAudioDecoders,
base::Unretained(this), media_task_runner),
media_log_, media_player_id_
#if BUILDFLAG(IS_ANDROID)
));
#else
,
speech_recognition_client_.get()));
#endif
...
return std::make_unique<RendererImpl>(
media_task_runner, std::move(audio_renderer), std::move(video_renderer));
}
When the Iframe is destroyed, that is, after LocalDOMWindow::FrameDestroyed is called, it triggers the callback media::PipelineImpl::RendererWrapper::CompleteSuspend. In this callback, PipelineImpl::RendererWrapper::DestroyRenderer is called to release the previously allocated RendererImpl object, and the corresponding AudioRendererImpl is also released. PipelineImpl::RendererWrapper::DestroyRenderer is executed in the Media thread.
void PipelineImpl::RendererWrapper::DestroyRenderer() {
DCHECK(media_task_runner_->RunsTasksInCurrentSequence());
// Destroy the renderer outside the lock scope to avoid holding the lock
// while renderer is being destroyed (in case Renderer destructor is costly).
std::unique_ptr<Renderer> renderer;
{
base::AutoLock auto_lock(shared_state_lock_);
renderer.swap(shared_state_.renderer);
}
}
At this time, the pointer to the AudioRendererImpl object is still being used in the AudioOutputDevice thread, causing a UAF issue.
int Render(base::TimeDelta delay,
base::TimeTicks delay_timestamp,
const media::AudioGlitchInfo& glitch_info,
media::AudioBus* audio_bus) override {
...
const int num_rendered_frames =
renderer_->Render(delay, delay_timestamp, glitch_info, audio_bus);
...
}
Summary
Security: Race condition in AudioRendererImpl
Custom Questions
Type of crash:
tab
Crash state:
=================================================================
==1==ERROR: AddressSanitizer: heap-use-after-free on address 0x756ff4952e98 at pc 0x572c7929ef02 bp 0x72c4e73fced0 sp 0x72c4e73fcec8
READ of size 1 at 0x756ff4952e98 thread T3144 (AudioOutputDevi)
==1==WARNING: invalid path to external symbolizer!
==1==WARNING: Failed to use and restart external symbolizer!
#0 0x572c7929ef01 in base::internal::(anonymous namespace)::CrashImmediatelyOnUseAfterFree(unsigned long) _asan_rtl_:17
#1 0x572c7929ea85 in base::internal::(anonymous namespace)::SafelyUnwrapForDereference(unsigned long) _asan_rtl_:5
#2 0x572c88865663 in SafelyUnwrapPtrForDereference<media::AudioRendererSink::RenderCallback> ./../../base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_hookable_impl.h:84:9
#3 0x572c88865663 in GetForDereference ./../../base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr.h:996:12
#4 0x572c88865663 in operator-> ./../../base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr.h:665:12
#5 0x572c88865663 in blink::WebAudioSourceProviderImpl::TeeFilter::Render(base::TimeDelta, base::TimeTicks, media::AudioGlitchInfo const&, media::AudioBus*) ./../../third_party/blink/renderer/platform/media/web_audio_source_provider_impl.cc:62:9
#6 0x572c8d80d4af in blink::AudioRendererMixerInput::ProvideInput(media::AudioBus*, unsigned int, media::AudioGlitchInfo const&) ./../../third_party/blink/renderer/modules/media/audio/audio_renderer_mixer_input.cc:241:18
#7 0x572c66603e51 in media::AudioConverter::SourceCallback(int, media::AudioBus*) ./../../media/base/audio_converter.cc:224:33
#8 0x572c66603537 in media::AudioConverter::ProvideInput(int, media::AudioBus*) ./../../media/base/audio_converter.cc:266:5
#9 0x572c66606046 in Invoke<void (AudioConverter::*)(int, media::AudioBus *), media::AudioConverter *, int, media::AudioBus *> ./../../base/functional/bind_internal.h:731:12
#10 0x572c66606046 in MakeItSo<void (AudioConverter::*const &)(int, media::AudioBus *), const std::__Cr::tuple<base::internal::UnretainedWrapper<media::AudioConverter, base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0> > &, int, media::AudioBus *> ./../../base/functional/bind_internal.h:923:12
#11 0x572c66606046 in RunImpl<void (AudioConverter::*const &)(int, media::AudioBus *), const std::__Cr::tuple<base::internal::UnretainedWrapper<media::AudioConverter, base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0> > &, 0UL> ./../../base/functional/bind_internal.h:1060:14
#12 0x572c66606046 in base::internal::Invoker<base::internal::FunctorTraits<void (media::AudioConverter::* const&)(int, media::AudioBus*), media::AudioConverter*>, base::internal::BindState<true, true, false, void (media::AudioConverter::*)(int, media::AudioBus*), base::internal::UnretainedWrapper<media::AudioConverter, base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0>>, void (int, media::AudioBus*)>::Run(base::internal::BindStateBase*, int, media::AudioBus*) ./../../base/functional/bind_internal.h:980:12
#13 0x572c66619950 in base::RepeatingCallback<void (int, media::AudioBus*)>::Run(int, media::AudioBus*) const & ./../../base/functional/callback.h:344:12
#14 0x572c6669cf0c in media::MultiChannelResampler::ProvideInput(int, int, float*) ./../../media/base/multi_channel_resampler.cc:105:14
#15 0x572c6669e3cd in Invoke<void (MultiChannelResampler::*)(int, int, float *), media::MultiChannelResampler *, const int &, int, float *> ./../../base/functional/bind_internal.h:731:12
#16 0x572c6669e3cd in MakeItSo<void (MultiChannelResampler::*const &)(int, int, float *), const std::__Cr::tuple<base::internal::UnretainedWrapper<media::MultiChannelResampler, base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0>, int> &, int, float *> ./../../base/functional/bind_internal.h:923:12
#17 0x572c6669e3cd in RunImpl<void (MultiChannelResampler::*const &)(int, int, float *), const std::__Cr::tuple<base::internal::UnretainedWrapper<media::MultiChannelResampler, base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0>, int> &, 0UL, 1UL> ./../../base/functional/bind_internal.h:1060:14
#18 0x572c6669e3cd in base::internal::Invoker<base::internal::FunctorTraits<void (media::MultiChannelResampler::* const&)(int, int, float*), media::MultiChannelResampler*, int const&>, base::internal::BindState<true, true, false, void (media::MultiChannelResampler::*)(int, int, float*), base::internal::UnretainedWrapper<media::MultiChannelResampler, base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0>, int>, void (int, float*)>::Run(base::internal::BindStateBase*, int, float*) ./../../base/functional/bind_internal.h:980:12
#19 0x572c666e73c0 in base::RepeatingCallback<void (int, float*)>::Run(int, float*) const & ./../../base/functional/callback.h:344:12
#20 0x572c666e6ea2 in media::SincResampler::Resample(int, float*) ./../../media/base/sinc_resampler.cc:348:14
#21 0x572c6669d4ba in media::MultiChannelResampler::Resample(int, media::AudioBus*) ./../../media/base/multi_channel_resampler.cc:59:21
#22 0x572c66605b7a in media::AudioConverter::ConvertWithInfo(unsigned int, media::AudioGlitchInfo const&, media::AudioBus*) ./../../media/base/audio_converter.cc:160:19
#23 0x572c6668269d in media::LoopbackAudioConverter::ProvideInput(media::AudioBus*, unsigned int, media::AudioGlitchInfo const&) ./../../media/base/loopback_audio_converter.cc:21:20
#24 0x572c66603e51 in media::AudioConverter::SourceCallback(int, media::AudioBus*) ./../../media/base/audio_converter.cc:224:33
#25 0x572c66605bf9 in media::AudioConverter::ConvertWithInfo(unsigned int, media::AudioGlitchInfo const&, media::AudioBus*) ./../../media/base/audio_converter.cc:157:5
#26 0x572c8d8108fc in blink::AudioRendererMixer::Render(base::TimeDelta, base::TimeTicks, media::AudioGlitchInfo const&, media::AudioBus*) ./../../third_party/blink/renderer/modules/media/audio/audio_renderer_mixer.cc:155:24
#27 0x572c66583d5b in media::AudioOutputDeviceThreadCallback::Process(unsigned int) ./../../media/audio/audio_output_device_thread_callback.cc:96:21
#28 0x572c66554072 in media::AudioDeviceThread::ThreadMain() ./../../media/audio/audio_device_thread.cc:114:18
#29 0x572c79531ede in base::(anonymous namespace)::ThreadFunc(void*) ./../../base/threading/platform_thread_posix.cc:103:13
#30 0x572c6389b186 in asan_thread_start(void*) _asan_rtl_:28
0x756ff4952e98 is located 24 bytes inside of 552-byte region [0x756ff4952e80,0x756ff49530a8)
freed by thread T10 (Media) here:
#0 0x572c638d7492 in operator delete(void*, unsigned long) _asan_rtl_:3
#1 0x572c67c13a71 in operator() ./../../third_party/libc++/src/include/__memory/unique_ptr.h:76:5
#2 0x572c67c13a71 in reset ./../../third_party/libc++/src/include/__memory/unique_ptr.h:287:7
#3 0x572c67c13a71 in media::RendererImpl::~RendererImpl() ./../../media/renderers/renderer_impl.cc:128:19
#4 0x572c67c14ab3 in media::RendererImpl::~RendererImpl() ./../../media/renderers/renderer_impl.cc:116:31
#5 0x572c666ab313 in operator() ./../../third_party/libc++/src/include/__memory/unique_ptr.h:76:5
#6 0x572c666ab313 in reset ./../../third_party/libc++/src/include/__memory/unique_ptr.h:287:7
#7 0x572c666ab313 in ~unique_ptr ./../../third_party/libc++/src/include/__memory/unique_ptr.h:256:71
#8 0x572c666ab313 in DestroyRenderer ./../../media/base/pipeline_impl.cc:1191:1
#9 0x572c666ab313 in media::PipelineImpl::RendererWrapper::CompleteSuspend(media::TypedStatus<media::PipelineStatusTraits>) ./../../media/base/pipeline_impl.cc:1083:3
#10 0x572c666bd754 in void base::internal::DecayedFunctorTraits<void (media::PipelineImpl::RendererWrapper::*)(media::TypedStatus<media::PipelineStatusTraits>), base::WeakPtr<media::PipelineImpl::RendererWrapper>&&>::Invoke<void (media::PipelineImpl::RendererWrapper::*)(media::TypedStatus<media::PipelineStatusTraits>), base::WeakPtr<media::PipelineImpl::RendererWrapper> const&, media::TypedStatus<media::PipelineStatusTraits>>(void (media::PipelineImpl::RendererWrapper::*)(media::TypedStatus<media::PipelineStatusTraits>), base::WeakPtr<media::PipelineImpl::RendererWrapper> const&, media::TypedStatus<media::PipelineStatusTraits>&&) ./../../base/functional/bind_internal.h:731:12
#11 0x572c666bd4f4 in MakeItSo<void (RendererWrapper::*)(media::TypedStatus<media::PipelineStatusTraits>), std::__Cr::tuple<base::WeakPtr<media::PipelineImpl::RendererWrapper> >, media::TypedStatus<media::PipelineStatusTraits> > ./../../base/functional/bind_internal.h:947:5
#12 0x572c666bd4f4 in RunImpl<void (RendererWrapper::*)(media::TypedStatus<media::PipelineStatusTraits>), std::__Cr::tuple<base::WeakPtr<media::PipelineImpl::RendererWrapper> >, 0UL> ./../../base/functional/bind_internal.h:1060:14
#13 0x572c666bd4f4 in base::internal::Invoker<base::internal::FunctorTraits<void (media::PipelineImpl::RendererWrapper::*&&)(media::TypedStatus<media::PipelineStatusTraits>), base::WeakPtr<media::PipelineImpl::RendererWrapper>&&>, base::internal::BindState<true, true, false, void (media::PipelineImpl::RendererWrapper::*)(media::TypedStatus<media::PipelineStatusTraits>), base::WeakPtr<media::PipelineImpl::RendererWrapper>>, void (media::TypedStatus<media::PipelineStatusTraits>)>::RunOnce(base::internal::BindStateBase*, media::TypedStatus<media::PipelineStatusTraits>&&) ./../../base/functional/bind_internal.h:973:12
#14 0x572c666d6403 in Run ./../../base/functional/callback.h:156:12
#15 0x572c666d6403 in media::SerialRunner::RunNextInSeries(media::TypedStatus<media::PipelineStatusTraits>) ./../../media/base/serial_runner.cc:100:25
#16 0x572c666d7fb2 in void base::internal::DecayedFunctorTraits<void (media::SerialRunner::*)(media::TypedStatus<media::PipelineStatusTraits>), base::WeakPtr<media::SerialRunner>&&, media::PipelineStatusCodes&&>::Invoke<void (media::SerialRunner::*)(media::TypedStatus<media::PipelineStatusTraits>), base::WeakPtr<media::SerialRunner> const&, media::PipelineStatusCodes>(void (media::SerialRunner::*)(media::TypedStatus<media::PipelineStatusTraits>), base::WeakPtr<media::SerialRunner> const&, media::PipelineStatusCodes&&) ./../../base/functional/bind_internal.h:731:12
#17 0x572c666d7d4c in MakeItSo<void (SerialRunner::*)(media::TypedStatus<media::PipelineStatusTraits>), std::__Cr::tuple<base::WeakPtr<media::SerialRunner>, media::PipelineStatusCodes> > ./../../base/functional/bind_internal.h:947:5
#18 0x572c666d7d4c in RunImpl<void (SerialRunner::*)(media::TypedStatus<media::PipelineStatusTraits>), std::__Cr::tuple<base::WeakPtr<media::SerialRunner>, media::PipelineStatusCodes>, 0UL, 1UL> ./../../base/functional/bind_internal.h:1060:14
#19 0x572c666d7d4c in base::internal::Invoker<base::internal::FunctorTraits<void (media::SerialRunner::*&&)(media::TypedStatus<media::PipelineStatusTraits>), base::WeakPtr<media::SerialRunner>&&, media::PipelineStatusCodes&&>, base::internal::BindState<true, true, false, void (media::SerialRunner::*)(media::TypedStatus<media::PipelineStatusTraits>), base::WeakPtr<media::SerialRunner>, media::PipelineStatusCodes>, void ()>::RunOnce(base::internal::BindStateBase*) ./../../base/functional/bind_internal.h:973:12
#20 0x572c793e2086 in Run ./../../base/functional/callback.h:156:12
#21 0x572c793e2086 in base::TaskAnnotator::RunTaskImpl(base::PendingTask&) ./../../base/task/common/task_annotator.cc:209:34
#22 0x572c79454b77 in RunTask<(lambda at ../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:458:11)> ./../../base/task/common/task_annotator.h:106:5
#23 0x572c79454b77 in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::LazyNow*) ./../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:456:23
#24 0x572c79453a5c in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() ./../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:330:40
#25 0x572c7945566a in non-virtual thunk to base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() ./../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:0:0
#26 0x572c792aae63 in base::MessagePumpDefault::Run(base::MessagePump::Delegate*) ./../../base/message_loop/message_pump_default.cc:42:55
#27 0x572c79456224 in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool, base::TimeDelta) ./../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:629:12
#28 0x572c79364e0f in base::RunLoop::Run(base::Location const&) ./../../base/run_loop.cc:134:14
#29 0x572c794d9ffc in base::Thread::Run(base::RunLoop*) ./../../base/threading/thread.cc:344:13
#30 0x572c794da591 in base::Thread::ThreadMain() ./../../base/threading/thread.cc:419:3
#31 0x572c79531ede in base::(anonymous namespace)::ThreadFunc(void*) ./../../base/threading/platform_thread_posix.cc:103:13
#32 0x572c6389b186 in asan_thread_start(void*) _asan_rtl_:28
previously allocated by thread T0 (chrome) here:
#0 0x572c638d682d in operator new(unsigned long) _asan_rtl_:3
#1 0x572c67c28763 in media::RendererImplFactory::CreateRenderer(scoped_refptr<base::SequencedTaskRunner> const&, scoped_refptr<base::TaskRunner> const&, media::AudioRendererSink*, media::VideoRendererSink*, base::RepeatingCallback<void (bool, base::RepeatingCallback<void (media::OverlayInfo const&)>)>, gfx::ColorSpace const&) ./../../media/renderers/renderer_impl_factory.cc:89:49
#2 0x572c8e32e7d9 in blink::WebMediaPlayerImpl::CreateRenderer(std::__Cr::optional<media::RendererType>) ./../../third_party/blink/renderer/platform/media/web_media_player_impl.cc:2999:59
#3 0x572c8e35e110 in Invoke<std::__Cr::unique_ptr<media::Renderer, std::__Cr::default_delete<media::Renderer> > (WebMediaPlayerImpl::*)(std::__Cr::optional<media::RendererType>), blink::WebMediaPlayerImpl *, std::__Cr::optional<media::RendererType> > ./../../base/functional/bind_internal.h:731:12
#4 0x572c8e35e110 in MakeItSo<std::__Cr::unique_ptr<media::Renderer, std::__Cr::default_delete<media::Renderer> > (WebMediaPlayerImpl::*const &)(std::__Cr::optional<media::RendererType>), const std::__Cr::tuple<WTF::UnretainedWrapper<blink::WebMediaPlayerImpl> > &, std::__Cr::optional<media::RendererType> > ./../../base/functional/bind_internal.h:923:12
#5 0x572c8e35e110 in RunImpl<std::__Cr::unique_ptr<media::Renderer, std::__Cr::default_delete<media::Renderer> > (WebMediaPlayerImpl::*const &)(std::__Cr::optional<media::RendererType>), const std::__Cr::tuple<WTF::UnretainedWrapper<blink::WebMediaPlayerImpl> > &, 0UL> ./../../base/functional/bind_internal.h:1060:14
#6 0x572c8e35e110 in base::internal::Invoker<base::internal::FunctorTraits<std::__Cr::unique_ptr<media::Renderer, std::__Cr::default_delete<media::Renderer>> (blink::WebMediaPlayerImpl::* const&)(std::__Cr::optional<media::RendererType>), blink::WebMediaPlayerImpl*>, base::internal::BindState<true, true, false, std::__Cr::unique_ptr<media::Renderer, std::__Cr::default_delete<media::Renderer>> (blink::WebMediaPlayerImpl::*)(std::__Cr::optional<media::RendererType>), WTF::UnretainedWrapper<blink::WebMediaPlayerImpl>>, std::__Cr::unique_ptr<media::Renderer, std::__Cr::default_delete<media::Renderer>> (std::__Cr::optional<media::RendererType>)>::Run(base::internal::BindStateBase*, std::__Cr::optional<media::RendererType>&&) ./../../base/functional/bind_internal.h:980:12
#7 0x572c666b870d in base::RepeatingCallback<std::__Cr::unique_ptr<media::Renderer, std::__Cr::default_delete<media::Renderer>> (std::__Cr::optional<media::RendererType>)>::Run(std::__Cr::optional<media::RendererType>) const & ./../../base/functional/callback.h:344:12
#8 0x572c666b810e in media::PipelineImpl::Start(media::Pipeline::StartType, media::Demuxer*, media::Pipeline::Client*, base::OnceCallback<void (media::TypedStatus<media::PipelineStatusTraits>)>) ./../../media/base/pipeline_impl.cc:1310:44
#9 0x572c67a7dce1 in media::PipelineController::Start(media::Pipeline::StartType, media::Demuxer*, media::Pipeline::Client*, bool, bool) ./../../media/filters/pipeline_controller.cc:56:14
#10 0x572c8e354c30 in blink::WebMediaPlayerImpl::OnDemuxerCreated(media::Demuxer*, media::Pipeline::StartType, bool, bool) ./../../third_party/blink/renderer/platform/media/web_media_player_impl.cc:3027:25
#11 0x572c8e365a65 in Invoke<media::TypedStatus<media::PipelineStatusTraits> (WebMediaPlayerImpl::*)(media::Demuxer *, media::Pipeline::StartType, bool, bool), blink::WebMediaPlayerImpl *, media::Demuxer *, media::Pipeline::StartType, bool, bool> ./../../base/functional/bind_internal.h:731:12
#12 0x572c8e365a65 in MakeItSo<media::TypedStatus<media::PipelineStatusTraits> (WebMediaPlayerImpl::*)(media::Demuxer *, media::Pipeline::StartType, bool, bool), std::__Cr::tuple<WTF::UnretainedWrapper<blink::WebMediaPlayerImpl> >, media::Demuxer *, media::Pipeline::StartType, bool, bool> ./../../base/functional/bind_internal.h:923:12
#13 0x572c8e365a65 in RunImpl<media::TypedStatus<media::PipelineStatusTraits> (WebMediaPlayerImpl::*)(media::Demuxer *, media::Pipeline::StartType, bool, bool), std::__Cr::tuple<WTF::UnretainedWrapper<blink::WebMediaPlayerImpl> >, 0UL> ./../../base/functional/bind_internal.h:1060:14
#14 0x572c8e365a65 in base::internal::Invoker<base::internal::FunctorTraits<media::TypedStatus<media::PipelineStatusTraits> (blink::WebMediaPlayerImpl::*&&)(media::Demuxer*, media::Pipeline::StartType, bool, bool), blink::WebMediaPlayerImpl*>, base::internal::BindState<true, true, false, media::TypedStatus<media::PipelineStatusTraits> (blink::WebMediaPlayerImpl::*)(media::Demuxer*, media::Pipeline::StartType, bool, bool), WTF::UnretainedWrapper<blink::WebMediaPlayerImpl>>, media::TypedStatus<media::PipelineStatusTraits> (media::Demuxer*, media::Pipeline::StartType, bool, bool)>::RunOnce(base::internal::BindStateBase*, media::Demuxer*, media::Pipeline::StartType, bool, bool) ./../../base/functional/bind_internal.h:973:12
#15 0x572c67a5f442 in Run ./../../base/functional/callback.h:156:12
#16 0x572c67a5f442 in media::DemuxerManager::CreateDemuxer(bool, media::DataSource::Preload, bool, base::OnceCallback<media::TypedStatus<media::PipelineStatusTraits> (media::Demuxer*, media::Pipeline::StartType, bool, bool)>, base::flat_map<std::__Cr::basic_string<char, std::__Cr::char_traits<char>, std::__Cr::allocator<char>>, std::__Cr::basic_string<char, std::__Cr::char_traits<char>, std::__Cr::allocator<char>>, std::__Cr::less<void>, std::__Cr::vector<std::__Cr::pair<std::__Cr::basic_string<char, std::__Cr::char_traits<char>, std::__Cr::allocator<char>>, std::__Cr::basic_string<char, std::__Cr::char_traits<char>, std::__Cr::allocator<char>>>, std::__Cr::allocator<std::__Cr::pair<std::__Cr::basic_string<char, std::__Cr::char_traits<char>, std::__Cr::allocator<char>>, std::__Cr::basic_string<char, std::__Cr::char_traits<char>, std::__Cr::allocator<char>>>>>>) ./../../media/filters/demuxer_manager.cc:368:10
#17 0x572c8e33b96e in blink::WebMediaPlayerImpl::StartPipeline() ./../../third_party/blink/renderer/platform/media/web_media_player_impl.cc:3054:49
#18 0x572c8e354851 in blink::WebMediaPlayerImpl::DataSourceInitialized(bool) ./../../third_party/blink/renderer/platform/media/web_media_player_impl.cc:2846:3
#19 0x572c8e33c400 in blink::WebMediaPlayerImpl::MultiBufferDataSourceInitialized(bool) ./../../third_party/blink/renderer/platform/media/web_media_player_impl.cc:2860:3
#20 0x572c8e361cb9 in Invoke<void (WebMediaPlayerImpl::*)(bool), const base::WeakPtr<blink::WebMediaPlayerImpl> &, bool> ./../../base/functional/bind_internal.h:731:12
#21 0x572c8e361cb9 in MakeItSo<void (WebMediaPlayerImpl::*)(bool), std::__Cr::tuple<base::WeakPtr<blink::WebMediaPlayerImpl> >, bool> ./../../base/functional/bind_internal.h:947:5
#22 0x572c8e361cb9 in RunImpl<void (WebMediaPlayerImpl::*)(bool), std::__Cr::tuple<base::WeakPtr<blink::WebMediaPlayerImpl> >, 0UL> ./../../base/functional/bind_internal.h:1060:14
#23 0x572c8e361cb9 in base::internal::Invoker<base::internal::FunctorTraits<void (blink::WebMediaPlayerImpl::*&&)(bool), base::WeakPtr<blink::WebMediaPlayerImpl>&&>, base::internal::BindState<true, true, false, void (blink::WebMediaPlayerImpl::*)(bool), base::WeakPtr<blink::WebMediaPlayerImpl>>, void (bool)>::RunOnce(base::internal::BindStateBase*, bool) ./../../base/functional/bind_internal.h:973:12
#24 0x572c640290cb in Run ./../../base/functional/callback.h:156:12
#25 0x572c640290cb in Invoke<base::OnceCallback<void (bool)>, bool> ./../../base/functional/bind_internal.h:806:49
#26 0x572c640290cb in MakeItSo<base::OnceCallback<void (bool)>, std::__Cr::tuple<bool> > ./../../base/functional/bind_internal.h:923:12
#27 0x572c640290cb in RunImpl<base::OnceCallback<void (bool)>, std::__Cr::tuple<bool>, 0UL> ./../../base/functional/bind_internal.h:1060:14
#28 0x572c640290cb in base::internal::Invoker<base::internal::FunctorTraits<base::OnceCallback<void (bool)>&&, bool&&>, base::internal::BindState<false, true, true, base::OnceCallback<void (bool)>, bool>, void ()>::RunOnce(base::internal::BindStateBase*) ./../../base/functional/bind_internal.h:973:12
#29 0x572c793e2086 in Run ./../../base/functional/callback.h:156:12
#30 0x572c793e2086 in base::TaskAnnotator::RunTaskImpl(base::PendingTask&) ./../../base/task/common/task_annotator.cc:209:34
#31 0x572c79454b77 in RunTask<(lambda at ../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:458:11)> ./../../base/task/common/task_annotator.h:106:5
#32 0x572c79454b77 in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::LazyNow*) ./../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:456:23
#33 0x572c79453a5c in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() ./../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:330:40
#34 0x572c7945566a in non-virtual thunk to base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() ./../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:0:0
#35 0x572c792aae63 in base::MessagePumpDefault::Run(base::MessagePump::Delegate*) ./../../base/message_loop/message_pump_default.cc:42:55
#36 0x572c79456224 in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool, base::TimeDelta) ./../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:629:12
#37 0x572c79364e0f in base::RunLoop::Run(base::Location const&) ./../../base/run_loop.cc:134:14
#38 0x572c844d2d05 in content::RendererMain(content::MainFunctionParams) ./../../content/renderer/renderer_main.cc:356:16
#39 0x572c760a7adc in content::RunZygote(content::ContentMainDelegate*) ./../../content/app/content_main_runner_impl.cc:699:14
#40 0x572c760a8aac in content::RunOtherNamedProcessTypeMain(std::__Cr::basic_string<char, std::__Cr::char_traits<char>, std::__Cr::allocator<char>> const&, content::MainFunctionParams, content::ContentMainDelegate*) ./../../content/app/content_main_runner_impl.cc:803:12
#41 0x572c760ab461 in content::ContentMainRunnerImpl::Run() ./../../content/app/content_main_runner_impl.cc:1183:10
#42 0x572c760a5819 in content::RunContentProcess(content::ContentMainParams, content::ContentMainRunner*) ./../../content/app/content_main.cc:374:36
#43 0x572c760a5d3b in content::ContentMain(content::ContentMainParams) ./../../content/app/content_main.cc:387:10
#44 0x572c638d8157 in ChromeMain ./../../chrome/app/chrome_main.cc:222:12
#45 0x780ff5a29d8f in errx ??:?
Thread T3144 (AudioOutputDevi) created by T4 (Chrome_ChildIOT) here:
#0 0x572c63881891 in ___interceptor_pthread_create _asan_rtl_:3
#1 0x572c795314c8 in base::(anonymous namespace)::CreateThread(unsigned long, bool, base::PlatformThreadBase::Delegate*, base::PlatformThreadHandle*, base::ThreadType, base::MessagePumpType) ./../../base/threading/platform_thread_posix.cc:151:13
#2 0x572c665538b7 in media::AudioDeviceThread::AudioDeviceThread(media::AudioDeviceThread::Callback*, base::ScopedGeneric<int, base::internal::ScopedFDCloseTraits>, char const*, base::ThreadType) ./../../media/audio/audio_device_thread.cc:66:3
#3 0x572c6657d368 in std::__Cr::unique_ptr<media::AudioDeviceThread, std::__Cr::default_delete<media::AudioDeviceThread>> std::__Cr::make_unique<media::AudioDeviceThread, media::AudioOutputDeviceThreadCallback*, base::ScopedGeneric<int, base::internal::ScopedFDCloseTraits>, char const (&) [18], base::ThreadType, 0>(media::AudioOutputDeviceThreadCallback*&&, base::ScopedGeneric<int, base::internal::ScopedFDCloseTraits>&&, char const (&) [18], base::ThreadType&&) ./../../third_party/libc++/src/include/__memory/unique_ptr.h:754:30
#4 0x572c6657cf61 in media::AudioOutputDevice::OnStreamCreated(base::UnsafeSharedMemoryRegion, base::ScopedGeneric<int, base::internal::ScopedFDCloseTraits>, bool) ./../../media/audio/audio_output_device.cc:430:21
#5 0x572c8d82569d in blink::MojoAudioOutputIPC::Created(mojo::PendingRemote<media::mojom::blink::AudioOutputStream>, mojo::StructPtr<media::mojom::blink::ReadWriteAudioDataPipe>) ./../../third_party/blink/renderer/modules/media/audio/mojo_audio_output_ipc.cc:243:14
#6 0x572c72f96264 in media::mojom::blink::AudioOutputStreamProviderClientStubDispatch::Accept(media::mojom::blink::AudioOutputStreamProviderClient*, mojo::Message*) ./gen/media/mojo/mojom/audio_output_stream.mojom-blink.cc:1156:13
#7 0x572c791bd6ef in mojo::InterfaceEndpointClient::HandleValidatedMessage(mojo::Message*) ./../../mojo/public/cpp/bindings/lib/interface_endpoint_client.cc:1059:54
#8 0x572c791db13a in mojo::MessageDispatcher::Accept(mojo::Message*) ./../../mojo/public/cpp/bindings/lib/message_dispatcher.cc:43:19
#9 0x572c791c3434 in mojo::InterfaceEndpointClient::HandleIncomingMessage(mojo::Message*) ./../../mojo/public/cpp/bindings/lib/interface_endpoint_client.cc:731:20
#10 0x572c791eaf5a in mojo::internal::MultiplexRouter::ProcessIncomingMessage(mojo::internal::MultiplexRouter::MessageWrapper*, mojo::internal::MultiplexRouter::ClientCallBehavior, base::SequencedTaskRunner*) ./../../mojo/public/cpp/bindings/lib/multiplex_router.cc:1120:42
#11 0x572c791e9466 in mojo::internal::MultiplexRouter::Accept(mojo::Message*) ./../../mojo/public/cpp/bindings/lib/multiplex_router.cc:733:7
#12 0x572c791db13a in mojo::MessageDispatcher::Accept(mojo::Message*) ./../../mojo/public/cpp/bindings/lib/message_dispatcher.cc:43:19
#13 0x572c791b4858 in mojo::Connector::DispatchMessage(mojo::ScopedHandleBase<mojo::MessageHandle>) ./../../mojo/public/cpp/bindings/lib/connector.cc:561:49
#14 0x572c791b5fd0 in mojo::Connector::ReadAllAvailableMessages() ./../../mojo/public/cpp/bindings/lib/connector.cc:619:14
#15 0x572c791b59f9 in OnHandleReadyInternal ./../../mojo/public/cpp/bindings/lib/connector.cc:450:3
#16 0x572c791b59f9 in mojo::Connector::OnWatcherHandleReady(char const*, unsigned int) ./../../mojo/public/cpp/bindings/lib/connector.cc:416:3
#17 0x572c791b787a in Invoke<void (Connector::*)(const char *, unsigned int), mojo::Connector *, const char *, unsigned int> ./../../base/functional/bind_internal.h:731:12
#18 0x572c791b787a in MakeItSo<void (Connector::*const &)(const char *, unsigned int), const std::__Cr::tuple<base::internal::UnretainedWrapper<mojo::Connector, base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0>, base::internal::UnretainedWrapper<const char, base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0> > &, unsigned int> ./../../base/functional/bind_internal.h:923:12
#19 0x572c791b787a in RunImpl<void (Connector::*const &)(const char *, unsigned int), const std::__Cr::tuple<base::internal::UnretainedWrapper<mojo::Connector, base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0>, base::internal::UnretainedWrapper<const char, base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0> > &, 0UL, 1UL> ./../../base/functional/bind_internal.h:1060:14
#20 0x572c791b787a in base::internal::Invoker<base::internal::FunctorTraits<void (mojo::Connector::* const&)(char const*, unsigned int), mojo::Connector*, char const* const&>, base::internal::BindState<true, true, false, void (mojo::Connector::*)(char const*, unsigned int), base::internal::UnretainedWrapper<mojo::Connector, base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0>, base::internal::UnretainedWrapper<char const, base::unretained_traits::MayNotDangle, (partition_alloc::internal::RawPtrTraits)0>>, void (unsigned int)>::Run(base::internal::BindStateBase*, unsigned int) ./../../base/functional/bind_internal.h:980:12
#21 0x572c68b1648e in base::RepeatingCallback<void (unsigned int)>::Run(unsigned int) const & ./../../base/functional/callback.h:344:12
#22 0x572c68b1621f in Invoke<void (*const &)(const base::RepeatingCallback<void (unsigned int)> &, unsigned int, const mojo::HandleSignalsState &), const base::RepeatingCallback<void (unsigned int)> &, unsigned int, const mojo::HandleSignalsState &> ./../../base/functional/bind_internal.h:664:12
#23 0x572c68b1621f in MakeItSo<void (*const &)(const base::RepeatingCallback<void (unsigned int)> &, unsigned int, const mojo::HandleSignalsState &), const std::__Cr::tuple<base::RepeatingCallback<void (unsigned int)> > &, unsigned int, const mojo::HandleSignalsState &> ./../../base/functional/bind_internal.h:923:12
#24 0x572c68b1621f in RunImpl<void (*const &)(const base::RepeatingCallback<void (unsigned int)> &, unsigned int, const mojo::HandleSignalsState &), const std::__Cr::tuple<base::RepeatingCallback<void (unsigned int)> > &, 0UL> ./../../base/functional/bind_internal.h:1060:14
#25 0x572c68b1621f in base::internal::Invoker<base::internal::FunctorTraits<void (* const&)(base::RepeatingCallback<void (unsigned int)> const&, unsigned int, mojo::HandleSignalsState const&), base::RepeatingCallback<void (unsigned int)> const&>, base::internal::BindState<false, true, false, void (*)(base::RepeatingCallback<void (unsigned int)> const&, unsigned int, mojo::HandleSignalsState const&), base::RepeatingCallback<void (unsigned int)>>, void (unsigned int, mojo::HandleSignalsState const&)>::Run(base::internal::BindStateBase*, unsigned int, mojo::HandleSignalsState const&) ./../../base/functional/bind_internal.h:980:12
#26 0x572c79f2c560 in base::RepeatingCallback<void (unsigned int, mojo::HandleSignalsState const&)>::Run(unsigned int, mojo::HandleSignalsState const&) const & ./../../base/functional/callback.h:344:12
#27 0x572c79f2be98 in mojo::SimpleWatcher::OnHandleReady(int, unsigned int, mojo::HandleSignalsState const&) ./../../mojo/public/cpp/system/simple_watcher.cc:278:14
#28 0x572c79f2c946 in mojo::SimpleWatcher::Context::Notify(unsigned int, MojoHandleSignalsState, unsigned int) ./../../mojo/public/cpp/system/simple_watcher.cc:96:22
#29 0x572c79f291e5 in mojo::SimpleWatcher::Context::CallNotify(MojoTrapEvent const*) ./../../mojo/public/cpp/system/simple_watcher.cc:61:14
#30 0x572c63ec781d in DispatchEvent ./../../mojo/core/ipcz_driver/mojo_trap.cc:612:3
#31 0x572c63ec781d in mojo::core::ipcz_driver::MojoTrap::DispatchOrQueueEvent(mojo::core::ipcz_driver::MojoTrap::Trigger&, MojoTrapEvent const&) ./../../mojo/core/ipcz_driver/mojo_trap.cc:584:5
#32 0x572c63eca17a in mojo::core::ipcz_driver::MojoTrap::HandleEvent(IpczTrapEvent const&) ./../../mojo/core/ipcz_driver/mojo_trap.cc:466:3
#33 0x572c64434e81 in DispatchAll ./../../third_party/ipcz/src/ipcz/trap_event_dispatcher.cc:30:5
#34 0x572c64434e81 in ipcz::TrapEventDispatcher::~TrapEventDispatcher() ./../../third_party/ipcz/src/ipcz/trap_event_dispatcher.cc:12:3
#35 0x572c64417621 in ipcz::Router::AcceptInboundParcel(std::__Cr::unique_ptr<ipcz::Parcel, std::__Cr::default_delete<ipcz::Parcel>>) ./../../third_party/ipcz/src/ipcz/router.cc:274:1
#36 0x572c643e5c45 in ipcz::NodeLink::AcceptCompleteParcel(ipcz::StrongAlias<ipcz::SublinkIdTag, unsigned long>, std::__Cr::unique_ptr<ipcz::Parcel, std::__Cr::default_delete<ipcz::Parcel>>) ./../../third_party/ipcz/src/ipcz/node_link.cc:1051:31
#37 0x572c643e47bb in ipcz::NodeLink::OnAcceptParcel(ipcz::msg::AcceptParcel&) ./../../third_party/ipcz/src/ipcz/node_link.cc:642:10
#38 0x572c64404939 in ipcz::msg::NodeMessageListener::OnTransportMessage(ipcz::DriverTransport::RawMessage const&, ipcz::DriverTransport const&, unsigned long) ./../../third_party/ipcz/src/ipcz/node_messages_generator.h:357:1
#39 0x572c643a80cc in Notify ./../../third_party/ipcz/src/ipcz/driver_transport.cc:129:20
#40 0x572c643a80cc in ipcz::(anonymous namespace)::NotifyTransport(unsigned long, void const*, unsigned long, unsigned long const*, unsigned long, unsigned int, IpczTransportActivityOptions const*) ./../../third_party/ipcz/src/ipcz/driver_transport.cc:47:11
#41 0x572c63ede75e in mojo::core::ipcz_driver::Transport::OnChannelMessage(void const*, unsigned long, std::__Cr::vector<mojo::PlatformHandle, std::__Cr::allocator<mojo::PlatformHandle>>, scoped_refptr<mojo::core::ipcz_driver::Envelope>) ./../../mojo/core/ipcz_driver/transport.cc:738:29
#42 0x572c63e9cf3e in mojo::core::Channel::TryDispatchMessage(base::span<char const, 18446744073709551615ul, char const*>, std::__Cr::optional<std::__Cr::vector<mojo::PlatformHandle, std::__Cr::allocator<mojo::PlatformHandle>>>, scoped_refptr<mojo::core::ipcz_driver::Envelope>, unsigned long*) ./../../mojo/core/channel.cc:1056:16
#43 0x572c63e9b4b7 in TryDispatchMessage ./../../mojo/core/channel.cc:1000:10
#44 0x572c63e9b4b7 in mojo::core::Channel::OnReadComplete(unsigned long, unsigned long*) ./../../mojo/core/channel.cc:977:9
#45 0x572c63eea2df in mojo::core::ChannelPosix::OnFdReadable(int) ./../../mojo/core/channel_posix.cc:307:12
#46 0x572c795c0fb5 in OnFdReadable ./../../base/message_loop/message_pump_epoll.cc:764:13
#47 0x572c795c0fb5 in base::MessagePumpEpoll::HandleEvent(int, bool, bool, base::MessagePumpEpoll::FdWatchController*) ./../../base/message_loop/message_pump_epoll.cc:672:17
#48 0x572c795bff5a in base::MessagePumpEpoll::OnEpollEvent(base::MessagePumpEpoll::EpollEventEntry&, unsigned int) ./../../base/message_loop/message_pump_epoll.cc:618:7
#49 0x572c795be276 in base::MessagePumpEpoll::WaitForEpollEvents(base::TimeDelta) ./../../base/message_loop/message_pump_epoll.cc:509:7
#50 0x572c795bcdd9 in base::MessagePumpEpoll::Run(base::MessagePump::Delegate*) ./../../base/message_loop/message_pump_epoll.cc:288:5
#51 0x572c79456224 in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool, base::TimeDelta) ./../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:629:12
#52 0x572c79364e0f in base::RunLoop::Run(base::Location const&) ./../../base/run_loop.cc:134:14
#53 0x572c794d9ffc in base::Thread::Run(base::RunLoop*) ./../../base/threading/thread.cc:344:13
#54 0x572c842d4637 in content::(anonymous namespace)::ChildIOThread::Run(base::RunLoop*) ./../../content/child/child_process.cc:60:19
#55 0x572c794da591 in base::Thread::ThreadMain() ./../../base/threading/thread.cc:419:3
#56 0x572c79531ede in base::(anonymous namespace)::ThreadFunc(void*) ./../../base/threading/platform_thread_posix.cc:103:13
#57 0x572c6389b186 in asan_thread_start(void*) _asan_rtl_:28
Thread T4 (Chrome_ChildIOT) created by T0 (chrome) here:
#0 0x572c63881891 in ___interceptor_pthread_create _asan_rtl_:3
#1 0x572c795314c8 in base::(anonymous namespace)::CreateThread(unsigned long, bool, base::PlatformThreadBase::Delegate*, base::PlatformThreadHandle*, base::ThreadType, base::MessagePumpType) ./../../base/threading/platform_thread_posix.cc:151:13
#2 0x572c794d9303 in base::Thread::StartWithOptions(base::Thread::Options) ./../../base/threading/thread.cc:211:26
#3 0x572c842d34a9 in content::ChildProcess::ChildProcess(base::ThreadType, std::__Cr::unique_ptr<base::ThreadPoolInstance::InitParams, std::__Cr::default_delete<base::ThreadPoolInstance::InitParams>>) ./../../content/child/child_process.cc:125:3
#4 0x572c8444a7cb in content::RenderProcess::RenderProcess(std::__Cr::unique_ptr<base::ThreadPoolInstance::InitParams, std::__Cr::default_delete<base::ThreadPoolInstance::InitParams>>) ./../../content/renderer/render_process.cc:18:7
#5 0x572c8444a055 in content::RenderProcessImpl::RenderProcessImpl() ./../../content/renderer/render_process_impl.cc:112:7
#6 0x572c8444a5b0 in content::RenderProcessImpl::Create() ./../../content/renderer/render_process_impl.cc:231:31
#7 0x572c844d27e9 in content::RendererMain(content::MainFunctionParams) ./../../content/renderer/renderer_main.cc:274:53
#8 0x572c760a7adc in content::RunZygote(content::ContentMainDelegate*) ./../../content/app/content_main_runner_impl.cc:699:14
#9 0x572c760a8aac in content::RunOtherNamedProcessTypeMain(std::__Cr::basic_string<char, std::__Cr::char_traits<char>, std::__Cr::allocator<char>> const&, content::MainFunctionParams, content::ContentMainDelegate*) ./../../content/app/content_main_runner_impl.cc:803:12
#10 0x572c760ab461 in content::ContentMainRunnerImpl::Run() ./../../content/app/content_main_runner_impl.cc:1183:10
#11 0x572c760a5819 in content::RunContentProcess(content::ContentMainParams, content::ContentMainRunner*) ./../../content/app/content_main.cc:374:36
#12 0x572c760a5d3b in content::ContentMain(content::ContentMainParams) ./../../content/app/content_main.cc:387:10
#13 0x572c638d8157 in ChromeMain ./../../chrome/app/chrome_main.cc:222:12
#14 0x780ff5a29d8f in errx ??:?
Thread T10 (Media) created by T0 (chrome) here:
#0 0x572c63881891 in ___interceptor_pthread_create _asan_rtl_:3
#1 0x572c795314c8 in base::(anonymous namespace)::CreateThread(unsigned long, bool, base::PlatformThreadBase::Delegate*, base::PlatformThreadHandle*, base::ThreadType, base::MessagePumpType) ./../../base/threading/platform_thread_posix.cc:151:13
#2 0x572c794d9303 in base::Thread::StartWithOptions(base::Thread::Options) ./../../base/threading/thread.cc:211:26
#3 0x572c8445835a in content::RenderThreadImpl::GetMediaSequencedTaskRunner() ./../../content/renderer/render_thread_impl.cc:1698:20
#4 0x572c843c8361 in content::MediaFactory::CreateMediaPlayer(blink::WebMediaPlayerSource const&, blink::WebMediaPlayerClient*, blink::MediaInspectorContext*, blink::WebMediaPlayerEncryptedMediaClient*, blink::WebContentDecryptionModule*, blink::WebString const&, viz::FrameSinkId, cc::LayerTreeSettings const&, scoped_refptr<base::SingleThreadTaskRunner>, scoped_refptr<base::TaskRunner>) ./../../content/renderer/media/media_factory.cc:465:22
#5 0x572c843353e8 in content::RenderFrameImpl::CreateMediaPlayer(blink::WebMediaPlayerSource const&, blink::WebMediaPlayerClient*, blink::MediaInspectorContext*, blink::WebMediaPlayerEncryptedMediaClient*, blink::WebContentDecryptionModule*, blink::WebString const&, cc::LayerTreeSettings const*, scoped_refptr<base::TaskRunner>) ./../../content/renderer/render_frame_impl.cc:3546:25
#6 0x572c8a0e412a in blink::ModulesInitializer::CreateWebMediaPlayer(blink::WebLocalFrameClient*, blink::HTMLMediaElement&, blink::WebMediaPlayerSource const&, blink::WebMediaPlayerClient*) const ./../../third_party/blink/renderer/modules/modules_initializer.cc:357:28
#7 0x572c861a0196 in blink::HTMLMediaElement::StartPlayerLoad() ./../../third_party/blink/renderer/core/html/media/html_media_element.cc:1625:24
#8 0x572c8619c4a3 in blink::HTMLMediaElement::LoadResource(blink::WebMediaPlayerSource const&, WTF::String const&) ./../../third_party/blink/renderer/core/html/media/html_media_element.cc:1480:7
#9 0x572c8619833f in blink::HTMLMediaElement::LoadSourceFromAttribute() ./../../third_party/blink/renderer/core/html/media/html_media_element.cc:1342:3
#10 0x572c86196a6b in blink::HTMLMediaElement::SelectMediaResource() ./../../third_party/blink/renderer/core/html/media/html_media_element.cc:1269:7
#11 0x572c86192262 in blink::HTMLMediaElement::LoadInternal() ./../../third_party/blink/renderer/core/html/media/html_media_element.cc:1204:3
#12 0x572c86187ec8 in blink::HTMLMediaElement::LoadTimerFired(blink::TimerBase*) ./../../third_party/blink/renderer/core/html/media/html_media_element.cc:930:7
#13 0x572c888f96ad in blink::TimerBase::RunInternal() ./../../third_party/blink/renderer/platform/timer.cc:166:3
#14 0x572c861d26c1 in Invoke<void (*)(blink::HeapTaskRunnerTimer<blink::HTMLMediaElement> *, blink::HTMLMediaElement *), blink::HeapTaskRunnerTimer<blink::HTMLMediaElement> *, cppgc::internal::BasicPersistent<blink::HTMLMediaElement, cppgc::internal::WeakPersistentPolicy, cppgc::internal::IgnoreLocationPolicy, cppgc::internal::DisabledCheckingPolicy> > ./../../base/functional/bind_internal.h:664:12
#15 0x572c861d26c1 in MakeItSo<void (*)(blink::HeapTaskRunnerTimer<blink::HTMLMediaElement> *, blink::HTMLMediaElement *), std::__Cr::tuple<WTF::UnretainedWrapper<blink::HeapTaskRunnerTimer<blink::HTMLMediaElement> >, cppgc::internal::BasicPersistent<blink::HTMLMediaElement, cppgc::internal::WeakPersistentPolicy, cppgc::internal::IgnoreLocationPolicy, cppgc::internal::DisabledCheckingPolicy> > > ./../../base/functional/bind_internal.h:923:12
#16 0x572c861d26c1 in RunImpl<void (*)(blink::HeapTaskRunnerTimer<blink::HTMLMediaElement> *, blink::HTMLMediaElement *), std::__Cr::tuple<WTF::UnretainedWrapper<blink::HeapTaskRunnerTimer<blink::HTMLMediaElement> >, cppgc::internal::BasicPersistent<blink::HTMLMediaElement, cppgc::internal::WeakPersistentPolicy, cppgc::internal::IgnoreLocationPolicy, cppgc::internal::DisabledCheckingPolicy> >, 0UL, 1UL> ./../../base/functional/bind_internal.h:1060:14
#17 0x572c861d26c1 in base::internal::Invoker<base::internal::FunctorTraits<void (*&&)(blink::HeapTaskRunnerTimer<blink::HTMLMediaElement>*, blink::HTMLMediaElement*), blink::HeapTaskRunnerTimer<blink::HTMLMediaElement>*, cppgc::internal::BasicPersistent<blink::HTMLMediaElement, cppgc::internal::WeakPersistentPolicy, cppgc::internal::IgnoreLocationPolicy, cppgc::internal::DisabledCheckingPolicy>&&>, base::internal::BindState<false, true, false, void (*)(blink::HeapTaskRunnerTimer<blink::HTMLMediaElement>*, blink::HTMLMediaElement*), WTF::UnretainedWrapper<blink::HeapTaskRunnerTimer<blink::HTMLMediaElement>>, cppgc::internal::BasicPersistent<blink::HTMLMediaElement, cppgc::internal::WeakPersistentPolicy, cppgc::internal::IgnoreLocationPolicy, cppgc::internal::DisabledCheckingPolicy>>, void ()>::RunOnce(base::internal::BindStateBase*) ./../../base/functional/bind_internal.h:973:12
#18 0x572c793e2086 in Run ./../../base/functional/callback.h:156:12
#19 0x572c793e2086 in base::TaskAnnotator::RunTaskImpl(base::PendingTask&) ./../../base/task/common/task_annotator.cc:209:34
#20 0x572c79454b77 in RunTask<(lambda at ../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:458:11)> ./../../base/task/common/task_annotator.h:106:5
#21 0x572c79454b77 in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::LazyNow*) ./../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:456:23
#22 0x572c79453a5c in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() ./../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:330:40
#23 0x572c7945566a in non-virtual thunk to base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() ./../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:0:0
#24 0x572c792aae63 in base::MessagePumpDefault::Run(base::MessagePump::Delegate*) ./../../base/message_loop/message_pump_default.cc:42:55
#25 0x572c79456224 in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool, base::TimeDelta) ./../../base/task/sequence_manager/thread_controller_with_message_pump_impl.cc:629:12
#26 0x572c79364e0f in base::RunLoop::Run(base::Location const&) ./../../base/run_loop.cc:134:14
#27 0x572c844d2d05 in content::RendererMain(content::MainFunctionParams) ./../../content/renderer/renderer_main.cc:356:16
#28 0x572c760a7adc in content::RunZygote(content::ContentMainDelegate*) ./../../content/app/content_main_runner_impl.cc:699:14
#29 0x572c760a8aac in content::RunOtherNamedProcessTypeMain(std::__Cr::basic_string<char, std::__Cr::char_traits<char>, std::__Cr::allocator<char>> const&, content::MainFunctionParams, content::ContentMainDelegate*) ./../../content/app/content_main_runner_impl.cc:803:12
#30 0x572c760ab461 in content::ContentMainRunnerImpl::Run() ./../../content/app/content_main_runner_impl.cc:1183:10
#31 0x572c760a5819 in content::RunContentProcess(content::ContentMainParams, content::ContentMainRunner*) ./../../content/app/content_main.cc:374:36
#32 0x572c760a5d3b in content::ContentMain(content::ContentMainParams) ./../../content/app/content_main.cc:387:10
#33 0x572c638d8157 in ChromeMain ./../../chrome/app/chrome_main.cc:222:12
#34 0x780ff5a29d8f in errx ??:?
SUMMARY: AddressSanitizer: heap-use-after-free (asan-linux-release-1460407/chrome+0x2550cf01) (BuildId: 07ee9f0d0206f4b6)
Shadow bytes around the buggy address:
0x756ff4952c00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x756ff4952c80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x756ff4952d00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x756ff4952d80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x756ff4952e00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa f7 fa
=>0x756ff4952e80: fd fd fd[fd]fd fd fd fd fd fd fd fd fd fd fd fd
0x756ff4952f00: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x756ff4952f80: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x756ff4953000: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x756ff4953080: fd fd fd fd fd fa fa fa fa fa fa fa fa fa fa fa
0x756ff4953100: fa fa fa fa fa fa fa fa fa fa fa fa fa fa f7 fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==1==ADDITIONAL INFO
==1==Note: Please include this section with the ASan report.
Task trace:
Command line: `/proc/self/exe --type=renderer --crashpad-handler-pid=123756 --enable-crash-reporter=, --change-stack-guard-on-fork=enable --autoplay-policy=no-user-gesture-required --file-url-path-alias=/gen=asan-linux-release-1460407/gen --ozone-platform=wayland --disable-gpu-compositing --lang=en-US --num-raster-threads=4 --enable-main-frame-before-activation --renderer-client-id=5 --time-ticks-at-unix-epoch=-1747394574300974 --launch-time-ticks=251374854937 --shared-files=v8_context_snapshot_data:100 --metrics-shmem-handle=4,i,14665207153857744594,12260671244325860807,2097152 --field-trial-handle=3,i,12642760950729403537,12599755197160342593,262144 --disable-features=EyeDropper --variations-seed-version`
MiraclePtr Status: MANUAL ANALYSIS REQUIRED
This crash occurred while a raw_ptr<T> object containing a dangling pointer was being dereferenced.
The "use" and "free" threads don't match. This crash is likely to have been caused by a race condition that is mislabeled as a use-after-free. Make sure that the "free" is sequenced after the "use" (e.g. both are on the same sequence, or the "free" is in a task posted after the "use"). Otherwise, the crash is still exploitable with MiraclePtr.
Refer to https://chromium.googlesource.com/chromium/src/+/main/base/memory/raw_ptr.md for details.
==1==END OF ADDITIONAL INFO
==1==ABORTING
Reporter credit:
Huang Xilin of Ant Group Light-Year Security Lab
Additional Data
Category: Security
Chrome Channel: Dev
Regression: N/A
Context
This is a Chrome VRP report about a use-after-free in Chrome's media stack, tracked as CVE-2025-5958 and rated high severity. The affected component is Media, and the weakness class is use after free. The report was filed by Huang Xilin of Ant Group Light-Year Security Lab, and the platform records a bounty of 8,000 USD with disclosure on 10 June 2025. The Chrome channel noted in the report is Dev.
The feature involved is ordinary HTML media playback. When an HTMLMediaElement loads a resource, Blink creates a WebMediaPlayerImpl and asks it to load the source. That call starts the rendering pipeline, which in turn creates a renderer object, RendererImpl, which owns an AudioRendererImpl. Audio rendering happens on a separate audio output thread, which calls back into the renderer to pull audio frames. The bug is a race between tearing that renderer down when the frame is destroyed and the audio thread still using it.
Setup
The researcher worked against a local build and a local web server. The steps given are:
- fetch asan-linux-release-1460407
- serve poc.html and big-buck-bunny_trailer.webm on port 8080
- ./chrome --autoplay-policy=no-user-gesture-required http://[redacted]:8080/poc.html
./chrome --autoplay-policy=no-user-gesture-required http://[redacted]:8080/poc.html
The --autoplay-policy=no-user-gesture-required flag lets the page start playback without a user gesture. The build is an AddressSanitizer release build, so a use after free aborts with a report rather than silently corrupting memory. The page and the media file are served from [redacted]:8080.
The report is explicit that this is a race condition and that the POC cannot guarantee stable triggering: you may need to try a few times. That is a precondition in itself, since the crash depends on the timing between frame teardown and the audio callback.
Finding it
In HTMLMediaElement::StartPlayerLoad, Blink creates the WebMediaPlayerImpl and calls Load on it:
void HTMLMediaElement::StartPlayerLoad() {
...
web_media_player_ =
frame->Client()->CreateWebMediaPlayer(*this, source, this);
...
auto load_timing = web_media_player_->Load(GetLoadType(), source, CorsMode(),
is_cache_disabled);
...
}
WebMediaPlayerImpl::Load calls WebMediaPlayerImpl::StartPipeline, which calls RendererImplFactory::CreateRenderer. That factory allocates an AudioRendererImpl and passes it into a new RendererImpl:
std::unique_ptr<Renderer> RendererImplFactory::CreateRenderer(
const scoped_refptr<base::SequencedTaskRunner>& media_task_runner,
const scoped_refptr<base::TaskRunner>& worker_task_runner,
AudioRendererSink* audio_renderer_sink,
VideoRendererSink* video_renderer_sink,
RequestOverlayInfoCB request_overlay_info_cb,
const gfx::ColorSpace& target_color_space) {
DCHECK(audio_renderer_sink);
std::unique_ptr<AudioRenderer> audio_renderer(new AudioRendererImpl(
media_task_runner, audio_renderer_sink,
// Unretained is safe here, because the RendererFactory is guaranteed to
// outlive the RendererImpl. The RendererImpl is destroyed when WMPI
// destructor calls pipeline_controller_.Stop() -> PipelineImpl::Stop() ->
// RendererWrapper::Stop -> RendererWrapper::DestroyRenderer(). And the
// RendererFactory is owned by WMPI and gets called after WMPI destructor
// finishes.
base::BindRepeating(&RendererImplFactory::CreateAudioDecoders,
base::Unretained(this), media_task_runner),
media_log_, media_player_id_
#if BUILDFLAG(IS_ANDROID)
));
#else
,
speech_recognition_client_.get()));
#endif
...
return std::make_unique<RendererImpl>(
media_task_runner, std::move(audio_renderer), std::move(video_renderer));
}
The comment in that code explains the intended lifetime: the RendererImpl is destroyed when the WebMediaPlayerImpl destructor stops the pipeline, which reaches RendererWrapper::DestroyRenderer. The other side of the race is the teardown path when the iframe is destroyed. After LocalDOMWindow::FrameDestroyed is called, the callback media::PipelineImpl::RendererWrapper::CompleteSuspend runs, and from there PipelineImpl::RendererWrapper::DestroyRenderer releases the RendererImpl and, with it, the AudioRendererImpl:
void PipelineImpl::RendererWrapper::DestroyRenderer() {
DCHECK(media_task_runner_->RunsTasksInCurrentSequence());
// Destroy the renderer outside the lock scope to avoid holding the lock
// while renderer is being destroyed (in case Renderer destructor is costly).
std::unique_ptr<Renderer> renderer;
{
base::AutoLock auto_lock(shared_state_lock_);
renderer.swap(shared_state_.renderer);
}
}
This runs on the Media thread. Meanwhile, the pointer to the AudioRendererImpl is still being used on the AudioOutputDevice thread, which calls Render on the renderer to fill each audio buffer:
int Render(base::TimeDelta delay,
base::TimeTicks delay_timestamp,
const media::AudioGlitchInfo& glitch_info,
media::AudioBus* audio_bus) override {
...
const int num_rendered_frames =
renderer_->Render(delay, delay_timestamp, glitch_info, audio_bus);
...
}
That is the shape of the bug: the object is freed on the Media thread while the audio thread still holds a pointer to it and dereferences it. The researcher summarised it as a race condition in AudioRendererImpl.
Exploitation
Step 1: build and serve the test page
Fetch the ASan release build asan-linux-release-1460407 and serve poc.html together with big-buck-bunny_trailer.webm on port 8080. The media file is the resource the element loads.
Step 2: launch Chrome with autoplay allowed
./chrome --autoplay-policy=no-user-gesture-required http://[redacted]:8080/poc.html
The flag removes the gesture requirement so playback starts on load, which is what brings up the audio output device and its callback thread. Because the trigger is a race, the report notes the POC cannot guarantee stable triggering and suggests trying a few more times.
Step 3: observe the ASan report
The crash is a heap-use-after-free, a READ of size 1, on thread T3144 (AudioOutputDevi). The top of the stack is the partition allocator's use-after-free check, reached through a raw_ptr dereference in blink::WebAudioSourceProviderImpl::TeeFilter::Render:
==1==ERROR: AddressSanitizer: heap-use-after-free on address 0x756ff4952e98 at pc 0x572c7929ef02 bp 0x72c4e73fced0 sp 0x72c4e73fcec8
READ of size 1 at 0x756ff4952e98 thread T3144 (AudioOutputDevi)
The use stack continues through the audio mixing and conversion path: blink::AudioRendererMixerInput::ProvideInput, media::AudioConverter, media::MultiChannelResampler, media::SincResampler, media::LoopbackAudioConverter, blink::AudioRendererMixer::Render, media::AudioOutputDeviceThreadCallback::Process and media::AudioDeviceThread::ThreadMain. In other words, the audio device thread is pulling frames through the mixer when it touches the freed object.
The free stack is on thread T10 (Media), inside media::RendererImpl::~RendererImpl, called from DestroyRenderer at pipeline_impl.cc:1191, which is called from media::PipelineImpl::RendererWrapper::CompleteSuspend:
freed by thread T10 (Media) here:
#0 0x572c638d7492 in operator delete(void*, unsigned long) _asan_rtl_:3
#1 0x572c67c13a71 in operator() ./../../third_party/libc++/src/include/__memory/unique_ptr.h:76:5
#2 0x572c67c13a71 in reset ./../../third_party/libc++/src/include/__memory/unique_ptr.h:287:7
#3 0x572c67c13a71 in media::RendererImpl::~RendererImpl() ./../../media/renderers/renderer_impl.cc:128:19
#4 0x572c67c14ab3 in media::RendererImpl::~RendererImpl() ./../../media/renderers/renderer_impl.cc:116:31
#5 0x572c666ab313 in operator() ./../../third_party/libc++/src/include/__memory/unique_ptr.h:76:5
#6 0x572c666ab313 in reset ./../../third_party/libc++/src/include/__memory/unique_ptr.h:287:7
#7 0x572c666ab313 in ~unique_ptr ./../../third_party/libc++/src/include/__memory/unique_ptr.h:256:71
#8 0x572c666ab313 in DestroyRenderer ./../../media/base/pipeline_impl.cc:1191:1
#9 0x572c666ab313 in media::PipelineImpl::RendererWrapper::CompleteSuspend(media::TypedStatus<media::PipelineStatusTraits>) ./../../media/base/pipeline_impl.cc:1083:3
The allocation stack is on thread T0 (chrome), in media::RendererImplFactory::CreateRenderer at renderer_impl_factory.cc:89:49, reached from blink::WebMediaPlayerImpl::CreateRenderer, media::PipelineImpl::Start, blink::WebMediaPlayerImpl::OnDemuxerCreated, blink::WebMediaPlayerImpl::StartPipeline and blink::WebMediaPlayerImpl::DataSourceInitialized, which traces back to HTMLMediaElement::StartPlayerLoad and the load timer. The freed region is 552 bytes, and the faulting address is 24 bytes inside it.
The ASan report also carries a MiraclePtr note. It says the crash occurred while a raw_ptr<T> containing a dangling pointer was being dereferenced, that the use and free threads do not match, and that the crash is likely caused by a race condition mislabelled as a use-after-free. It advises checking that the free is sequenced after the use, for example on the same sequence or in a task posted after the use, and warns that otherwise the crash is still exploitable with MiraclePtr. The status is given as MANUAL ANALYSIS REQUIRED.
The renderer command line in the report includes the autoplay flag and other standard renderer switches:
/proc/self/exe --type=renderer --crashpad-handler-pid=123756 --enable-crash-reporter=, --change-stack-guard-on-fork=enable --autoplay-policy=no-user-gesture-required --file-url-path-alias=/gen=asan-linux-release-1460407/gen --ozone-platform=wayland --disable-gpu-compositing --lang=en-US --num-raster-threads=4 --enable-main-frame-before-activation --renderer-client-id=5 --time-ticks-at-unix-epoch=-1747394574300974 --launch-time-ticks=251374854937 --shared-files=v8_context_snapshot_data:100 --metrics-shmem-handle=4,i,14665207153857744594,12260671244325860807,2097152 --field-trial-handle=3,i,12642760950729403537,12599755197160342593,262144 --disable-features=EyeDropper --variations-seed-version
Root cause
The renderer object is owned by the pipeline and freed on the Media thread when the frame is destroyed and the pipeline completes its suspend. The audio output device thread holds a pointer to the same renderer and calls into it from its own callback to produce audio. Nothing in the teardown path shown in the report waits for the audio thread to stop using the renderer before DestroyRenderer swaps it out of shared_state_ and the unique_ptr deletes it. The result is a classic use after free across threads: the free happens on the Media thread while the use happens on the AudioOutputDevice thread.
The comment in RendererImplFactory::CreateRenderer argues that the factory outlives the renderer because destruction is reached through the WebMediaPlayerImpl destructor and the pipeline stop path. That reasoning covers the factory's own lifetime, not the ordering between renderer destruction and the audio callback. The MiraclePtr note in the ASan output points at the same gap: the use and free are on different threads, so the pointer check fires but the underlying ordering problem remains, and the note says the crash would still be exploitable with MiraclePtr unless the free is sequenced after the use.
Impact
The report classifies this as a security issue, a race condition in AudioRendererImpl, and the platform rates it high severity. The crash occurs in the renderer process (the ASan report is from a renderer, and the crash type is recorded as a tab). The report does not describe a concrete exploitation path beyond the memory-safety violation itself, and it does not state what an attacker could achieve beyond triggering the use after free. Because it is a race, the trigger is not deterministic.
Fix
The report does not describe a fix or a patch. What it establishes is the ordering requirement: the renderer must not be freed while the audio output thread can still call into it, so teardown has to be sequenced after the last audio callback.. The MiraclePtr note frames the same requirement in terms of sequencing the free after the use.
Variants to test
- Other media teardown paths: detach the media element, remove the iframe, or navigate away while audio is playing, rather than only destroying the frame. A positive result is an ASan heap-use-after-free where the free stack is in
RendererImpl::~RendererImplorDestroyRendererand the use stack is on an audio thread. - Different renderer types: force alternative renderer selection through the pipeline so that other objects owned by
RendererImplare used from the audio path. A positive result is the same cross-thread use and free pattern with a different object in the use stack. - Timing variation: repeat the load and teardown many times, with and without the autoplay flag, to see whether the race window widens. A positive result is a higher crash rate or a crash with a different interleaving of the use and free stacks.
- Audio configuration changes: vary sample rates or channel counts so the converter and resampler path is exercised differently. A positive result is a crash in the conversion or mixing frames of the use stack, which would show the window is not limited to one audio configuration.
- MiraclePtr analysis: for any crash of this shape, check whether the free is sequenced after the use, as the ASan note advises. A positive result is a crash that remains reproducible under MiraclePtr because the free is not ordered after the use.
What happened, in plain words
A security researcher found a bug in Google Chrome, the browser most people use to browse the web. The bug is in the part of Chrome that plays audio and video, which Chrome calls its media stack. When a web page plays a sound or a video, Chrome has to keep track of the objects that produce the sound. The researcher found a moment where Chrome throws one of those objects away while another part of Chrome is still trying to use it. In programming this is called a use after free: something is freed (given back, no longer valid) and then still used. The result is that Chrome reads memory that no longer belongs to it, which crashes the browser tab.
The bug is tracked as CVE-2025-5958. A CVE is a public catalogue number for a known security flaw, so that everyone can refer to the same bug by the same name. The platform rates it high severity, which is a step below critical but still serious. The report was filed by Huang Xilin of Ant Group Light-Year Security Lab, and the platform records a bounty of 8,000 USD, meaning the researcher was paid for finding and reporting it. It was disclosed on 10 June 2025. The Chrome channel noted in the report is Dev, which is the early testing version of Chrome that developers use before a change reaches ordinary users.
The feature involved is ordinary HTML media playback. HTML is the language web pages are written in, and a media element is the part of a page that holds a video or an audio file. When such an element loads a resource (the file it wants to play), a part of Chrome called Blink, the engine that turns HTML into what you see, creates an object called WebMediaPlayerImpl and asks it to load the source. That call starts the rendering pipeline, which is the chain of objects that turns a media file into sound and pictures. The pipeline in turn creates a renderer object, RendererImpl, which owns an AudioRendererImpl, the object that actually produces the audio samples.
Audio rendering happens on a separate audio output thread. A thread is like a separate worker inside the same program: several workers can run at the same time, each doing its own job. The audio thread calls back into the renderer to pull audio frames, which are small chunks of sound. The bug is a race between tearing that renderer down when the frame is destroyed and the audio thread still using it. A race condition means two workers act at the same time and the result depends on who gets there first; sometimes the bad order happens, sometimes it does not.
Setup
The researcher worked against a local build and a local web server. A local web server is a small program on the same computer that hands out web pages, so the researcher can control exactly what the browser loads. The steps given are:
- fetch asan-linux-release-1460407
- serve poc.html and big-buck-bunny_trailer.webm on port 8080
- ./chrome --autoplay-policy=no-user-gesture-required http://[redacted]:8080/poc.html
./chrome --autoplay-policy=no-user-gesture-required http://[redacted]:8080/poc.html
Line by line: ./chrome means run the Chrome program that sits in the current folder. --autoplay-policy=no-user-gesture-required is a setting that lets the page start playback without a user gesture, meaning without you clicking or pressing a key first. Normally browsers block sound that starts on its own, because that is annoying; here the researcher deliberately switches that protection off so playback begins the moment the page loads. http://[redacted]:8080/poc.html is the address of the test page. [redacted] is the special address that always means this computer, and 8080 is the port, a numbered door on the computer through which the local web server answers. poc.html is the file name of the page; POC stands for proof of concept, a small demonstration that the bug is real.
The build is an AddressSanitizer release build. AddressSanitizer, often shortened to ASan, is a tool built into the program that watches memory while it runs. When the program touches memory it has already freed, ASan stops it immediately and prints a detailed report instead of letting it silently corrupt data. That is why the build name contains asan. The page and the media file are served from [redacted]:8080, so everything stays on the researcher's own machine.
The report is explicit that this is a race condition and that the POC cannot guarantee stable triggering: you may need to try a few times. That is a precondition in itself, since the crash depends on the timing between frame teardown and the audio callback. Frame teardown means the page's frame, the box that holds a page inside another page, is being destroyed and its resources released.
Finding it
Lifetime here means the period from when an object is created until it is destroyed. In HTMLMediaElement::StartPlayerLoad, Blink creates the WebMediaPlayerImpl and calls Load on it:
void HTMLMediaElement::StartPlayerLoad() {
...
web_media_player_ =
frame->Client()->CreateWebMediaPlayer(*this, source, this);
...
auto load_timing = web_media_player_->Load(GetLoadType(), source, CorsMode(),
is_cache_disabled);
...
}
Line by line: void HTMLMediaElement::StartPlayerLoad() declares a function called StartPlayerLoad that belongs to the media element class. The ... marks code the report leaves out. web_media_player_ = frame->Client()->CreateWebMediaPlayer(*this, source, this); asks the frame's client, the part of Chrome that knows how to build media players, to create a web media player for this element and this source, and stores it in web_media_player_. auto load_timing = web_media_player_->Load(GetLoadType(), source, CorsMode(), is_cache_disabled); then tells that player to load the source, passing along the load type, the source, the CORS mode and whether the cache is disabled. CORS is a browser rule about which websites may read responses from other websites; the cache is a local store of previously downloaded files. The point of this block is that loading a media file is what creates the player and starts everything that follows.
WebMediaPlayerImpl::Load calls WebMediaPlayerImpl::StartPipeline, which calls RendererImplFactory::CreateRenderer. That factory allocates an AudioRendererImpl and passes it into a new RendererImpl:
std::unique_ptr<Renderer> RendererImplFactory::CreateRenderer(
const scoped_refptr<base::SequencedTaskRunner>& media_task_runner,
const scoped_refptr<base::TaskRunner>& worker_task_runner,
AudioRendererSink* audio_renderer_sink,
VideoRendererSink* video_renderer_sink,
RequestOverlayInfoCB request_overlay_info_cb,
const gfx::ColorSpace& target_color_space) {
DCHECK(audio_renderer_sink);
std::unique_ptr<AudioRenderer> audio_renderer(new AudioRendererImpl(
media_task_runner, audio_renderer_sink,
// Unretained is safe here, because the RendererFactory is guaranteed to
// outlive the RendererImpl. The RendererImpl is destroyed when WMPI
// destructor calls pipeline_controller_.Stop() -> PipelineImpl::Stop() ->
// RendererWrapper::Stop -> RendererWrapper::DestroyRenderer(). And the
// RendererFactory is owned by WMPI and gets called after WMPI destructor
// finishes.
base::BindRepeating(&RendererImplFactory::CreateAudioDecoders,
base::Unretained(this), media_task_runner),
media_log_, media_player_id_
#if BUILDFLAG(IS_ANDROID)
));
#else
,
speech_recognition_client_.get()));
#endif
...
return std::make_unique<RendererImpl>(
media_task_runner, std::move(audio_renderer), std::move(video_renderer));
}
Line by line: the first lines declare a function CreateRenderer that returns a std::unique_ptr<Renderer>. A unique_ptr is a smart pointer, a small wrapper that owns an object and automatically deletes it when the wrapper goes away, so the programmer does not have to remember to free it by hand. The parameters are the task runners (objects that schedule work on particular threads), the audio and video sinks (the destinations where rendered sound and pictures are sent), a callback for overlay information, and a colour space. DCHECK(audio_renderer_sink); is a debug check that the audio sink exists. std::unique_ptr<AudioRenderer> audio_renderer(new AudioRendererImpl(...)) creates the audio renderer object, passing it the media task runner, the audio sink, a callback that creates audio decoders, the media log and the player id. The #if BUILDFLAG(IS_ANDROID) block adds one more argument only on Android builds. The comment explains the intended lifetime: the RendererImpl is destroyed when the WebMediaPlayerImpl destructor stops the pipeline, which reaches RendererWrapper::DestroyRenderer, and the factory is owned by the WebMediaPlayerImpl and is called after its destructor finishes. Finally return std::make_unique<RendererImpl>(...) builds the RendererImpl and hands it the audio renderer and the video renderer. The key idea is that the audio renderer is created here and owned by the renderer.
The other side of the race is the teardown path when the iframe is destroyed. An iframe is a page embedded inside another page. After LocalDOMWindow::FrameDestroyed is called, the callback media::PipelineImpl::RendererWrapper::CompleteSuspend runs, and from there PipelineImpl::RendererWrapper::DestroyRenderer releases the RendererImpl and, with it, the AudioRendererImpl:
void PipelineImpl::RendererWrapper::DestroyRenderer() {
DCHECK(media_task_runner_->RunsTasksInCurrentSequence());
// Destroy the renderer outside the lock scope to avoid holding the lock
// while renderer is being destroyed (in case Renderer destructor is costly).
std::unique_ptr<Renderer> renderer;
{
base::AutoLock auto_lock(shared_state_lock_);
renderer.swap(shared_state_.renderer);
}
}
Line by line: void PipelineImpl::RendererWrapper::DestroyRenderer() declares the function that destroys the renderer. DCHECK(media_task_runner_->RunsTasksInCurrentSequence()); checks that this code is running on the media thread, the thread that is supposed to handle media work. The comment explains that the renderer is destroyed outside the lock scope, so the lock is not held while the renderer is being destroyed, in case the destructor is costly. A lock is a mechanism that stops two threads from touching the same data at the same time. std::unique_ptr<Renderer> renderer; declares an empty smart pointer. The braces open a scope in which base::AutoLock auto_lock(shared_state_lock_); takes the lock, and renderer.swap(shared_state_.renderer); swaps the pipeline's stored renderer into the local pointer, leaving the shared slot empty. When the scope ends, the lock is released. When the function ends, the local renderer pointer goes out of scope and deletes the renderer it holds. This runs on the Media thread.
Meanwhile, the pointer to the AudioRendererImpl is still being used on the AudioOutputDevice thread, which calls Render on the renderer to fill each audio buffer:
int Render(base::TimeDelta delay,
base::TimeTicks delay_timestamp,
const media::AudioGlitchInfo& glitch_info,
media::AudioBus* audio_bus) override {
...
const int num_rendered_frames =
renderer_->Render(delay, delay_timestamp, glitch_info, audio_bus);
...
}
Line by line: int Render(...) declares a function that returns an integer, the number of frames rendered. The parameters are a delay, a timestamp for that delay, information about audio glitches (small interruptions in sound), and a pointer to an audio bus, which is a buffer that holds a block of audio samples. override means this function replaces a function declared in a parent class. The ... marks omitted code. const int num_rendered_frames = renderer_->Render(delay, delay_timestamp, glitch_info, audio_bus); calls Render on the renderer through the renderer_ pointer and stores the returned frame count. The arrow -> means call a function on the object the pointer points to. This is the use side of the bug: the audio thread reaches into the renderer to get sound.
That is the shape of the bug: the object is freed on the Media thread while the audio thread still holds a pointer to it and dereferences it. Dereferencing means following a pointer to read or use the object it points to. The researcher summarised it as a race condition in AudioRendererImpl.
Exploitation
Step 1: build and serve the test page
Fetch the ASan release build asan-linux-release-1460407 and serve poc.html together with big-buck-bunny_trailer.webm on port 8080. The media file is the resource the element loads.
Step 2: launch Chrome with autoplay allowed
./chrome --autoplay-policy=no-user-gesture-required http://[redacted]:8080/poc.html
The flag removes the gesture requirement so playback starts on load, which is what brings up the audio output device and its callback thread. The audio output device is the part of the system that actually sends sound to your speakers, and its callback thread is the worker that keeps asking for more sound. Because the trigger is a race, the report notes the POC cannot guarantee stable triggering and suggests trying a few more times.
Step 3: observe the ASan report
The crash is a heap-use-after-free, a READ of size 1, on thread T3144 (AudioOutputDevi). The heap is the area of memory where programs keep objects they create while running, and a read of size 1 means the program tried to read a single byte from freed memory. The top of the stack is the partition allocator's use-after-free check, reached through a raw_ptr dereference in blink::WebAudioSourceProviderImpl::TeeFilter::Render. A stack here is the list of function calls that led to the crash, printed from the innermost call outwards. The partition allocator is Chrome's memory manager, and raw_ptr is a pointer type that can detect when it is used after the object it points to has been freed.
==1==ERROR: AddressSanitizer: heap-use-after-free on address 0x756ff4952e98 at pc 0x572c7929ef02 bp 0x72c4e73fced0 sp 0x72c4e73fcec8
READ of size 1 at 0x756ff4952e98 thread T3144 (AudioOutputDevi)
Line by line: ==1==ERROR: AddressSanitizer: heap-use-after-free is ASan announcing the kind of problem. on address 0x756ff4952e98 is the memory address where it happened. at pc 0x572c7929ef02 bp 0x72c4e73fced0 sp 0x72c4e73fcec8 gives the program counter, base pointer and stack pointer, which are the processor's record of exactly where it was executing. READ of size 1 says the program tried to read one byte. at 0x756ff4952e98 thread T3144 (AudioOutputDevi) says which thread did it: the audio output device thread.
The use stack continues through the audio mixing and conversion path: blink::AudioRendererMixerInput::ProvideInput, media::AudioConverter, media::MultiChannelResampler, media::SincResampler, media::LoopbackAudioConverter, blink::AudioRendererMixer::Render, media::AudioOutputDeviceThreadCallback::Process and media::AudioDeviceThread::ThreadMain. In other words, the audio device thread is pulling frames through the mixer when it touches the freed object. A mixer combines several audio streams into one, and a resampler converts audio from one sample rate to another, the way you might convert a photo from one size to another.
The free stack is on thread T10 (Media), inside media::RendererImpl::~RendererImpl, called from DestroyRenderer at pipeline_impl.cc:1191, which is called from media::PipelineImpl::RendererWrapper::CompleteSuspend:
freed by thread T10 (Media) here:
#0 0x572c638d7492 in operator delete(void*, unsigned long) _asan_rtl_:3
#1 0x572c67c13a71 in operator() ./../../third_party/libc++/src/include/__memory/unique_ptr.h:76:5
#2 0x572c67c13a71 in reset ./../../third_party/libc++/src/include/__memory/unique_ptr.h:287:7
#3 0x572c67c13a71 in media::RendererImpl::~RendererImpl() ./../../media/renderers/renderer_impl.cc:128:19
#4 0x572c67c14ab3 in media::RendererImpl::~RendererImpl() ./../../media/renderers/renderer_impl.cc:116:31
#5 0x572c666ab313 in operator() ./../../third_party/libc++/src/include/__memory/unique_ptr.h:76:5
#6 0x572c666ab313 in reset ./../../third_party/libc++/src/include/__memory/unique_ptr.h:287:7
#7 0x572c666ab313 in ~unique_ptr ./../../third_party/libc++/src/include/__memory/unique_ptr.h:256:71
#8 0x572c666ab313 in DestroyRenderer ./../../media/base/pipeline_impl.cc:1191:1
#9 0x572c666ab313 in media::PipelineImpl::RendererWrapper::CompleteSuspend(media::TypedStatus<media::PipelineStatusTraits>) ./../../media/base/pipeline_impl.cc:1083:3
Line by line: freed by thread T10 (Media) here: introduces the stack that shows where the memory was released. Each numbered line is one call in the chain. #0 ... operator delete(void*, unsigned long) is the low-level function that actually gives memory back. #1 and #2 are inside unique_ptr, the smart pointer that owns the object. #3 and #4 are the RendererImpl destructor, the function that runs when the renderer is destroyed. #5 to #7 are more unique_ptr machinery. #8 DestroyRenderer is the function we saw earlier. #9 CompleteSuspend is the callback that runs when the pipeline finishes suspending. The file and line numbers after each name tell you exactly where in the source code that call sits.
The allocation stack is on thread T0 (chrome), in media::RendererImplFactory::CreateRenderer at renderer_impl_factory.cc:89:49, reached from blink::WebMediaPlayerImpl::CreateRenderer, media::PipelineImpl::Start, blink::WebMediaPlayerImpl::OnDemuxerCreated, blink::WebMediaPlayerImpl::StartPipeline and blink::WebMediaPlayerImpl::DataSourceInitialized, which traces back to HTMLMediaElement::StartPlayerLoad and the load timer. The allocation stack is the record of where the memory was originally handed out, so you can compare it with the free stack and see the full life of the object. The freed region is 552 bytes, and the faulting address is 24 bytes inside it, meaning the program was reading a field that sits 24 bytes into the 552-byte object.
The ASan report also carries a MiraclePtr note. MiraclePtr is a Chrome defence that makes freed pointers harder to abuse. The note says the crash occurred while a raw_ptr<T> containing a dangling pointer was being dereferenced, that the use and free threads do not match, and that the crash is likely caused by a race condition mislabelled as a use-after-free. A dangling pointer is a pointer that still points at an object that has already been freed. It advises checking that the free is sequenced after the use, for example on the same sequence or in a task posted after the use, and warns that otherwise the crash is still exploitable with MiraclePtr. Sequenced after means the free is guaranteed to happen only once the use is finished. The status is given as MANUAL ANALYSIS REQUIRED, meaning a human has to look at the ordering by hand.
The renderer command line in the report includes the autoplay flag and other standard renderer switches:
/proc/self/exe --type=renderer --crashpad-handler-pid=123756 --enable-crash-reporter=, --change-stack-guard-on-fork=enable --autoplay-policy=no-user-gesture-required --file-url-path-alias=/gen=asan-linux-release-1460407/gen --ozone-platform=wayland --disable-gpu-compositing --lang=en-US --num-raster-threads=4 --enable-main-frame-before-activation --renderer-client-id=5 --time-ticks-at-unix-epoch=-1747394574300974 --launch-time-ticks=251374854937 --shared-files=v8_context_snapshot_data:100 --metrics-shmem-handle=4,i,14665207153857744594,12260671244325860807,2097152 --field-trial-handle=3,i,12642760950729403537,12599755197160342593,262144 --disable-features=EyeDropper --variations-seed-version
Line by line: /proc/self/exe is the running program itself, here the Chrome renderer process. --type=renderer says this process is a renderer, the process that runs web pages. --crashpad-handler-pid=123756 names the process that collects crash reports. --enable-crash-reporter=, turns crash reporting on. --change-stack-guard-on-fork=enable is a hardening switch. --autoplay-policy=no-user-gesture-required is the same autoplay setting as before. --file-url-path-alias=/gen=asan-linux-release-1460407/gen maps a path inside the build. --ozone-platform=wayland selects the display system. --disable-gpu-compositing turns off graphics-card compositing. --lang=en-US sets the language. --num-raster-threads=4 sets how many threads draw page content. --enable-main-frame-before-activation is a startup ordering switch. --renderer-client-id=5 identifies this renderer. --time-ticks-at-unix-epoch and --launch-time-ticks are timing values. --shared-files=v8_context_snapshot_data:100 shares a snapshot of the JavaScript engine's state. --metrics-shmem-handle and --field-trial-handle are handles to shared memory used for metrics and experiments. --disable-features=EyeDropper turns off a named feature. --variations-seed-version identifies the experiment configuration. These are the normal switches Chrome passes to a renderer, and the important one for us is the autoplay flag.
Root cause
The renderer object is owned by the pipeline and freed on the Media thread when the frame is destroyed and the pipeline completes its suspend. The audio output device thread holds a pointer to the same renderer and calls into it from its own callback to produce audio. Nothing in the teardown path shown in the report waits for the audio thread to stop using the renderer before DestroyRenderer swaps it out of shared_state_ and the unique_ptr deletes it. The result is a classic use after free across threads: the free happens on the Media thread while the use happens on the AudioOutputDevice thread.
The comment in RendererImplFactory::CreateRenderer argues that the factory outlives the renderer because destruction is reached through the WebMediaPlayerImpl destructor and the pipeline stop path. That reasoning covers the factory's own lifetime, not the ordering between renderer destruction and the audio callback. The MiraclePtr note in the ASan output points at the same gap: the use and free are on different threads, so the pointer check fires but the underlying ordering problem remains, and the note says the crash would still be exploitable with MiraclePtr unless the free is sequenced after the use.
Impact
The report classifies this as a security issue, a race condition in AudioRendererImpl, and the platform rates it high severity. The crash occurs in the renderer process (the ASan report is from a renderer, and the crash type is recorded as a tab). The report does not describe a concrete exploitation path beyond the memory-safety violation itself, and it does not state what an attacker could achieve beyond triggering the use after free. Because it is a race, the trigger is not deterministic.
Fix
The report does not describe a fix or a patch. What it establishes is the ordering requirement: the renderer must not be freed while the audio output thread can still call into it, so teardown has to be sequenced after the last audio callback.. The MiraclePtr note frames the same requirement in terms of sequencing the free after the use.
Variants to test
- Other media teardown paths: detach the media element, remove the iframe, or navigate away while audio is playing, rather than only destroying the frame. A positive result is an ASan heap-use-after-free where the free stack is in
RendererImpl::~RendererImplorDestroyRendererand the use stack is on an audio thread. - Different renderer types: force alternative renderer selection through the pipeline so that other objects owned by
RendererImplare used from the audio path. A positive result is the same cross-thread use and free pattern with a different object in the use stack. - Timing variation: repeat the load and teardown many times, with and without the autoplay flag, to see whether the race window widens. A positive result is a higher crash rate or a crash with a different interleaving of the use and free stacks.
- Audio configuration changes: vary sample rates or channel counts so the converter and resampler path is exercised differently. A positive result is a crash in the conversion or mixing frames of the use stack, which would show the window is not limited to one audio configuration.
- MiraclePtr analysis: for any crash of this shape, check whether the free is sequenced after the use, as the ASan note advises. A positive result is a crash that remains reproducible under MiraclePtr because the free is not ordered after the use.
Glossary
- AddressSanitizer (ASan): a tool built into a program that watches memory and stops it with a detailed report when it touches memory it has already freed.
- Audio output device: the part of the system that sends sound to the speakers.
- Audio output thread: the worker inside Chrome that keeps asking for more audio and sends it to the device.
- Autoplay: starting playback without the user clicking or pressing a key.
- Blink: the part of Chrome that turns HTML and CSS into what you see on screen.
- Bounty: money paid to a researcher for finding and reporting a security bug.
- Callback: a function that is handed to another piece of code so it can be called later.
- CORS: a browser rule about which websites may read responses from other websites.
- CVE: a public catalogue number for a known security flaw.
- Dangling pointer: a pointer that still points at an object that has already been freed.
- Dereference: following a pointer to read or use the object it points to.
- Destructor: the function that runs when an object is destroyed.
- Frame: a box that holds a page inside another page, or the page itself in the browser's internal model.
- Heap: the area of memory where a program keeps objects it creates while running.
- HTML: the language web pages are written in.
- HTMLMediaElement: the part of a web page that holds a video or audio file.
- Iframe: a page embedded inside another page.
- Lock: a mechanism that stops two threads from touching the same data at the same time.
- Media stack: the collection of Chrome components that play audio and video.
- MiraclePtr: a Chrome defence that makes freed pointers harder to abuse.
- Mixer: a component that combines several audio streams into one.
- POC (proof of concept): a small demonstration that a bug is real.
- Port: a numbered door on a computer through which a network service answers.
- Race condition: a situation where two workers act at the same time and the result depends on who gets there first.
- Raw pointer: a plain pointer that does not manage the lifetime of the object it points to.
- Renderer process: the Chrome process that runs web pages.
- Resampler: a component that converts audio from one sample rate to another.
- Sample rate: how many audio samples are taken per second.
- Sequenced after: guaranteed to happen only once something else has finished.
- Smart pointer: a wrapper around a pointer that owns the object and frees it automatically.
- Stack (crash stack): the list of function calls that led to a crash, printed from the innermost call outwards.
- Thread: a separate worker inside the same program that can run at the same time as other workers.
- Use after free: using an object after it has been freed, which can crash the program or be abused by an attacker.
- Web server: a program that hands out web pages and files over the network.