Skip to content
DoS Disclosed report Intermediate

SEGV in Mesa Driver on unknown address with incorrect RendererBundle BindGroup

Firefox's WebGPU implementation failed to validate that a RendererBundle's bind group index matched the shader's declared bind groups, allowing a bind group at index 2 to be used with a shader that only declared group 0. This caused a segmentation fault in the Mesa llvmpipe driver when rendering the invalid bundle.

Atte Kettunen Follow

Originally disclosed on Mozilla

  • Fixed in 51 days
  • Paid in 2 months
  • Disclosed after 51 days
Text
Created attachment 9527027
minimal-crash-final.html

Tested on:
-OS: Ubuntu 24.04
-Mesa: mesa-24.0.5-1ubuntu1 - This is version of mesa has debug symbols available. Also tested to reproduce on current newest for Ubuntu 24.04, Mesa 25.0.7.
-Firefox: fuzzfetch -a --fuzzing
'''  
  Version: 147.0a1
  BuildID=20251114094637
  SourceStamp=4e885473cb08ec97b42aa99ea83cc2485a463d31
'''

Reproducing file as an attachment.

Looks like Firefox is failing to validate bing group validity in RendererBundle.

Shader code only defined @group(0), but the RendererBundle is setting the bind group to 2.

On Chrome we get warning:
'''
minimal-crash-final.html:1 No bind group set at group index 0.
 - While encoding [RenderBundleEncoder (unlabeled)].DrawIndexed(6, 1, 0, 0, 0).
 - While calling [RenderBundleEncoder (unlabeled)].Finish([RenderBundleDescriptor]).

minimal-crash-final.html:1 [Invalid RenderBundle] is invalid.
 - While encoding [RenderPassEncoder (unlabeled)].ExecuteBundles(1, ...).
 - While finishing [CommandEncoder (unlabeled)].
'''

Asan-trace from mesa with debug symbols:
'''
==161924==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x7bff2708ce30 bp 0x7bfeb33fcaf0 sp 0x7bfeb33fc560 T145)
==161924==The signal is caused by a READ memory access.
==161924==Hint: this fault was caused by a dereference of a high value address (see register values below).  Disassemble the provided pc to learn which register was used.
    #0 0x7bff2708ce30  (<unknown module>)
    #1 0x7bfeafa87ba1 in shade_quads /usr/src/mesa-24.0.5-1ubuntu1/build/../src/gallium/drivers/llvmpipe/lp_rast_linear_fallback.c:111:4
    #2 0x7bfeafa87d5f in ?? /usr/src/mesa-24.0.5-1ubuntu1/build/../src/gallium/drivers/llvmpipe/lp_rast_linear_fallback.c:140:4
    #3 0x7bfeafa87d5f in lp_rast_linear_rect_fallback /usr/src/mesa-24.0.5-1ubuntu1/build/../src/gallium/drivers/llvmpipe/lp_rast_linear_fallback.c:202:7
    #4 0x7bfeafa87738 in lp_rast_linear_tile /usr/src/mesa-24.0.5-1ubuntu1/build/../src/gallium/drivers/llvmpipe/lp_rast_linear.c:118:7
    #5 0x7bfeafa87ab4 in lp_linear_rasterize_bin /usr/src/mesa-24.0.5-1ubuntu1/build/../src/gallium/drivers/llvmpipe/lp_rast_linear.c:251:10
    #6 0x7bfeafa86b9f in rasterize_bin /usr/src/mesa-24.0.5-1ubuntu1/build/../src/gallium/drivers/llvmpipe/lp_rast.c:1001:7
    #7 0x7bfeafa86b9f in rasterize_scene /usr/src/mesa-24.0.5-1ubuntu1/build/../src/gallium/drivers/llvmpipe/lp_rast.c:1067:13
    #8 0x7bfeafa86c96 in thread_function /usr/src/mesa-24.0.5-1ubuntu1/build/../src/gallium/drivers/llvmpipe/lp_rast.c:1202:7
    #9 0x7bfeaf94350b in ?? /usr/src/mesa-24.0.5-1ubuntu1/build/../src/c11/impl/threads_posix.c:67:29
    #10 0x5555556bfc56 in asan_thread_start(void*) _asan_rtl_:28

==161924==Register values:
rax = 0xffb561d8ffb561c8  rbx = 0x0000000000000000  rcx = 0x00000000000000ff  rdx = 0x00007bfeaff5ac40
rdi = 0x00007bff2708b164  rsi = 0x00007bfeaff2afd0  rbp = 0x00007bfeb33fcaf0  rsp = 0x00007bfeb33fc560
 r8 = 0x0000000000000001   r9 = 0x00007bff2708b154  r10 = 0x00007d2ff6cd5580  r11 = 0x00007bff2708b198
r12 = 0x0000000000000000  r13 = 0x00007f0ff6eb0930  r14 = 0x0000000000000000  r15 = 0x00007bff2708b194
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (<unknown module>)
Thread T145 created by T82 here:
    #0 0x5555556a7f01 in ___interceptor_pthread_create _asan_rtl_:3
    #1 0x7bfeaf943734 in ?? /usr/src/mesa-24.0.5-1ubuntu1/build/../src/c11/impl/threads_posix.c:278:9
    #2 0x7bfeaf91502a in ?? /usr/src/mesa-24.0.5-1ubuntu1/build/../src/util/u_thread.c:66:10
    #3 0x7bfeafa87426 in create_rast_threads /usr/src/mesa-24.0.5-1ubuntu1/build/../src/gallium/drivers/llvmpipe/lp_rast.c:1238:27
    #4 0x7bfeafa87426 in lp_rast_create /usr/src/mesa-24.0.5-1ubuntu1/build/../src/gallium/drivers/llvmpipe/lp_rast.c:1280:4
...
    #9 0x7bff1dd1b6fd in ?? ??:0
    #10 0x7bff1dd18600 in ?? ??:0
    #11 0x7bff1dd13af4 in ?? ??:0
    #12 0x7bff1dd240f2 in vkCreateDevice ??:0:0
    #13 0x7bffe3f78d40 in ash::instance::Instance::create_device::h459f9d1f4e71d6ca /builds/worker/checkouts/gecko/third_party/rust/ash/src/instance.rs:369:22
'''

WebGPU info:
'''
{
  "navigator.gpu.requestAdapter({\"forceFallbackAdapter\":true})": {
    "info": {
      "architecture": "",
      "description": "",
      "device": "",
      "isFallbackAdapter": true,
      "subgroupMaxSize": 128,
      "subgroupMinSize": 4,
      "vendor": "",
      "wgpuBackend": "Vulkan",
      "wgpuDevice": 0,
      "wgpuDeviceType": "Cpu",
      "wgpuDriver": "llvmpipe",
      "wgpuDriverInfo": "Mesa 24.0.5-1ubuntu1 (LLVM 17.0.6)",
      "wgpuName": "llvmpipe (LLVM 17.0.6, 256 bits)",
      "wgpuVendor": 65541
    },
    "features": [
      "bgra8unorm-storage",
      "core-features-and-limits",
      "depth-clip-control",
      "depth32float-stencil8",
      "float32-filterable",
      "indirect-first-instance",
      "rg11b10ufloat-renderable",
      "shader-f16",
      "texture-compression-bc",
      "texture-compression-bc-sliced-3d",
      "timestamp-query"
    ],
    "limits": {
      "maxBindGroups": 8,
      "maxBindGroupsPlusVertexBuffers": 24,
      "maxBindingsPerBindGroup": 1000,
      "maxBufferSize": 1073741824,
      "maxColorAttachmentBytesPerSample": 32,
      "maxColorAttachments": 8,
      "maxComputeInvocationsPerWorkgroup": 1024,
      "maxComputeWorkgroupSizeX": 1024,
      "maxComputeWorkgroupSizeY": 1024,
      "maxComputeWorkgroupSizeZ": 1024,
      "maxComputeWorkgroupStorageSize": 32768,
      "maxComputeWorkgroupsPerDimension": 65535,
      "maxDynamicStorageBuffersPerPipelineLayout": 1000000,
      "maxDynamicUniformBuffersPerPipelineLayout": 1000000,
      "maxInterStageShaderVariables": 16,
      "maxSampledTexturesPerShaderStage": 64,
      "maxSamplersPerShaderStage": 64,
      "maxStorageBufferBindingSize": 134217728,
      "maxStorageBuffersPerShaderStage": 64,
      "maxStorageTexturesPerShaderStage": 64,
      "maxTextureArrayLayers": 2048,
      "maxTextureDimension1D": 16384,
      "maxTextureDimension2D": 16384,
      "maxTextureDimension3D": 4096,
      "maxUniformBufferBindingSize": 65536,
      "maxUniformBuffersPerShaderStage": 64,
      "maxVertexAttributes": 32,
      "maxVertexBufferArrayStride": 2048,
      "maxVertexBuffers": 16,
      "minStorageBufferOffsetAlignment": 32,
      "minUniformBufferOffsetAlignment": 32
    }
  }
}
'''

The original report as published on Mozilla's Bugzilla, by Atte Kettunen. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

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 Firefox did not validate that the bind group index used in a RendererBundle matched the bind groups declared by the shader, passing an invalid configuration to the driver.

Impact

A web page could crash the browser's GPU process or the graphics driver, causing a denial of service; the report does not claim memory corruption or code execution.

What the attacker needed

WebGPU enabled in Firefox; Mesa llvmpipe software renderer

How it was found

  1. Open the attached minimal-crash-final.html in Firefox with WebGPU enabled.
  2. The page creates a shader that only declares bind group 0.
  3. The page creates a RendererBundle that sets a bind group at index 2.
  4. Executing the bundle causes a segmentation fault in the Mesa llvmpipe driver.

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 is a browser API for drawing graphics using the GPU. A shader program declares which groups of resources (like textures or buffers) it expects, and the browser should reject any mismatch. Here Firefox did not reject a mismatch, so the graphics driver crashed.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More by Atte Kettunen

View all

62 more disclosed reports, best first.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.