Use after free in Dawn (CVE-2024-5495)
A WebGPU shader written in WGSL is translated by Chromium's Dawn layer into HLSL and then compiled by the bundled dxcompiler, where a use-after-free occurs during control-flow simplification. Opening a crafted HTML page on Windows with a D3D12 backend supporting shader model 6.6 crashes the GPU process.
- Fix shipped in 30 days
VULNERABILITY DETAILS
Chromium translates wgsl shaders via tint to an OS-specific shader format. On Windows, the OS-specific file format is hlsl, processed in dxcompiler.dll. When compiling chrome-generated hlsl files, this triggers an UAF inside the hlsl compiler.
VERSION
Chrome Version: Pre-compiled ASAN Chromium 126.0.6451.0 (Developer Build) (64-bit)
Operating System: Win11 Build 22631.2861
REPRODUCTION CASE
Attached is a .html file containing a WebGPU shader. Opening the html file (on windows with the D3D12 backend) crashes the GPU process. Note that the shader compiler only crashes if the DirectX back-end supports shader model 6.6. Inspecting the shader model is possible with a Microsoft tool called dxcapsviewer. The UI on my machine shows:
NVIDIA GeForce RTX 3090
Direct3D 12
Shader Model 6.6
Reproducing the issue stand-alone on Linux also possible:
- Compile the standalone.wgsl with tint (commit 1488c9c94dea5d9bb158870717ebaf2f7d161f57) to hlsl via
./tint standalone.wgsl -o standalone.hlsl. I also attached standalone.hlsl, but you should get the very same file when compiling standalone.wgsl yourself - Compile the hlsl with dxc (commit e7b78ff9c99c19a6a0c98256db9794e0af4eb59d):
./dxc-3.7 standalone.hlsl -T cs_6_6. This should trigger an ASAN violation.
Attached:
- html that should trigger an ASAN violation in chromium (if the native back-end support shader-model 6.6)
- wgsl for producing the hlsl shader
- the hlsl shader
- asan log file
I have a bunch of more crashes but I don't want to spam the bug tracker. Do you prefer that I (1) report them all or (2) wait for the current dxcompiler issues to be fixed, check which crashes remain and report the ones still reproducing?
[8636:10396:0501/050229.559:WARNING:chrome_main_delegate.cc(742)] This is Chrome version 126.0.6451.0 (not a warning)
[8636:9132:0501/050229.700:WARNING:dns_config_service_win.cc(605)] Failed to read DnsConfig.
[8636:10396:0501/050229.731:INFO:chrome_browser_cloud_management_controller.cc(161)] Cloud management controller initialization aborted as CBCM is not enabled. Please use the `--enable-chrome-browser-cloud-management` command line flag to enable it if you are not using the official Google Chrome build.
[8636:1056:0501/050229.747:ERROR:sandbox_win.cc(911)] Sandbox cannot access executable. Check filesystem permissions are valid. See https://bit.ly/31yqMJR.: Access is denied. (0x5)
[8636:10396:0501/050229.857:WARNING:account_consistency_mode_manager.cc(77)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured.
[8636:10396:0501/050230.029:WARNING:browser_management_service.cc(128)] EnterpriseLogoUrl fetch failed with error code -1 and MIME type
[8636:10396:0501/050230.826:ERROR:network_service_instance_impl.cc(600)] Network service crashed, restarting service.
[8636:10396:0501/050230.872:WARNING:external_registry_loader_win.cc(232)] Error observing HKLM: 5
[9360:9024:0501/050230.935:WARNING:dns_config_service_win.cc(605)] Failed to read DnsConfig.
[8636:8980:0501/050234.707:WARNING:dns_config_service_win.cc(605)] Failed to read DnsConfig.
[9360:9372:0501/050235.942:WARNING:dns_config_service_win.cc(605)] Failed to read DnsConfig.
[8636:9992:0501/050244.712:WARNING:dns_config_service_win.cc(605)] Failed to read DnsConfig.
[9360:10548:0501/050245.944:WARNING:dns_config_service_win.cc(605)] Failed to read DnsConfig.
[8636:10396:0501/050248.482:INFO:CONSOLE(20)] "[object GPUDevice]", source: file:///E:/indexAddToListUAF.html (20)
=================================================================
==10192==ERROR: AddressSanitizer: heap-use-after-free on address 0x1215ce251138 at pc 0x7ffb6ee93c24 bp 0x007e09bfbfb0 sp 0x007e09bfbff8
READ of size 8 at 0x1215ce251138 thread T0
==10192==WARNING: Failed to use and restart external symbolizer!
==10192==*** WARNING: Failed to initialize DbgHelp! ***
==10192==*** Most likely this means that the app is already ***
==10192==*** using DbgHelp, possibly with incompatible flags. ***
==10192==*** Due to technical reasons, symbolization might crash ***
==10192==*** or produce wrong results. ***
#0 0x7ffb6ee93c23 in llvm::BranchInst::BranchInst C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\Instructions.cpp:723
#1 0x7ffb6fd9a5d4 in SimplifyTerminatorOnSelect C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\Transforms\Utils\SimplifyCFG.cpp:2637
#2 0x7ffb6fd812dd in `anonymous namespace'::SimplifyCFGOpt::SimplifySwitch C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\Transforms\Utils\SimplifyCFG.cpp:4320
#3 0x7ffb6fd7389b in llvm::SimplifyCFG C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\Transforms\Utils\SimplifyCFG.cpp:4740
#4 0x7ffb6f19637f in simplifyFunctionCFG C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\Transforms\Scalar\SimplifyCFGPass.cpp:157
#5 0x7ffb6e0d7cb4 in llvm::FPPassManager::runOnFunction C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\LegacyPassManager.cpp:1587
#6 0x7ffb6e0d874e in llvm::FPPassManager::runOnModule C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\LegacyPassManager.cpp:1609
#7 0x7ffb6e0d9405 in llvm::legacy::PassManagerImpl::run C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\LegacyPassManager.cpp:1771
#8 0x7ffb6e0e272c in clang::EmitBackendOutput C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\tools\clang\lib\CodeGen\BackendUtil.cpp:779
#9 0x7ffb6daf0811 in clang::BackendConsumer::HandleTranslationUnit C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\tools\clang\lib\CodeGen\CodeGenAction.cpp:191
#10 0x7ffb6e20e191 in clang::ParseAST C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\tools\clang\lib\Parse\ParseAST.cpp:164
#11 0x7ffb6daeb502 in clang::CodeGenAction::ExecuteAction C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\tools\clang\lib\CodeGen\CodeGenAction.cpp:807
#12 0x7ffb6daf8cd3 in clang::FrontendAction::Execute C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\tools\clang\lib\Frontend\FrontendAction.cpp:455
#13 0x7ffb6d9d6b05 in DxcCompiler::Compile C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\tools\clang\tools\dxcompiler\dxcompilerobj.cpp:982
#14 0x7ffb114d9405 in dawn::native::d3d::CompileShader C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d\ShaderUtils.cpp:355
#15 0x7ffb1153930e in dawn::native::LoadOrRun<dawn::Result<dawn::native::d3d::CompiledShader,dawn::native::ErrorData> (*)(dawn::native::Blob),dawn::Result<dawn::native::d3d::CompiledShader,dawn::native::ErrorData> (*)(dawn::native::d3d::D3DCompilationRequest)> C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\CacheRequest.h:154
#16 0x7ffb115e0b54 in dawn::native::d3d12::ShaderModule::Compile C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d12\ShaderModuleD3D12.cpp:378
#17 0x7ffb115a431c in dawn::native::d3d12::ComputePipeline::InitializeImpl C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d12\ComputePipelineD3D12.cpp:87
#18 0x7ffb113efc30 in dawn::native::PipelineBase::Initialize C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\Pipeline.cpp:371
#19 0x7ffb1133ee71 in dawn::native::DeviceBase::CreateComputePipeline C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\Device.cpp:1996
#20 0x7ffb1133e857 in dawn::native::DeviceBase::APICreateComputePipeline C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\Device.cpp:1299
#21 0x7ffb336dcfad in dawn::wire::server::Server::DoDeviceCreateComputePipeline C:\b\s\w\ir\cache\builder\src\out\Release_x64\gen\third_party\dawn\src\dawn\wire\server\ServerDoers_autogen.cpp:250
#22 0x7ffb330e2e04 in dawn::wire::server::Server::HandleDeviceCreateComputePipeline C:\b\s\w\ir\cache\builder\src\out\Release_x64\gen\third_party\dawn\src\dawn\wire\server\ServerHandlers_autogen.cpp:477
#23 0x7ffb330eb8dd in dawn::wire::server::Server::HandleCommandsImpl C:\b\s\w\ir\cache\builder\src\out\Release_x64\gen\third_party\dawn\src\dawn\wire\server\ServerHandlers_autogen.cpp:1652
#24 0x7ffb2ed6f7b2 in gpu::webgpu::`anonymous namespace'::DawnWireServer::HandleCommands C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\webgpu_decoder_impl.cc:982
#25 0x7ffb2ed6fc05 in gpu::webgpu::`anonymous namespace'::WebGPUDecoderImpl::HandleDawnCommands C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\webgpu_decoder_impl.cc:1880
#26 0x7ffb2ed64021 in gpu::webgpu::`anonymous namespace'::WebGPUDecoderImpl::DoCommands C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\webgpu_decoder_impl.cc:1825
#27 0x7ffb22a86013 in gpu::CommandBufferService::Flush C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\command_buffer_service.cc:232
#28 0x7ffb1f5ecbcc in gpu::CommandBufferStub::OnAsyncFlush C:\b\s\w\ir\cache\builder\src\gpu\ipc\service\command_buffer_stub.cc:506
#29 0x7ffb1f5eb673 in gpu::CommandBufferStub::ExecuteDeferredRequest C:\b\s\w\ir\cache\builder\src\gpu\ipc\service\command_buffer_stub.cc:154
#30 0x7ffb22aa3e4a in gpu::GpuChannel::ExecuteDeferredRequest C:\b\s\w\ir\cache\builder\src\gpu\ipc\service\gpu_channel.cc:895
#31 0x7ffb22ab414a in base::internal::Invoker<base::internal::FunctorTraits<void (gpu::GpuChannel::*&&)(mojo::StructPtr<gpu::mojom::DeferredRequestParams>),base::WeakPtr<gpu::GpuChannel> &&,mojo::StructPtr<gpu::mojom::DeferredRequestParams> &&>,base::internal::BindState<1,1,0,void (gpu::GpuChannel::*)(mojo::StructPtr<gpu::mojom::DeferredRequestParams>),base::WeakPtr<gpu::GpuChannel>,mojo::StructPtr<gpu::mojom::DeferredRequestParams> >,void ()>::RunOnce C:\b\s\w\ir\cache\builder\src\base\functional\bind_internal.h:980
#32 0x7ffb220a65dd in gpu::SchedulerDfs::ExecuteSequence C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\scheduler_dfs.cc:743
#33 0x7ffb220a4938 in gpu::SchedulerDfs::RunNextTask C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\scheduler_dfs.cc:668
#34 0x7ffb220a7c68 in base::internal::Invoker<base::internal::FunctorTraits<void (gpu::SchedulerDfs::*&&)(),gpu::SchedulerDfs *>,base::internal::BindState<1,1,0,void (gpu::SchedulerDfs::*)(),base::internal::UnretainedWrapper<gpu::SchedulerDfs,base::unretained_traits::MayNotDangle,0> >,void ()>::RunOnce C:\b\s\w\ir\cache\builder\src\base\functional\bind_internal.h:980
#35 0x7ffb1d4dca20 in base::TaskAnnotator::RunTaskImpl C:\b\s\w\ir\cache\builder\src\base\task\common\task_annotator.cc:203
#36 0x7ffb20ec6c66 in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl C:\b\s\w\ir\cache\builder\src\base\task\sequence_manager\thread_controller_with_message_pump_impl.cc:473
#37 0x7ffb20ec5b89 in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork C:\b\s\w\ir\cache\builder\src\base\task\sequence_manager\thread_controller_with_message_pump_impl.cc:338
#38 0x7ffb20efa37e in base::MessagePumpDefault::Run C:\b\s\w\ir\cache\builder\src\base\message_loop\message_pump_default.cc:40
#39 0x7ffb20ec88ac in base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run C:\b\s\w\ir\cache\builder\src\base\task\sequence_manager\thread_controller_with_message_pump_impl.cc:645
#40 0x7ffb1d526f30 in base::RunLoop::Run C:\b\s\w\ir\cache\builder\src\base\run_loop.cc:134
#41 0x7ffb2038c71b in content::GpuMain C:\b\s\w\ir\cache\builder\src\content\gpu\gpu_main.cc:437
#42 0x7ffb1bdcf5d2 in content::RunOtherNamedProcessTypeMain C:\b\s\w\ir\cache\builder\src\content\app\content_main_runner_impl.cc:773
#43 0x7ffb1bdd1b53 in content::ContentMainRunnerImpl::Run C:\b\s\w\ir\cache\builder\src\content\app\content_main_runner_impl.cc:1155
#44 0x7ffb1bdcd56d in content::RunContentProcess C:\b\s\w\ir\cache\builder\src\content\app\content_main.cc:332
#45 0x7ffb1bdce05d in content::ContentMain C:\b\s\w\ir\cache\builder\src\content\app\content_main.cc:345
#46 0x7ffb0ee116b1 in ChromeMain C:\b\s\w\ir\cache\builder\src\chrome\app\chrome_main.cc:192
#47 0x7ff640f243a5 in MainDllLoader::Launch C:\b\s\w\ir\cache\builder\src\chrome\app\main_dll_loader_win.cc:181
#48 0x7ff640f21db2 in main C:\b\s\w\ir\cache\builder\src\chrome\app\chrome_exe_main_win.cc:350
#49 0x7ff6412fd943 in __scrt_common_main_seh D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
#50 0x7ffbc73c257c in BaseThreadInitThunk+0x1c (C:\Windows\System32\KERNEL32.DLL+0x18001257c)
#51 0x7ffbc83eaa47 in RtlUserThreadStart+0x27 (C:\Windows\SYSTEM32\ntdll.dll+0x18005aa47)
0x1215ce251138 is located 24 bytes inside of 88-byte region [0x1215ce251120,0x1215ce251178)
freed by thread T0 here:
#0 0x7ff640ffca0d in free C:\b\s\w\ir\cache\builder\src\third_party\llvm\compiler-rt\lib\asan\asan_malloc_win.cpp:82
#1 0x7ffb6dd18b1b in llvm::ICmpInst::~ICmpInst C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\include\llvm\IR\Instructions.h:1093
#2 0x7ffb6ef6fed2 in llvm::BasicBlock::removePredecessor C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\BasicBlock.cpp:329
#3 0x7ffb6fd9a40f in SimplifyTerminatorOnSelect C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\Transforms\Utils\SimplifyCFG.cpp:2622
#4 0x7ffb6fd812dd in `anonymous namespace'::SimplifyCFGOpt::SimplifySwitch C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\Transforms\Utils\SimplifyCFG.cpp:4320
#5 0x7ffb6fd7389b in llvm::SimplifyCFG C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\Transforms\Utils\SimplifyCFG.cpp:4740
#6 0x7ffb6f19637f in simplifyFunctionCFG C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\Transforms\Scalar\SimplifyCFGPass.cpp:157
#7 0x7ffb6e0d7cb4 in llvm::FPPassManager::runOnFunction C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\LegacyPassManager.cpp:1587
#8 0x7ffb6e0d874e in llvm::FPPassManager::runOnModule C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\LegacyPassManager.cpp:1609
#9 0x7ffb6e0d9405 in llvm::legacy::PassManagerImpl::run C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\LegacyPassManager.cpp:1771
#10 0x7ffb6e0e272c in clang::EmitBackendOutput C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\tools\clang\lib\CodeGen\BackendUtil.cpp:779
#11 0x7ffb6daf0811 in clang::BackendConsumer::HandleTranslationUnit C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\tools\clang\lib\CodeGen\CodeGenAction.cpp:191
#12 0x7ffb6e20e191 in clang::ParseAST C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\tools\clang\lib\Parse\ParseAST.cpp:164
#13 0x7ffb6daeb502 in clang::CodeGenAction::ExecuteAction C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\tools\clang\lib\CodeGen\CodeGenAction.cpp:807
#14 0x7ffb6daf8cd3 in clang::FrontendAction::Execute C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\tools\clang\lib\Frontend\FrontendAction.cpp:455
#15 0x7ffb6d9d6b05 in DxcCompiler::Compile C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\tools\clang\tools\dxcompiler\dxcompilerobj.cpp:982
#16 0x7ffb114d9405 in dawn::native::d3d::CompileShader C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d\ShaderUtils.cpp:355
#17 0x7ffb1153930e in dawn::native::LoadOrRun<dawn::Result<dawn::native::d3d::CompiledShader,dawn::native::ErrorData> (*)(dawn::native::Blob),dawn::Result<dawn::native::d3d::CompiledShader,dawn::native::ErrorData> (*)(dawn::native::d3d::D3DCompilationRequest)> C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\CacheRequest.h:154
#18 0x7ffb115e0b54 in dawn::native::d3d12::ShaderModule::Compile C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d12\ShaderModuleD3D12.cpp:378
#19 0x7ffb115a431c in dawn::native::d3d12::ComputePipeline::InitializeImpl C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d12\ComputePipelineD3D12.cpp:87
#20 0x7ffb113efc30 in dawn::native::PipelineBase::Initialize C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\Pipeline.cpp:371
#21 0x7ffb1133ee71 in dawn::native::DeviceBase::CreateComputePipeline C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\Device.cpp:1996
#22 0x7ffb1133e857 in dawn::native::DeviceBase::APICreateComputePipeline C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\Device.cpp:1299
#23 0x7ffb336dcfad in dawn::wire::server::Server::DoDeviceCreateComputePipeline C:\b\s\w\ir\cache\builder\src\out\Release_x64\gen\third_party\dawn\src\dawn\wire\server\ServerDoers_autogen.cpp:250
#24 0x7ffb330e2e04 in dawn::wire::server::Server::HandleDeviceCreateComputePipeline C:\b\s\w\ir\cache\builder\src\out\Release_x64\gen\third_party\dawn\src\dawn\wire\server\ServerHandlers_autogen.cpp:477
#25 0x7ffb330eb8dd in dawn::wire::server::Server::HandleCommandsImpl C:\b\s\w\ir\cache\builder\src\out\Release_x64\gen\third_party\dawn\src\dawn\wire\server\ServerHandlers_autogen.cpp:1652
#26 0x7ffb2ed6f7b2 in gpu::webgpu::`anonymous namespace'::DawnWireServer::HandleCommands C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\webgpu_decoder_impl.cc:982
#27 0x7ffb2ed6fc05 in gpu::webgpu::`anonymous namespace'::WebGPUDecoderImpl::HandleDawnCommands C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\webgpu_decoder_impl.cc:1880
previously allocated by thread T0 here:
#0 0x7ff640ffcb0d in malloc C:\b\s\w\ir\cache\builder\src\third_party\llvm\compiler-rt\lib\asan\asan_malloc_win.cpp:98
#1 0x7ffb704e396e in operator new D:\a\_work\1\s\src\vctools\crt\vcstartup\src\heap\new_scalar.cpp:36
#2 0x7ffb6ef6c784 in llvm::User::operator new C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\User.cpp:108
#3 0x7ffb6e0bd516 in llvm::PHINode::Create C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\include\llvm\IR\Instructions.h:2340
#4 0x7ffb6fd79763 in llvm::SimplifyCFG C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\Transforms\Utils\SimplifyCFG.cpp:4740
#5 0x7ffb6f19637f in simplifyFunctionCFG C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\Transforms\Scalar\SimplifyCFGPass.cpp:157
#6 0x7ffb6e0d7cb4 in llvm::FPPassManager::runOnFunction C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\LegacyPassManager.cpp:1587
#7 0x7ffb6e0d874e in llvm::FPPassManager::runOnModule C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\LegacyPassManager.cpp:1609
#8 0x7ffb6e0d9405 in llvm::legacy::PassManagerImpl::run C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\LegacyPassManager.cpp:1771
#9 0x7ffb6e0e272c in clang::EmitBackendOutput C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\tools\clang\lib\CodeGen\BackendUtil.cpp:779
#10 0x7ffb6daf0811 in clang::BackendConsumer::HandleTranslationUnit C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\tools\clang\lib\CodeGen\CodeGenAction.cpp:191
#11 0x7ffb6e20e191 in clang::ParseAST C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\tools\clang\lib\Parse\ParseAST.cpp:164
#12 0x7ffb6daeb502 in clang::CodeGenAction::ExecuteAction C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\tools\clang\lib\CodeGen\CodeGenAction.cpp:807
#13 0x7ffb6daf8cd3 in clang::FrontendAction::Execute C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\tools\clang\lib\Frontend\FrontendAction.cpp:455
#14 0x7ffb6d9d6b05 in DxcCompiler::Compile C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\tools\clang\tools\dxcompiler\dxcompilerobj.cpp:982
#15 0x7ffb114d9405 in dawn::native::d3d::CompileShader C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d\ShaderUtils.cpp:355
#16 0x7ffb1153930e in dawn::native::LoadOrRun<dawn::Result<dawn::native::d3d::CompiledShader,dawn::native::ErrorData> (*)(dawn::native::Blob),dawn::Result<dawn::native::d3d::CompiledShader,dawn::native::ErrorData> (*)(dawn::native::d3d::D3DCompilationRequest)> C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\CacheRequest.h:154
#17 0x7ffb115e0b54 in dawn::native::d3d12::ShaderModule::Compile C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d12\ShaderModuleD3D12.cpp:378
#18 0x7ffb115a431c in dawn::native::d3d12::ComputePipeline::InitializeImpl C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d12\ComputePipelineD3D12.cpp:87
#19 0x7ffb113efc30 in dawn::native::PipelineBase::Initialize C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\Pipeline.cpp:371
#20 0x7ffb1133ee71 in dawn::native::DeviceBase::CreateComputePipeline C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\Device.cpp:1996
#21 0x7ffb1133e857 in dawn::native::DeviceBase::APICreateComputePipeline C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\Device.cpp:1299
#22 0x7ffb336dcfad in dawn::wire::server::Server::DoDeviceCreateComputePipeline C:\b\s\w\ir\cache\builder\src\out\Release_x64\gen\third_party\dawn\src\dawn\wire\server\ServerDoers_autogen.cpp:250
#23 0x7ffb330e2e04 in dawn::wire::server::Server::HandleDeviceCreateComputePipeline C:\b\s\w\ir\cache\builder\src\out\Release_x64\gen\third_party\dawn\src\dawn\wire\server\ServerHandlers_autogen.cpp:477
#24 0x7ffb330eb8dd in dawn::wire::server::Server::HandleCommandsImpl C:\b\s\w\ir\cache\builder\src\out\Release_x64\gen\third_party\dawn\src\dawn\wire\server\ServerHandlers_autogen.cpp:1652
#25 0x7ffb2ed6f7b2 in gpu::webgpu::`anonymous namespace'::DawnWireServer::HandleCommands C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\webgpu_decoder_impl.cc:982
#26 0x7ffb2ed6fc05 in gpu::webgpu::`anonymous namespace'::WebGPUDecoderImpl::HandleDawnCommands C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\webgpu_decoder_impl.cc:1880
#27 0x7ffb2ed64021 in gpu::webgpu::`anonymous namespace'::WebGPUDecoderImpl::DoCommands C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\webgpu_decoder_impl.cc:1825
SUMMARY: AddressSanitizer: heap-use-after-free C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\Instructions.cpp:723 in llvm::BranchInst::BranchInst
Shadow bytes around the buggy address:
0x1215ce250e80: fa fa f7 fa fd fd fd fd fd fd fd fd fd fd fd fd
0x1215ce250f00: fa fa f7 fa fd fd fd fd fd fd fd fd fd fd fd fd
0x1215ce250f80: fa fa f7 fa fd fd fd fd fd fd fd fd fd fd fd fd
0x1215ce251000: fa fa f7 fa fd fd fd fd fd fd fd fd fd fd fd fd
0x1215ce251080: fa fa f7 fa 00 00 00 00 00 00 00 00 00 00 00 00
=>0x1215ce251100: fa fa f7 fa fd fd fd[fd]fd fd fd fd fd fd fd fa
0x1215ce251180: fa fa f7 fa 00 00 00 00 00 00 00 00 00 00 00 00
0x1215ce251200: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x1215ce251280: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x1215ce251300: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x1215ce251380: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 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
==10192==ADDITIONAL INFO
==10192==Note: Please include this section with the ASan report.
Task trace:
#0 0x7ffb220a4ade in gpu::SchedulerDfs::RunNextTask C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\scheduler_dfs.cc:684
#1 0x7ffb220a4ade in gpu::SchedulerDfs::RunNextTask C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\scheduler_dfs.cc:684
#2 0x7ffb220a4ade in gpu::SchedulerDfs::RunNextTask C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\scheduler_dfs.cc:684
#3 0x7ffb220a4ade in gpu::SchedulerDfs::RunNextTask C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\scheduler_dfs.cc:684
MiraclePtr Status: NOT PROTECTED
No raw_ptr<T> access to this region was detected prior to this crash.
This crash is still exploitable with MiraclePtr.
Refer to https://chromium.googlesource.com/chromium/src/+/main/base/memory/raw_ptr.md for details.
==10192==END OF ADDITIONAL INFO
==10192==ABORTING
[8636:10396:0501/050250.174:ERROR:gpu_process_host.cc(1002)] GPU process exited unexpectedly: exit_code=1
[8636:10396:0501/050250.174:WARNING:gpu_process_host.cc(1436)] The GPU process has crashed 1 time(s)
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely a use-after-free in dxcompiler's SimplifyCFG pass, where SimplifyTerminatorOnSelect removes a predecessor block and frees an instruction that is then read while building a new branch instruction.
Impact
A crafted web page could crash the GPU process on affected Windows machines; the report does not claim code execution or any other impact.
What the attacker needed
Windows with D3D12 backend; GPU supporting shader model 6.6; Victim opens a crafted HTML page
How it was found
- Open the attached HTML file in the ASAN Chromium build on Windows with the D3D12 backend.
- Confirm the GPU back-end supports shader model 6.6, for example with dxcapsviewer.
- Observe the GPU process crash and the ASAN heap-use-after-free report.
- Alternatively, compile the standalone WGSL to HLSL with tint.
- Then compile the resulting HLSL with dxc targeting compute shader model 6.6 to trigger the ASAN violation.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Web pages can send small programs called shaders to the graphics card. Chrome first rewrites these programs into another language and hands them to a compiler library. A mistake in that compiler frees some memory and then reads it again, which crashes the part of Chrome that talks to the graphics card.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.