Race condition in GPU (CVE-2026-79071)
A time-of-check to time-of-use flaw in the GPU process's raster decoder allows a compromised renderer to shrink a shared memory size between a yield and resume, causing an integer underflow and out-of-bounds pointer. This lets the GPU process deserialise arbitrary heap memory as paint operations, potentially leaking cross-origin information.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 5 months
Project Fortify, an experimental security project, has identified the following potential security issue.
Overview: A TOCTOU vulnerability in RasterDecoderImpl::DoRasterCHROMIUM allows a compromised renderer to cause a size_t underflow and OOB pointer calculation when GPU rasterization yielding is enabled. This results in the GPU process deserializing and executing arbitrary heap memory as PaintOps, leading to an unbounded OOB read and potential cross-origin information leak.
Affected files:
gpu/command_buffer/service/raster_decoder.ccgpu/command_buffer/service/command_buffer_service.ccgpu/ipc/service/gpu_channel.cc
Estimated timestamp from git blame: 2025-11-28
Summary
When the kGpuYieldRasterization feature is enabled (e.g., via Finch), RasterDecoderImpl::DoRasterCHROMIUM can yield execution mid-command if the scheduler indicates it should pause rasterization. To support resuming the command later, it saves a byte offset into deferred_raster_paint_buffer_offset_. However, on resumption, the command arguments (including the shared memory size) are re-read from renderer-writable volatile shared memory. A compromised renderer can shrink the raster_shm_size between the yield and the resume, causing a size_t underflow and an out-of-bounds (OOB) pointer calculation.
Technical Details
This is a Time-of-Check to Time-of-Use (TOCTOU) vulnerability existing in the interaction between the command buffer's deferral logic and the handling of the RasterCHROMIUM command in gpu/command_buffer/service/raster_decoder.cc.
Step-by-step Exploitation Scenario (Suggested):
-
Initial Execution (Yield):
- A compromised renderer process prepares a large shared memory transfer buffer containing valid
cc::PaintOps. - The renderer issues a
RasterCHROMIUMcommand, setting the command argumentsraster_shm_idto the buffer andraster_shm_sizeto a large value (e.g., 65536 bytes) in the volatile command buffer. - The GPU process reads the
RasterCHROMIUMcommand.RasterDecoderImpl::HandleRasterCHROMIUMreads the arguments directly from the volatilecmd_dataprovided by the renderer. - The decoder calls
RasterDecoderImpl::DoRasterCHROMIUM(gpu/command_buffer/service/raster_decoder.cc:3067). DoRasterCHROMIUMmaps the transfer buffer usingGetSharedMemoryAs<char*>, validating that the 65536 size fits within the transfer buffer. The pointer is stored inpaint_buffer_memory.paint_buffer_sizeis initialized to the requestedraster_shm_size(65536).- The decoder begins processing paint operations in a
while (paint_buffer_size > 0)loop. - If
client()->ShouldYield()returns true (e.g., after processing 64000 bytes), the decoder saves the current offset (raster_shm_size - paint_buffer_size, which is 64000) intodeferred_raster_paint_buffer_offset_(gpu/command_buffer/service/raster_decoder.cc:3047) and returnserror::kDeferCommandUntilLater(gpu/command_buffer/service/raster_decoder.cc:3049).
- A compromised renderer process prepares a large shared memory transfer buffer containing valid
-
The Race Window:
- Because the command was deferred, the command buffer's
process_pospointer is not advanced (gpu/command_buffer/service/raster_decoder.cc:1545). TheRasterCHROMIUMcommand remains in the command buffer to be re-executed on the next pass. - The GPU process yields back to the message loop.
- The compromised renderer observes the stall and modifies the
raster_shm_sizefield in the volatile command buffer to a much smaller value (e.g., 16). - The attacker also shrinks the underlying transfer buffer or reallocates it to a smaller size (e.g., 32 bytes).
- Because the command was deferred, the command buffer's
-
Resume (The Vulnerability):
- When the command is resumed,
HandleRasterCHROMIUMis called again and re-reads the command arguments from the volatile shared memory. Crucially, it now reads the new, maliciously smallraster_shm_size(16). HandleRasterCHROMIUMcallsDoRasterCHROMIUMwith the new, small size.DoRasterCHROMIUMcallsGetSharedMemoryAs<char*>to validate the new size (16 bytes) against the smaller transfer buffer (32 bytes). This check passes.paint_buffer_sizeis initialized to the new, smallerraster_shm_size(16).- The decoder checks
deferred_raster_paint_buffer_offset_.has_value(). Since it was set during the yield, this is true. - Underflow: The decoder subtracts the saved offset (64000) from the new, small
paint_buffer_size(16):paint_buffer_size -= *deferred_raster_paint_buffer_offset_;(gpu/command_buffer/service/raster_decoder.cc:2997). Becausepaint_buffer_sizeis an unsignedsize_t, this results in an integer underflow, producing a massive positive value (approximately 2^64). - OOB Pointer: The decoder advances the pointer by the offset:
paint_buffer_memory += *deferred_raster_paint_buffer_offset_;(gpu/command_buffer/service/raster_decoder.cc:2998). Because the new transfer buffer is small, this pointer is pushed far out-of-bounds, landing deep into the GPU process heap.
- When the command is resumed,
-
Exploitation (OOB Read):
- The decoder enters the
while (paint_buffer_size > 0)loop. - The OOB pointer and massive
paint_buffer_sizeare passed tocc::PaintOp::Deserialize. - The GPU process begins interpreting arbitrary heap memory as serialized
PaintOps. Sincepaint_buffer_sizeis effectively unbounded, it will keep reading until it crashes or successfully deserializes ops. - By controlling the GPU process heap layout, an attacker can position a fake
PaintOpheader and payload at the OOB location. For example, a fakeDrawImageOpcould reference a validgpu::Mailboxcorresponding to a cross-originSharedImage. - The deserializer successfully parses the fake
PaintOpand returns it. - The decoder calls
deserialized_op->Raster(raster_canvas_, playback_params), causing the cross-origin image to be drawn to the attacker-controlledraster_canvas_. - The renderer can execute a
ReadPixelscommand to read back the canvas's contents, achieving a cross-origin information leak and bypassing the renderer sandbox.
- The decoder enters the
Impact
This is a high-severity (S1) vulnerability in the GPU process. While kGpuYieldRasterization is an active experiment (e.g., via Finch), when enabled, a compromised renderer can leverage this TOCTOU bug to escape the renderer sandbox and leak sensitive cross-origin information from the GPU process.
Suggested Fix
In RasterDecoderImpl::DoRasterCHROMIUM, validate that *deferred_raster_paint_buffer_offset_ <= raster_shm_size before applying the offset upon resumption. If the offset is greater than the newly read raster_shm_size, it indicates a hostile modification of the command buffer arguments between the yield and the resume, and the command should be aborted with an error (e.g., error::kInvalidArguments).
Evaluated with Chrome root at commit: a3f5fcb392f2902650ca2b71820e7e418787e18b
Results so far have been promising, but there can be wrong deductions. If this proves to be a false positive, please close as WAI; data from false positives will be used to improve accuracy over time. Please feel free to reach out to me if you have concerns or feedback.
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
The GPU process re-reads command arguments from renderer-writable shared memory after a yield without re-validating that the saved offset is within the new size, leading to an unsigned integer underflow.
Impact
When the kGpuYieldRasterization feature is enabled, a compromised renderer could escape the sandbox and leak cross-origin information from the GPU process.
What the attacker needed
Compromised renderer; kGpuYieldRasterization feature enabled
The fix
The fix should validate that the saved offset is not greater than the newly read shared memory size before applying it, aborting the command if so.
How it was found
- A compromised renderer prepares a large shared memory buffer with valid paint operations and issues a RasterCHROMIUM command with a large size.
- The GPU process starts processing the command and yields after some bytes, saving the current offset.
- The renderer observes the yield and shrinks the raster_shm_size in the command buffer and the underlying transfer buffer.
- On resume, the GPU process re-reads the smaller size, subtracts the saved offset causing an underflow, and advances the pointer out-of-bounds.
- The GPU process deserialises arbitrary heap memory as paint operations, potentially drawing a cross-origin image to a canvas.
- The renderer reads back the canvas contents via ReadPixels, leaking cross-origin information.
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.
A compromised renderer (a part of the browser that draws web pages) can trick the GPU process (which handles graphics) into reading memory outside a buffer. By changing a size value after the GPU process has already checked it, the attacker makes the GPU process read far beyond the intended buffer, potentially exposing data from other websites.
What is Race condition?
Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.