Integer overflow in GPU (CVE-2026-121219)
The Ozone SharedImage backing factory ignored the renderer-supplied size when validating a request, so a compromised renderer could ask for enormous dimensions. Those dimensions could overflow stride and size maths in the graphics buffer allocator, producing an undersized physical buffer that is then registered and used with the inflated logical size, potentially causing out-of-bounds access in the driver.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 4 months
Project Fortify, an experimental security project, has identified the following potential security issue. If you're a feature owner CC-ed on this bug, please do your best to review these reports. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: OzoneImageBackingFactory fails to validate the size parameter for SharedImages, allowing a compromised renderer to request massive dimensions. This triggers integer overflows in gbm_bo_create, yielding an undersized physical buffer registered with inflated logical dimensions. Downstream Vulkan consumers use the inflated logical size, violating specification bounds and potentially causing driver-level out-of-bounds memory access.
Affected files:
gpu/command_buffer/service/shared_image/ozone_image_backing_factory.ccgpu/command_buffer/service/shared_image/ozone_image_backing.ccui/gfx/linux/gbm_wrapper.ccgpu/ipc/service/shared_image_stub.cc
Estimated timestamp from git blame: Unknown (Google3 checkout)
1. Summary of the Issue (Meant for Human Triage)
A potential security vulnerability exists in the Ozone SharedImage backing factory (OzoneImageBackingFactory). The OzoneImageBackingFactory::IsSupported() method ignores the renderer-provided size parameter during validation, and no upstream choke-points or Mojo traits enforce maximum validation limits (such as a standard [1, max_texture_size] limit) on this path.
Consequently, a compromised renderer process on Linux, ChromeOS, or Fuchsia can request a custom SharedImage with massive dimensions (up to INT_MAX). When these dimensions reach system-level memory allocation routines (like gbm_bo_create()), an integer wrap-around can occur during stride and size calculations within the driver implementation (e.g., minigbm). This leads to the successful allocation of an undersized physical buffer, while a trusted OzoneImageBacking is initialized and registered with the massive logical dimensions requested by the renderer.
When downstream consumers (such as Vulkan or GL) read this backing, they operate under the assumption that the physical buffer matches the inflated logical size. This memory desynchronization leads to driver specification violations (e.g., violating Vulkan's maxImageDimension2D) and potential out-of-bounds reads/writes or driver-level crashes.
2. Proof-of-Concept & Detailed Execution Flow
(Note: These are potential steps and execution paths based on static code analysis; our tooling has not executed a live proof-of-concept.)
Step-by-Step Execution Flow
1. Renderer-Supplied Entry Point and Deserialization
- A compromised renderer crafts a
gpu::mojom::GpuChannel::FlushDeferredRequestsmessage over theGpuChannelcontaining aDeferredSharedImageRequest::kCreateSharedImageinstruction. - The request specifies a malformed
SharedImageMetadatawhere thesizeis set to massive values (e.g.,{0x40000000, 0x40000000}) andusageisSHARED_IMAGE_USAGE_SCANOUT. - During Mojo deserialization,
StructTraits<gfx::mojom::SizeDataView, gfx::Size>::Read(ui/gfx/geometry/mojom/geometry_mojom_traits.h:137-143) only enforces thatwidthandheightare non-negative, accepting values up toINT_MAXwithout amax_texture_sizeceiling. - In
SharedImageStub::OnCreateSharedImage(gpu/ipc/service/shared_image_stub.cc:209-228), a nativegpu::SharedImageInfoobject is constructed directly from the deserialized metadata. No upper bounds validation is performed.
2. Factory Selection and Validation Bypass (Root Cause)
- The unchecked
si_infois passed toSharedImageFactory::CreateSharedImage(gpu/command_buffer/service/shared_image/shared_image_factory.cc:376-406). GetFactoryByUsageattemptsOzoneImageBackingFactory::IsSupported(gpu/command_buffer/service/shared_image/ozone_image_backing_factory.cc:237-330) to handle theSCANOUTrequest.OzoneImageBackingFactory::IsSupporteddeclaresconst gfx::Size& sizeas a parameter but completely ignores it in its body. It validates onlyusage,format, andgmb_type, returningtrue. (Sibling factories likeGLCommonImageBackingFactory::CanCreateTextureexplicitly clamp againstmax_texture_size_).
3. System Allocation and Integer Overflow
OzoneImageBackingFactory::CreateSharedImageInternaldelegates the system allocation by passing the unvalidatedsi_info.sizedirectly tosurface_factory->CreateNativePixmap(e.g.,WaylandSurfaceFactory::CreateNativePixmapinui/ozone/platform/wayland/gpu/wayland_surface_factory.cc:256-283).- The platform routing reaches
gbm_wrapper.cc'sCreateBuffer(ui/gfx/linux/gbm_wrapper.cc:312-332), which issues the C-library callgbm_bo_create(device_.get(), size.width(), size.height(), format, flags). - Inside implementations like
minigbm(third_party/minigbm/src/drv_helpers.c:242), stride is computed via a 32-bit unsigned multiplication:uint32_t stride = plane_width * layout->bytes_per_pixel[plane]. For a massive width (e.g.,0x40000000) and 4 bpp format, this computation integer-overflows to0or a very small value. - The total plane size is computed in
drv_size_from_format(third_party/minigbm/src/drv_helpers.c:260) asstride * plane_height, which similarly inherits the overflow and results in a severely undersized memory footprint. - Due to the undetected integer overflow, the driver allocates an undersized buffer (often page-aligned to e.g. 4096 bytes) and returns a valid, non-null
gbm_bopointer.
4. Backing Initialization Desync and Spec-Invalid Sink
- Back in
CreateSharedImageInternal, anOzoneImageBackingobject is instantiated using the undersizedNativePixmaphandle. - The
OzoneImageBackingconstructor forwards parameters throughClearTrackingSharedImageBackingto theSharedImageBackingbase constructor (gpu/command_buffer/service/shared_image/shared_image_backing.cc:80-100). The backing's logicalsize_is explicitly set tosi_info.size(the attacker's massive dimensions), failing to query theNativePixmapfor its physical allocation footprint. - The compromised renderer triggers consumption of the SharedImage, forcing a call to
ProduceSkiaGanesh(gpu/command_buffer/service/shared_image/ozone_image_backing.cc:310-380). ProduceSkiaGaneshcallsvulkan_implementation->CreateImageFromGpuMemoryHandle, passing the massive logicalsize().- Platform implementations forward this to
gpu::VulkanImage::CreateFromGpuMemoryBufferHandleand eventuallyVulkanImage::CreateVkImage(gpu/vulkan/vulkan_image.cc:148-186). - The massive logical
widthandheightare unconditionally assigned to theimage_create_info.extentstruct, bypassing backend validation checks, resulting in a direct Vulkan specification violation (VUID-VkImageCreateInfo-extent-02252) and driver-level out-of-bounds operations.
Suggested Fix
Add a size bounds check in OzoneImageBackingFactory::IsSupported() to ensure dimensions are within safe hardware limits (e.g., max_texture_size). Alternatively, implement a centralized maximum dimension bounds check on deserialized SharedImageInfo structs within SharedImageStub::OnCreateSharedImage.
3. Technical Verification Details (Automated Audit Logs)
Prior Critic Verdict Verbatim
The vulnerability report correctly identifies that
OzoneImageBackingFactory::IsSupported()fails to validate thesizeof the requestedSharedImage, ignoring the parameter entirely. Furthermore, there is no upstream choke-point in the Chromium IPC layers (e.g.,SharedImageStub,SharedImageFactory, or the mojom traits forgfx::Size) that enforces a[1, max_texture_size]limit for this path.As a result, a compromised renderer can request a
SharedImagewith dimensions up toINT_MAX. When these dimensions are passed tominigbmviagbm_bo_create(), integer overflow can occur during stride and size calculations (e.g.,width * bpporstride * height). By carefully choosing dimensions (e.g.,width = 0x10000001andheight = 4), the calculated size can wrap around to a small valid allocation size (like 16 bytes, whichminigbmaligns to 4096 bytes).The
minigbmlibrary will successfully allocate this undersized buffer and return a valid handle. TheOzoneImageBackingthen registers itself with the huge, renderer-suppliedsize_, causing a metadata desync. Downstream consumers, such asProduceSkiaGanesh(), will use this oversizedsize()in calls tovkCreateImage(), passing an extent that violates Vulkan'smaxImageDimension2D(VUID-VkImageCreateInfo-extent-02252) while binding it to the undersized memory buffer.Per the
security_faq.mdguidelines for GPU validating-layer gaps, a spec-invalid value reaching the driver is evaluated based on the process sandbox and the consequence. Since the GPU process is sandboxed on Ozone platforms (Linux, ChromeOS), the maximum severity for a Sandbox-to-Sandbox (Renderer to GPU) exploit is High (S1). However, because the concrete write consequence depends heavily on the specific driver version/vendor (e.g., whether the DRM ioctl or the Vulkan driver rejects the malformed dimensions, crashes safely, or writes out-of-bounds), the severity is correctly downgraded to Medium (S2). The probability of the vulnerability being real and accurate as described is 100%.
Evidence Ledger and Environmental Assumptions
- Ozone Availability: The factory registration for
OzoneImageBackingFactoryis compiled on Ozone platforms (#elif BUILDFLAG(IS_OZONE)inshared_image_factory.cc:316-324), which applies to Linux, ChromeOS, and Fuchsia. - Process Sandboxing: On Linux and ChromeOS, the GPU process runs within a sandbox (
[no-Android]). Thus, an A-RENDERER to GPU memory corruption is capped at a High (S1) sandbox escape. Downgraded to S2 per driver-dependent impact. - Missing Size Clamping: Verified in
shared_image_backing.cc:80-100thatSharedImageBacking::SharedImageBackingstrictly assignssize_(si_info.size)without size clamping. Verifiedgpu/command_buffer/service/shared_image/ozone_image_backing_factory.cc:237-330never readssize. - Driver Math Dependency: The outcome critically depends on the platform's
minigbmimplementation. If the driver fails to return a buffer when stride maths overflow (returningnullptr), it gracefully exits viaOnError(). If uint32 math overflows and returns a valid handle, it triggers the documented Vulkan sink desynchronization.
Evaluated with Chrome root at commit: b96d2ec58f4f5f92b540a723966b199d6e9951b4
Results so far have been promising, but there can be wrong deductions. Feel free to adjust as follows:
- If you are familiar with the severity guidelines, you may adjust the severity.
- If this is a false positive, and there's no work to be done, please close as WAI.
- If there is work to do here but not a vulnerability, please change the issue type to Task/Bug/FR.
Data from false positives will be used to improve accuracy over time. And please feel free to reach out to me directly if you have concerns or feedback on the project.
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 the factory's support check accepted the request without ever reading the size, and no earlier IPC layer enforced a maximum dimension, so unchecked values reached the buffer allocator.
Impact
A compromised renderer could potentially cause out-of-bounds reads or writes or driver crashes, though the concrete outcome depends on the specific driver and the GPU process sandbox limits it to a renderer-to-GPU issue.
What the attacker needed
Compromised renderer process; Ozone platform (Linux, ChromeOS, Fuchsia); driver maths overflows instead of rejecting
The fix
A size bounds check should be added in the factory's support check, or a central maximum dimension check on deserialised shared image info.
How it was found
- A compromised renderer sends a deferred shared-image creation request with very large width and height and scanout usage.
- The Mojo size traits accept the values because they only reject negatives.
- The shared image stub builds the info without an upper bound check.
- The Ozone factory's support check returns true without looking at the size.
- The size is passed to the buffer allocator, where stride and total size maths overflow and a small buffer is allocated.
- The backing is registered with the huge logical size and a Vulkan image is created with that extent over the small buffer.
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 web browser splits its work into processes, and the one drawing graphics (the renderer) is not fully trusted. Here the graphics code accepted a picture size from that untrusted process without checking it was reasonable, and the maths used to work out how much memory to reserve could wrap around to a tiny number. The result is a small buffer treated as if it were huge, which can make the graphics driver read or write outside it.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.