Use after free in Dawn (CVE-2024-5831)
A crafted WebGPU shader, when translated to HLSL and compiled by the bundled dxcompiler, triggers a heap use-after-free inside the compiler's control-flow simplification pass. An attacker could crash the GPU process by getting a victim to open a page containing such a shader.
- Fix shipped in 36 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.6465.0 (Developer Build) (64-bit) Operating System: Win10 Build 19045.4291
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.
Reproducing the issue stand-alone on Linux also possible:
- Compile the standalone.wgsl with tint (commit 5976efe6b4b72c822085cf7ee08ad00036888ab5) 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 773b01272719e07ea369bc17f5ddfce248751c7a):
./dxc-3.7 standalone.hlsl -T ps_6_2. This should trigger an ASAN violation.
Attached:
- html that triggers an ASAN violation in chromium
- wgsl for producing the hlsl shader
- the hlsl shader
- asan log file
[9052:7868:0507/063454.505:WARNING:chrome_main_delegate.cc(742)] This is Chrome version 126.0.6465.0 (not a warning)
[9052:3332:0507/063454.735:WARNING:dns_config_service_win.cc(605)] Failed to read DnsConfig.
[9052:2156:0507/063454.909:ERROR:sandbox_win.cc(913)] Sandbox cannot access executable. Check filesystem permissions are valid. See https://bit.ly/31yqMJR.: Access is denied. (0x5)
[9052:7868:0507/063454.948:WARNING:account_consistency_mode_manager.cc(77)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured.
[9052:7868:0507/063455.162:WARNING:browser_management_service.cc(128)] EnterpriseLogoUrl fetch failed with error code -1 and MIME type
[9052:7868:0507/063456.916:ERROR:network_service_instance_impl.cc(600)] Network service crashed, restarting service.
[9052:7868:0507/063456.943:WARNING:external_registry_loader_win.cc(232)] Error observing HKLM: 5
[9052:1800:0507/063459.325:WARNING:dns_config_service_win.cc(605)] Failed to read DnsConfig.
[8784:7296:0507/063459.972:WARNING:dns_config_service_win.cc(605)] Failed to read DnsConfig.
[8784:7296:0507/063512.196:WARNING:dns_config_service_win.cc(605)] Failed to read DnsConfig.
[9052:4052:0507/063512.364:WARNING:dns_config_service_win.cc(605)] Failed to read DnsConfig.
[8784:7084:0507/063521.593:WARNING:dns_config_service_win.cc(605)] Failed to read DnsConfig.
[9052:8844:0507/063532.085:WARNING:dns_config_service_win.cc(605)] Failed to read DnsConfig.
[8784:2628:0507/063543.246:WARNING:dns_config_service_win.cc(605)] Failed to read DnsConfig.
[9052:2156:0507/063803.323:ERROR:sandbox_win.cc(913)] Sandbox cannot access executable. Check filesystem permissions are valid. See https://bit.ly/31yqMJR.: Access is denied. (0x5)
[9052:7868:0507/063930.775:INFO:CONSOLE(20)] "[object GPUDevice]", source: file://vboxsvr/shared/indexCanPropagatePredecessorsForPHIs.html (20)
[9052:7868:0507/063930.799:INFO:CONSOLE(107)] "[object GPURenderPipeline]", source: file://vboxsvr/shared/indexCanPropagatePredecessorsForPHIs.html (107)
=================================================================
==7368==ERROR: AddressSanitizer: heap-use-after-free on address 0x122d458c3318 at pc 0x7ffed63ec804 bp 0x008564bfba00 sp 0x008564bfba48
WRITE of size 8 at 0x122d458c3318 thread T0
==7368==WARNING: Failed to use and restart external symbolizer!
==7368==*** WARNING: Failed to initialize DbgHelp! ***
==7368==*** Most likely this means that the app is already ***
==7368==*** using DbgHelp, possibly with incompatible flags. ***
==7368==*** Due to technical reasons, symbolization might crash ***
==7368==*** or produce wrong results. ***
#0 0x7ffed63ec803 in llvm::PHINode::removeIncomingValue C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\Instructions.cpp:106
#1 0x7ffed64cf19c in llvm::BasicBlock::removePredecessor C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\BasicBlock.cpp:320
#2 0x7ffed72268a5 in llvm::ConstantFoldTerminator C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\Transforms\Utils\Local.cpp:93
#3 0x7ffed72d096e in llvm::SimplifyCFG C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\Transforms\Utils\SimplifyCFG.cpp:4740
#4 0x7ffed66f58cf in simplifyFunctionCFG C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\Transforms\Scalar\SimplifyCFGPass.cpp:157
#5 0x7ffed5627f54 in llvm::FPPassManager::runOnFunction C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\LegacyPassManager.cpp:1587
#6 0x7ffed56289ee in llvm::FPPassManager::runOnModule C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\LegacyPassManager.cpp:1609
#7 0x7ffed56296a5 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 0x7ffed56329cc 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 0x7ffed50408c1 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 0x7ffed575e431 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 0x7ffed503b5b2 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 0x7ffed5048d83 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 0x7ffed4f26b73 in DxcCompiler::Compile C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\tools\clang\tools\dxcompiler\dxcompilerobj.cpp:984
#14 0x7ffedd881fb5 in dawn::native::d3d::CompileShader C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d\ShaderUtils.cpp:355
#15 0x7ffedd8e954e 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 0x7ffedd9911b4 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 0x7ffedd97a933 in dawn::native::d3d12::RenderPipeline::InitializeImpl C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d12\RenderPipelineD3D12.cpp:385
#18 0x7ffedd79bec0 in dawn::native::PipelineBase::Initialize C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\Pipeline.cpp:371
#19 0x7ffedd6ee081 in dawn::native::DeviceBase::CreateRenderPipeline C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\Device.cpp:2125
#20 0x7ffedd6eda67 in dawn::native::DeviceBase::APICreateRenderPipeline C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\Device.cpp:1456
#21 0x7ffeffb8c0bd in dawn::wire::server::Server::DoDeviceCreateRenderPipeline C:\b\s\w\ir\cache\builder\src\out\Release_x64\gen\third_party\dawn\src\dawn\wire\server\ServerDoers_autogen.cpp:314
#22 0x7ffeff592dd4 in dawn::wire::server::Server::HandleDeviceCreateRenderPipeline C:\b\s\w\ir\cache\builder\src\out\Release_x64\gen\third_party\dawn\src\dawn\wire\server\ServerHandlers_autogen.cpp:606
#23 0x7ffeff597c81 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:1682
#24 0x7ffefb14a692 in gpu::webgpu::`anonymous namespace'::DawnWireServer::HandleCommands C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\webgpu_decoder_impl.cc:992
#25 0x7ffefb14aae5 in gpu::webgpu::`anonymous namespace'::WebGPUDecoderImpl::HandleDawnCommands C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\webgpu_decoder_impl.cc:1888
#26 0x7ffefb13ee71 in gpu::webgpu::`anonymous namespace'::WebGPUDecoderImpl::DoCommands C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\webgpu_decoder_impl.cc:1833
#27 0x7ffeeee28863 in gpu::CommandBufferService::Flush C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\command_buffer_service.cc:232
#28 0x7ffeeb9daf1c in gpu::CommandBufferStub::OnAsyncFlush C:\b\s\w\ir\cache\builder\src\gpu\ipc\service\command_buffer_stub.cc:506
#29 0x7ffeeb9d99c3 in gpu::CommandBufferStub::ExecuteDeferredRequest C:\b\s\w\ir\cache\builder\src\gpu\ipc\service\command_buffer_stub.cc:154
#30 0x7ffeeee4669a in gpu::GpuChannel::ExecuteDeferredRequest C:\b\s\w\ir\cache\builder\src\gpu\ipc\service\gpu_channel.cc:936
#31 0x7ffeeee579ba 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 0x7ffeee4abf4d in gpu::SchedulerDfs::ExecuteSequence C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\scheduler_dfs.cc:743
#33 0x7ffeee4aa2a8 in gpu::SchedulerDfs::RunNextTask C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\scheduler_dfs.cc:668
#34 0x7ffeee4ad5d8 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 0x7ffee98ebf20 in base::TaskAnnotator::RunTaskImpl C:\b\s\w\ir\cache\builder\src\base\task\common\task_annotator.cc:203
#36 0x7ffeed2c8d6e 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 0x7ffeed2c7c79 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 0x7ffeed2fd27e in base::MessagePumpDefault::Run C:\b\s\w\ir\cache\builder\src\base\message_loop\message_pump_default.cc:40
#39 0x7ffeed2ca9bc 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 0x7ffee9936430 in base::RunLoop::Run C:\b\s\w\ir\cache\builder\src\base\run_loop.cc:134
#41 0x7ffeec77e15d in content::GpuMain C:\b\s\w\ir\cache\builder\src\content\gpu\gpu_main.cc:438
#42 0x7ffee81d8232 in content::RunOtherNamedProcessTypeMain C:\b\s\w\ir\cache\builder\src\content\app\content_main_runner_impl.cc:780
#43 0x7ffee81da7b3 in content::ContentMainRunnerImpl::Run C:\b\s\w\ir\cache\builder\src\content\app\content_main_runner_impl.cc:1156
#44 0x7ffee81d61cd in content::RunContentProcess C:\b\s\w\ir\cache\builder\src\content\app\content_main.cc:332
#45 0x7ffee81d6cbd in content::ContentMain C:\b\s\w\ir\cache\builder\src\content\app\content_main.cc:345
#46 0x7ffedb1b16b1 in ChromeMain C:\b\s\w\ir\cache\builder\src\chrome\app\chrome_main.cc:192
#47 0x7ff698ed43a5 in MainDllLoader::Launch C:\b\s\w\ir\cache\builder\src\chrome\app\main_dll_loader_win.cc:181
#48 0x7ff698ed1db2 in main C:\b\s\w\ir\cache\builder\src\chrome\app\chrome_exe_main_win.cc:350
#49 0x7ff6992b0143 in __scrt_common_main_seh D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
#50 0x7fff52017343 in BaseThreadInitThunk+0x13 (C:\Windows\System32\KERNEL32.DLL+0x180017343)
#51 0x7fff527426b0 in RtlUserThreadStart+0x20 (C:\Windows\SYSTEM32\ntdll.dll+0x1800526b0)
0x122d458c3318 is located 88 bytes inside of 160-byte region [0x122d458c32c0,0x122d458c3360)
freed by thread T0 here:
#0 0x7ff698faca0d in free C:\b\s\w\ir\cache\builder\src\third_party\llvm\compiler-rt\lib\asan\asan_malloc_win.cpp:82
#1 0x7ffed52efc5b in llvm::CallInst::~CallInst C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\include\llvm\IR\Instructions.h:1438
#2 0x7ffed64cd0d1 in llvm::iplist<llvm::Instruction,llvm::ilist_traits<llvm::Instruction> >::clear C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\include\llvm\ADT\ilist.h:563
#3 0x7ffed64ccb72 in llvm::BasicBlock::~BasicBlock C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\BasicBlock.cpp:91
#4 0x7ffed64d0a0f in llvm::BasicBlock::~BasicBlock C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\BasicBlock.cpp:70
#5 0x7ffed72323b1 in llvm::removeUnreachableBlocks C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\Transforms\Utils\Local.cpp:1306
#6 0x7ffed66f4d5d in simplifyFunctionCFG C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\Transforms\Scalar\SimplifyCFGPass.cpp:155
#7 0x7ffed5627f54 in llvm::FPPassManager::runOnFunction C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\LegacyPassManager.cpp:1587
#8 0x7ffed56289ee in llvm::FPPassManager::runOnModule C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\LegacyPassManager.cpp:1609
#9 0x7ffed56296a5 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 0x7ffed56329cc 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 0x7ffed50408c1 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 0x7ffed575e431 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 0x7ffed503b5b2 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 0x7ffed5048d83 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 0x7ffed4f26b73 in DxcCompiler::Compile C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\tools\clang\tools\dxcompiler\dxcompilerobj.cpp:984
#16 0x7ffedd881fb5 in dawn::native::d3d::CompileShader C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d\ShaderUtils.cpp:355
#17 0x7ffedd8e954e 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 0x7ffedd9911b4 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 0x7ffedd97a933 in dawn::native::d3d12::RenderPipeline::InitializeImpl C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d12\RenderPipelineD3D12.cpp:385
#20 0x7ffedd79bec0 in dawn::native::PipelineBase::Initialize C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\Pipeline.cpp:371
#21 0x7ffedd6ee081 in dawn::native::DeviceBase::CreateRenderPipeline C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\Device.cpp:2125
#22 0x7ffedd6eda67 in dawn::native::DeviceBase::APICreateRenderPipeline C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\Device.cpp:1456
#23 0x7ffeffb8c0bd in dawn::wire::server::Server::DoDeviceCreateRenderPipeline C:\b\s\w\ir\cache\builder\src\out\Release_x64\gen\third_party\dawn\src\dawn\wire\server\ServerDoers_autogen.cpp:314
#24 0x7ffeff592dd4 in dawn::wire::server::Server::HandleDeviceCreateRenderPipeline C:\b\s\w\ir\cache\builder\src\out\Release_x64\gen\third_party\dawn\src\dawn\wire\server\ServerHandlers_autogen.cpp:606
#25 0x7ffeff597c81 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:1682
#26 0x7ffefb14a692 in gpu::webgpu::`anonymous namespace'::DawnWireServer::HandleCommands C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\webgpu_decoder_impl.cc:992
#27 0x7ffefb14aae5 in gpu::webgpu::`anonymous namespace'::WebGPUDecoderImpl::HandleDawnCommands C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\webgpu_decoder_impl.cc:1888
previously allocated by thread T0 here:
#0 0x7ff698facb0d in malloc C:\b\s\w\ir\cache\builder\src\third_party\llvm\compiler-rt\lib\asan\asan_malloc_win.cpp:98
#1 0x7ffed7a42f5e in operator new D:\a\_work\1\s\src\vctools\crt\vcstartup\src\heap\new_scalar.cpp:36
#2 0x7ffed64cbc31 in llvm::User::operator new C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\User.cpp:96
#3 0x7ffed52ef950 in llvm::CallInst::Create C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\include\llvm\IR\Instructions.h:1401
#4 0x7ffed7436839 in `anonymous namespace'::TrivialDxilOperation C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\HLSL\HLOperationLower.cpp:462
#5 0x7ffed740eee9 in `anonymous namespace'::TrivialUnaryOperation C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\HLSL\HLOperationLower.cpp:546
#6 0x7ffed73db6ec in TranslateHLBuiltinOperation C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\HLSL\HLOperationLower.cpp:9244
#7 0x7ffed73de4bd in hlsl::TranslateBuiltinOperations C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\HLSL\HLOperationLower.cpp:9426
#8 0x7ffed6790863 in `anonymous namespace'::DxilGenerationPass::runOnModule C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\HLSL\DxilGenerationPass.cpp:253
#9 0x7ffed56296a5 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 0x7ffed56329cc 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 0x7ffed50408c1 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 0x7ffed575e431 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 0x7ffed503b5b2 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 0x7ffed5048d83 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 0x7ffed4f26b73 in DxcCompiler::Compile C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\tools\clang\tools\dxcompiler\dxcompilerobj.cpp:984
#16 0x7ffedd881fb5 in dawn::native::d3d::CompileShader C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d\ShaderUtils.cpp:355
#17 0x7ffedd8e954e 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 0x7ffedd9911b4 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 0x7ffedd97a933 in dawn::native::d3d12::RenderPipeline::InitializeImpl C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d12\RenderPipelineD3D12.cpp:385
#20 0x7ffedd79bec0 in dawn::native::PipelineBase::Initialize C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\Pipeline.cpp:371
#21 0x7ffedd6ee081 in dawn::native::DeviceBase::CreateRenderPipeline C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\Device.cpp:2125
#22 0x7ffedd6eda67 in dawn::native::DeviceBase::APICreateRenderPipeline C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\Device.cpp:1456
#23 0x7ffeffb8c0bd in dawn::wire::server::Server::DoDeviceCreateRenderPipeline C:\b\s\w\ir\cache\builder\src\out\Release_x64\gen\third_party\dawn\src\dawn\wire\server\ServerDoers_autogen.cpp:314
#24 0x7ffeff592dd4 in dawn::wire::server::Server::HandleDeviceCreateRenderPipeline C:\b\s\w\ir\cache\builder\src\out\Release_x64\gen\third_party\dawn\src\dawn\wire\server\ServerHandlers_autogen.cpp:606
#25 0x7ffeff597c81 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:1682
#26 0x7ffefb14a692 in gpu::webgpu::`anonymous namespace'::DawnWireServer::HandleCommands C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\webgpu_decoder_impl.cc:992
#27 0x7ffefb14aae5 in gpu::webgpu::`anonymous namespace'::WebGPUDecoderImpl::HandleDawnCommands C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\webgpu_decoder_impl.cc:1888
SUMMARY: AddressSanitizer: heap-use-after-free C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\Instructions.cpp:106 in llvm::PHINode::removeIncomingValue
Shadow bytes around the buggy address:
0x122d458c3080: fd fd fd fd fd fd fd fd fa fa fa fa fa fa f7 fa
0x122d458c3100: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x122d458c3180: fd fd fd fd fa fa fa fa fa fa f7 fa fd fd fd fd
0x122d458c3200: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x122d458c3280: fa fa fa fa fa fa f7 fa fd fd fd fd fd fd fd fd
=>0x122d458c3300: fd fd fd[fd]fd fd fd fd fd fd fd fd fa fa fa fa
0x122d458c3380: fa fa f7 fa fd fd fd fd fd fd fd fd fd fd fd fd
0x122d458c3400: fd fd fd fd fd fd fd fa fa fa fa fa fa fa f7 fa
0x122d458c3480: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x122d458c3500: fd fd fd fa fa fa fa fa fa fa f7 fa fd fd fd fd
0x122d458c3580: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 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
==7368==ADDITIONAL INFO
==7368==Note: Please include this section with the ASan report.
Task trace:
#0 0x7ffeee4aa44e in gpu::SchedulerDfs::RunNextTask C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\scheduler_dfs.cc:684
#1 0x7ffeee4a34a5 in gpu::SchedulerDfs::TryScheduleSequence C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\scheduler_dfs.cc:483
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.
==7368==END OF ADDITIONAL INFO
==7368==ABORTING
[9052:7868:0507/063938.469:ERROR:gpu_process_host.cc(1002)] GPU process exited unexpectedly: exit_code=1
[9052:7868:0507/063938.504: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 the HLSL compiler's control-flow simplification, where a basic block is freed while a phi node still references one of its incoming values.
Impact
A page containing the shader crashes the GPU process; the report does not claim code execution or any other impact.
What the attacker needed
Victim opens a crafted page; Windows with D3D12 backend
How it was found
- Open the supplied HTML file in Chromium on Windows with the D3D12 backend, which crashes the GPU process.
- Alternatively, compile the supplied WGSL shader to HLSL with tint.
- Compile the resulting HLSL with dxc targeting a pixel shader profile, which triggers 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, and Chrome first rewrites them into a format Windows understands. A bug in that rewriting step means a specially crafted shader makes the program read memory it has already released, which crashes the graphics part of the browser. The report shows only a crash, not a way to run attacker code.
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.