Use after free in Dawn (CVE-2024-5832)
A WebGPU shader written in WGSL is translated by Chromium's Dawn layer into HLSL and compiled by the bundled dxcompiler, where a use-after-free occurs in the loop-deletion and CFG-simplification passes. Opening a crafted HTML page on Windows with the D3D12 backend 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.6478.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 cabf62259d57b046b38d305cceac1d84893d3329) 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 01007bcd7f95fc32cbdf33ec8bcd9de4906926a5):
./dxc-3.7 -T ps_6_2 -HV 2018 standalone.hlsl. This should trigger an ASAN violation. The command line arguments-HV 2018is necessary to trigger the bug; dawn is adding it under Windows.
Attached:
Nothing yet, I'm getting upload errors but will reply in a comment.
[5188:8084:0513/113003.906:WARNING:chrome_main_delegate.cc(742)] This is Chrome version 126.0.6478.0 (not a warning)
[5188:7744:0513/113004.266:WARNING:dns_config_service_win.cc(605)] Failed to read DnsConfig.
[5188:5536:0513/113004.328:ERROR:sandbox_win.cc(913)] Sandbox cannot access executable. Check filesystem permissions are valid. See https://bit.ly/31yqMJR.: Access is denied. (0x5)
[5188:8084:0513/113004.500:WARNING:account_consistency_mode_manager.cc(77)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured.
[5188:8084:0513/113004.750:WARNING:browser_management_service.cc(128)] EnterpriseLogoUrl fetch failed with error code -1 and MIME type
[5188:8084:0513/113006.515:ERROR:network_service_instance_impl.cc(600)] Network service crashed, restarting service.
[5188:8084:0513/113006.593:WARNING:external_registry_loader_win.cc(232)] Error observing HKLM: 5
[5188:5468:0513/113009.307:WARNING:dns_config_service_win.cc(605)] Failed to read DnsConfig.
[2140:3808:0513/113009.902:WARNING:dns_config_service_win.cc(605)] Failed to read DnsConfig.
[2140:7596:0513/113018.845:WARNING:dns_config_service_win.cc(605)] Failed to read DnsConfig.
[5188:5700:0513/113020.212:WARNING:dns_config_service_win.cc(605)] Failed to read DnsConfig.
[2140:3808:0513/113028.863:WARNING:dns_config_service_win.cc(605)] Failed to read DnsConfig.
[5188:5700:0513/113040.220:WARNING:dns_config_service_win.cc(605)] Failed to read DnsConfig.
[5188:8084:0513/113048.339:INFO:CONSOLE(20)] "[object GPUDevice]", source: file://vboxsvr/shared/index_FoldTwoEntryPHINode.html (20)
[5188:8084:0513/113048.434:INFO:CONSOLE(109)] "[object GPURenderPipeline]", source: file://vboxsvr/shared/index_FoldTwoEntryPHINode.html (109)
[2140:7596:0513/113048.885:WARNING:dns_config_service_win.cc(605)] Failed to read DnsConfig.
=================================================================
==4316==ERROR: AddressSanitizer: heap-use-after-free on address 0x12be01fb4668 at pc 0x7ffe2e3adb9e bp 0x00c4f91fbdb0 sp 0x00c4f91fbdf8
READ of size 8 at 0x12be01fb4668 thread T0
==4316==WARNING: Failed to use and restart external symbolizer!
==4316==*** WARNING: Failed to initialize DbgHelp! ***
==4316==*** Most likely this means that the app is already ***
==4316==*** using DbgHelp, possibly with incompatible flags. ***
==4316==*** Due to technical reasons, symbolization might crash ***
==4316==*** or produce wrong results. ***
#0 0x7ffe2e3adb9d in llvm::BasicBlock::getTerminator C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\BasicBlock.cpp:131
#1 0x7ffe2f1a96da in llvm::GetIfCondition C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\Transforms\Utils\BasicBlockUtils.cpp:810
#2 0x7ffe2f1b1942 in llvm::SimplifyCFG C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\Transforms\Utils\SimplifyCFG.cpp:4740
#3 0x7ffe2e5d5d4f in simplifyFunctionCFG C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\Transforms\Scalar\SimplifyCFGPass.cpp:157
#4 0x7ffe2d507f54 in llvm::FPPassManager::runOnFunction C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\LegacyPassManager.cpp:1587
#5 0x7ffe2d5070e5 in llvm::legacy::FunctionPassManagerImpl::run C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\LegacyPassManager.cpp:1528
#6 0x7ffe2d506d6a in llvm::legacy::FunctionPassManager::run C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\LegacyPassManager.cpp:1452
#7 0x7ffe2e687217 in `anonymous namespace'::DxilLoopDeletion::runOnFunction C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\HLSL\DxilLoopDeletion.cpp:70
#8 0x7ffe2d507f54 in llvm::FPPassManager::runOnFunction C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\LegacyPassManager.cpp:1587
#9 0x7ffe2d5089ee in llvm::FPPassManager::runOnModule C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\LegacyPassManager.cpp:1609
#10 0x7ffe2d5096a5 in llvm::legacy::PassManagerImpl::run C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\LegacyPassManager.cpp:1771
#11 0x7ffe2d5129cc in clang::EmitBackendOutput C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\tools\clang\lib\CodeGen\BackendUtil.cpp:779
#12 0x7ffe2cf208c1 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
#13 0x7ffe2d63e431 in clang::ParseAST C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\tools\clang\lib\Parse\ParseAST.cpp:164
#14 0x7ffe2cf1b5b2 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
#15 0x7ffe2cf28d83 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
#16 0x7ffe2ce06b73 in DxcCompiler::Compile C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\tools\clang\tools\dxcompiler\dxcompilerobj.cpp:984
#17 0x7ffe35b65b79 in dawn::native::d3d::CompileShader C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d\ShaderUtils.cpp:355
#18 0x7ffe35bccc9e 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
#19 0x7ffe35c72dc4 in dawn::native::d3d12::ShaderModule::Compile C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d12\ShaderModuleD3D12.cpp:378
#20 0x7ffe35c5c543 in dawn::native::d3d12::RenderPipeline::InitializeImpl C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d12\RenderPipelineD3D12.cpp:385
#21 0x7ffe35a80330 in dawn::native::PipelineBase::Initialize C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\Pipeline.cpp:371
#22 0x7ffe359d02e1 in dawn::native::DeviceBase::CreateRenderPipeline C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\Device.cpp:2126
#23 0x7ffe359cfcc7 in dawn::native::DeviceBase::APICreateRenderPipeline C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\Device.cpp:1456
#24 0x7ffe57f9774d 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
#25 0x7ffe5799e3c4 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
#26 0x7ffe579a32a1 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
#27 0x7ffe534f5f72 in gpu::webgpu::`anonymous namespace'::DawnWireServer::HandleCommands C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\webgpu_decoder_impl.cc:992
#28 0x7ffe534f63c5 in gpu::webgpu::`anonymous namespace'::WebGPUDecoderImpl::HandleDawnCommands C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\webgpu_decoder_impl.cc:1887
#29 0x7ffe534ea761 in gpu::webgpu::`anonymous namespace'::WebGPUDecoderImpl::DoCommands C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\webgpu_decoder_impl.cc:1832
#30 0x7ffe471957f3 in gpu::CommandBufferService::Flush C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\command_buffer_service.cc:232
#31 0x7ffe43d2058c in gpu::CommandBufferStub::OnAsyncFlush C:\b\s\w\ir\cache\builder\src\gpu\ipc\service\command_buffer_stub.cc:506
#32 0x7ffe43d1f033 in gpu::CommandBufferStub::ExecuteDeferredRequest C:\b\s\w\ir\cache\builder\src\gpu\ipc\service\command_buffer_stub.cc:154
#33 0x7ffe471b369a in gpu::GpuChannel::ExecuteDeferredRequest C:\b\s\w\ir\cache\builder\src\gpu\ipc\service\gpu_channel.cc:930
#34 0x7ffe471c477a in base::internal::Invoker<base::internal::FunctorTraits<void (gpu::GpuChannel::*&&)(mojo::StructPtr<gpu::mojom::DeferredRequestParams>, unsigned long long),base::WeakPtr<gpu::GpuChannel> &&,mojo::StructPtr<gpu::mojom::DeferredRequestParams> &&,unsigned long long &&>,base::internal::BindState<1,1,0,void (gpu::GpuChannel::*)(mojo::StructPtr<gpu::mojom::DeferredRequestParams>, unsigned long long),base::WeakPtr<gpu::GpuChannel>,mojo::StructPtr<gpu::mojom::DeferredRequestParams>,unsigned long long>,void ()>::RunImpl<void (gpu::GpuChannel::*)(mojo::StructPtr<gpu::mojom::DeferredRequestParams>, unsigned long long),std::__Cr::tuple<base::WeakPtr<gpu::GpuChannel>,mojo::StructPtr<gpu::mojom::DeferredRequestParams>,unsigned long long>,0,1,2> C:\b\s\w\ir\cache\builder\src\base\functional\bind_internal.h:1067
#35 0x7ffe4680e16d in gpu::SchedulerDfs::ExecuteSequence C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\scheduler_dfs.cc:743
#36 0x7ffe4680c4c8 in gpu::SchedulerDfs::RunNextTask C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\scheduler_dfs.cc:668
#37 0x7ffe4680f7f8 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
#38 0x7ffe41c317a0 in base::TaskAnnotator::RunTaskImpl C:\b\s\w\ir\cache\builder\src\base\task\common\task_annotator.cc:203
#39 0x7ffe456323fe 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
#40 0x7ffe45631309 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
#41 0x7ffe4566760e in base::MessagePumpDefault::Run C:\b\s\w\ir\cache\builder\src\base\message_loop\message_pump_default.cc:40
#42 0x7ffe4563404c 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
#43 0x7ffe41c7bc50 in base::RunLoop::Run C:\b\s\w\ir\cache\builder\src\base\run_loop.cc:134
#44 0x7ffe44ae02cd in content::GpuMain C:\b\s\w\ir\cache\builder\src\content\gpu\gpu_main.cc:438
#45 0x7ffe4051af62 in content::RunOtherNamedProcessTypeMain C:\b\s\w\ir\cache\builder\src\content\app\content_main_runner_impl.cc:780
#46 0x7ffe4051d4e3 in content::ContentMainRunnerImpl::Run C:\b\s\w\ir\cache\builder\src\content\app\content_main_runner_impl.cc:1156
#47 0x7ffe40518efd in content::RunContentProcess C:\b\s\w\ir\cache\builder\src\content\app\content_main.cc:332
#48 0x7ffe405199ed in content::ContentMain C:\b\s\w\ir\cache\builder\src\content\app\content_main.cc:345
#49 0x7ffe33491601 in ChromeMain C:\b\s\w\ir\cache\builder\src\chrome\app\chrome_main.cc:192
#50 0x7ff6856f43a5 in MainDllLoader::Launch C:\b\s\w\ir\cache\builder\src\chrome\app\main_dll_loader_win.cc:181
#51 0x7ff6856f1db2 in main C:\b\s\w\ir\cache\builder\src\chrome\app\chrome_exe_main_win.cc:350
#52 0x7ff685ad0583 in __scrt_common_main_seh D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
#53 0x7ffea8a27343 in BaseThreadInitThunk+0x13 (C:\Windows\System32\KERNEL32.DLL+0x180017343)
#54 0x7ffea9a626b0 in RtlUserThreadStart+0x20 (C:\Windows\SYSTEM32\ntdll.dll+0x1800526b0)
0x12be01fb4668 is located 72 bytes inside of 88-byte region [0x12be01fb4620,0x12be01fb4678)
freed by thread T0 here:
#0 0x7ff6857cca0d in free C:\b\s\w\ir\cache\builder\src\third_party\llvm\compiler-rt\lib\asan\asan_malloc_win.cpp:82
#1 0x7ffe2e3b0c2b in llvm::BasicBlock::~BasicBlock C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\BasicBlock.cpp:70
#2 0x7ffe2e3ad718 in llvm::BasicBlock::eraseFromParent C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\BasicBlock.cpp:104
#3 0x7ffe2e7cd945 in `anonymous namespace'::LoopDeletion::runOnLoop C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\Transforms\Scalar\LoopDeletion.cpp:237
#4 0x7ffe2f345efb in llvm::LPPassManager::runOnFunction C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\Analysis\LoopPass.cpp:251
#5 0x7ffe2d507f54 in llvm::FPPassManager::runOnFunction C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\LegacyPassManager.cpp:1587
#6 0x7ffe2d5070e5 in llvm::legacy::FunctionPassManagerImpl::run C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\LegacyPassManager.cpp:1528
#7 0x7ffe2d506d6a in llvm::legacy::FunctionPassManager::run C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\LegacyPassManager.cpp:1452
#8 0x7ffe2e6871ff in `anonymous namespace'::DxilLoopDeletion::runOnFunction C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\HLSL\DxilLoopDeletion.cpp:67
#9 0x7ffe2d507f54 in llvm::FPPassManager::runOnFunction C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\LegacyPassManager.cpp:1587
#10 0x7ffe2d5089ee in llvm::FPPassManager::runOnModule C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\LegacyPassManager.cpp:1609
#11 0x7ffe2d5096a5 in llvm::legacy::PassManagerImpl::run C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\LegacyPassManager.cpp:1771
#12 0x7ffe2d5129cc in clang::EmitBackendOutput C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\tools\clang\lib\CodeGen\BackendUtil.cpp:779
#13 0x7ffe2cf208c1 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
#14 0x7ffe2d63e431 in clang::ParseAST C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\tools\clang\lib\Parse\ParseAST.cpp:164
#15 0x7ffe2cf1b5b2 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
#16 0x7ffe2cf28d83 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
#17 0x7ffe2ce06b73 in DxcCompiler::Compile C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\tools\clang\tools\dxcompiler\dxcompilerobj.cpp:984
#18 0x7ffe35b65b79 in dawn::native::d3d::CompileShader C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d\ShaderUtils.cpp:355
#19 0x7ffe35bccc9e 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
#20 0x7ffe35c72dc4 in dawn::native::d3d12::ShaderModule::Compile C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d12\ShaderModuleD3D12.cpp:378
#21 0x7ffe35c5c543 in dawn::native::d3d12::RenderPipeline::InitializeImpl C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d12\RenderPipelineD3D12.cpp:385
#22 0x7ffe35a80330 in dawn::native::PipelineBase::Initialize C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\Pipeline.cpp:371
#23 0x7ffe359d02e1 in dawn::native::DeviceBase::CreateRenderPipeline C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\Device.cpp:2126
#24 0x7ffe359cfcc7 in dawn::native::DeviceBase::APICreateRenderPipeline C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\Device.cpp:1456
#25 0x7ffe57f9774d 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
#26 0x7ffe5799e3c4 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
#27 0x7ffe579a32a1 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
previously allocated by thread T0 here:
#0 0x7ff6857ccb0d in malloc C:\b\s\w\ir\cache\builder\src\third_party\llvm\compiler-rt\lib\asan\asan_malloc_win.cpp:98
#1 0x7ffe2f92371e in operator new D:\a\_work\1\s\src\vctools\crt\vcstartup\src\heap\new_scalar.cpp:36
#2 0x7ffe2e60107c in `anonymous namespace'::PruningFunctionCloner::CloneBlock C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\Transforms\Utils\CloneFunction.cpp:307
#3 0x7ffe2e5fdd76 in llvm::CloneAndPruneIntoFromInst C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\Transforms\Utils\CloneFunction.cpp:511
#4 0x7ffe2e603635 in llvm::CloneAndPruneFunctionInto C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\Transforms\Utils\CloneFunction.cpp:720
#5 0x7ffe2f86cd24 in llvm::InlineFunction C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\Transforms\Utils\InlineFunction.cpp:1046
#6 0x7ffe2f16746b in llvm::Inliner::runOnSCC C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\Transforms\IPO\Inliner.cpp:574
#7 0x7ffe2f16d9ef in `anonymous namespace'::CGPassManager::runOnModule C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\Analysis\IPA\CallGraphSCCPass.cpp:491
#8 0x7ffe2d5096a5 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 0x7ffe2d5129cc 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 0x7ffe2cf208c1 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 0x7ffe2d63e431 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 0x7ffe2cf1b5b2 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 0x7ffe2cf28d83 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 0x7ffe2ce06b73 in DxcCompiler::Compile C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\tools\clang\tools\dxcompiler\dxcompilerobj.cpp:984
#15 0x7ffe35b65b79 in dawn::native::d3d::CompileShader C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d\ShaderUtils.cpp:355
#16 0x7ffe35bccc9e 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 0x7ffe35c72dc4 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 0x7ffe35c5c543 in dawn::native::d3d12::RenderPipeline::InitializeImpl C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\d3d12\RenderPipelineD3D12.cpp:385
#19 0x7ffe35a80330 in dawn::native::PipelineBase::Initialize C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\Pipeline.cpp:371
#20 0x7ffe359d02e1 in dawn::native::DeviceBase::CreateRenderPipeline C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\Device.cpp:2126
#21 0x7ffe359cfcc7 in dawn::native::DeviceBase::APICreateRenderPipeline C:\b\s\w\ir\cache\builder\src\third_party\dawn\src\dawn\native\Device.cpp:1456
#22 0x7ffe57f9774d 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
#23 0x7ffe5799e3c4 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
#24 0x7ffe579a32a1 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
#25 0x7ffe534f5f72 in gpu::webgpu::`anonymous namespace'::DawnWireServer::HandleCommands C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\webgpu_decoder_impl.cc:992
#26 0x7ffe534f63c5 in gpu::webgpu::`anonymous namespace'::WebGPUDecoderImpl::HandleDawnCommands C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\webgpu_decoder_impl.cc:1887
#27 0x7ffe534ea761 in gpu::webgpu::`anonymous namespace'::WebGPUDecoderImpl::DoCommands C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\webgpu_decoder_impl.cc:1832
SUMMARY: AddressSanitizer: heap-use-after-free C:\b\s\w\ir\cache\builder\src\third_party\dawn\third_party\dxc\lib\IR\BasicBlock.cpp:131 in llvm::BasicBlock::getTerminator
Shadow bytes around the buggy address:
0x12be01fb4380: fa fa f7 fa fd fd fd fd fd fd fd fd fd fd fd fa
0x12be01fb4400: fa fa f7 fa fd fd fd fd fd fd fd fd fd fd fd fd
0x12be01fb4480: fa fa f7 fa fd fd fd fd fd fd fd fd fd fd fd fd
0x12be01fb4500: fa fa f7 fa fd fd fd fd fd fd fd fd fd fd fd fd
0x12be01fb4580: fa fa f7 fa fd fd fd fd fd fd fd fd fd fd fd fd
=>0x12be01fb4600: fa fa f7 fa fd fd fd fd fd fd fd fd fd[fd]fd fa
0x12be01fb4680: fa fa f7 fa fd fd fd fd fd fd fd fd fd fd fd fd
0x12be01fb4700: fa fa f7 fa fd fd fd fd fd fd fd fd fd fd fd fd
0x12be01fb4780: fa fa f7 fa fa fa fa fa fa fa fa fa fa fa fa fa
0x12be01fb4800: fa fa f7 fa fa fa fa fa fa fa fa fa fa fa fa fa
0x12be01fb4880: fa fa f7 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
==4316==ADDITIONAL INFO
==4316==Note: Please include this section with the ASan report.
Task trace:
#0 0x7ffe4680c66e in gpu::SchedulerDfs::RunNextTask C:\b\s\w\ir\cache\builder\src\gpu\command_buffer\service\scheduler_dfs.cc:684
#1 0x7ffe468056c5 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.
==4316==END OF ADDITIONAL INFO
==4316==ABORTING
[5188:8084:0513/113059.736:ERROR:gpu_process_host.cc(1002)] GPU process exited unexpectedly: exit_code=1
[5188:8084:0513/113059.750: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
Impact
A crafted web page could crash the GPU process on Windows with the D3D12 backend; the report does not claim code execution or data theft.
What the attacker needed
Windows with D3D12 backend; victim opens a crafted HTML page
How it was found
- Compile the standalone WGSL shader to HLSL with tint.
- Compile the resulting HLSL with dxc using the ps_6_2 target and HV 2018.
- Observe the AddressSanitizer use-after-free violation.
- Alternatively, open the attached HTML file in Chromium on Windows with the D3D12 backend to crash the GPU process.
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.
WebGPU lets a web page run small programs called shaders on the graphics card. Chrome first converts the shader into another language and hands it to a compiler library. A bug in that compiler frees a piece of memory and then reads it again, which crashes the graphics process; the report shows only a crash, not theft of data.
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.