Out of bounds read in GPU (CVE-2026-8546)
The GPU process failed to validate IOSurface plane properties against the claimed SharedImageFormat, allowing a compromised renderer to supply an under-allocated plane. This could cause an out-of-bounds read in the GPU process, leaking memory into the encoded video bitstream and potentially defeating ASLR.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 45 days
Project Fortify, an experimental security project, has identified the following potential security issue.
Overview: On macOS, MappableBufferIOSurface::CreateFromHandleImpl fails to validate IOSurface plane properties against the claimed SharedImageFormat. A compromised renderer can provide an IOSurface with a maliciously under-allocated plane, leading to a massive out-of-bounds memory read in the GPU process during video encoding fallback paths. This leaks GPU process memory back to the renderer within the video bitstream, potentially defeating ASLR.
Affected files:
gpu/command_buffer/client/internal/mappable_buffer_io_surface.ccmedia/base/mac/video_frame_mac.mmgpu/command_buffer/client/client_shared_image.ccmedia/mojo/services/mojo_video_encode_accelerator_service.ccmedia/base/video_frame.cc
Estimated timestamp from git blame: 2026-01-12
Disclaimer
Note: The following attack steps are potential and based on static analysis. Our tooling agent does not currently have the ability to run code to provide a working proof-of-concept.
Vulnerability Details
In gpu/command_buffer/client/internal/mappable_buffer_io_surface.cc, the CreateFromHandleImpl function takes an IOSurface from an IPC handle and wraps it for use in the GPU process. While the function verifies that the global IOSurface width and height are at least as large as the requested size, it completely fails to validate the pixel format, the number of planes, or the dimensions of individual planes against the claimed viz::SharedImageFormat.
Because the claimed SharedImageFormat is later trusted to calculate memory span sizes when the surface is mapped, an attacker can intentionally under-allocate a specific plane (e.g., the UV plane of an NV12 image) while maintaining large global dimensions.
Potential Attack Path
An attacker with a compromised macOS renderer process could exploit this via the following steps:
- Create Malicious IOSurface: The renderer natively creates an
IOSurfacewith large global dimensions (e.g., 4096x4096), but specifies a customkIOSurfacePlaneInfoarray where Plane 1 (the UV plane) is drastically under-allocated (e.g., only 2 rows high instead of 2048). - Send via IPC: The renderer wraps this in an
ExportedSharedImageand sends it to the GPU process viamedia.mojom.VideoEncodeAccelerator::Encode(). It claims the format is NV12, the size is 4096x4096, and intentionally mismatchesvisible_rectfromcoded_sizeto force a cropping operation. - Validation Bypass: The GPU process receives the handle.
MappableBufferIOSurface::CreateFromHandleImplchecksIOSurfaceGetWidth/Height(which are 4096), accepts the handle, and ignores the maliciously small Plane 1. - Fallback Mapping: In
media/base/mac/video_frame_mac.mm, the mismatchingvisible_rectforcesWrapVideoFrameInCVPixelBufferto take a software mapping fallback path viaConvertToMemoryMappedFrame(). - OOB Span Calculation:
ClientSharedImage::ScopedMapping::GetMemoryForPlane(1)calculates the expected memory span for Plane 1 based on the claimed NV12 format. For a 4096x4096 image, it expects 2048 rows. It computesspan_lengthusing theIOSurfacestride multiplied by 2047 rows. - Information Leak: The resulting
base::spanextends wildly out of bounds of the actual 2-row allocation, encompassing ~8MB of adjacent GPU process memory. This span is wrapped in aCVPixelBufferand passed to VideoToolbox for hardware encoding. - ASLR Defeat: VideoToolbox encodes the out-of-bounds GPU heap memory into the H.264/HEVC bitstream. The bitstream is sent back to the renderer via the
BitstreamBufferReadycallback, allowing the attacker to decode it, observe leaked pointers/data, and defeat GPU process ASLR.
Suggested Fix
Update MappableBufferIOSurface::CreateFromHandleImpl to strictly validate the properties of the imported IOSurface. Specifically:
- Ensure
IOSurfaceGetPixelFormat(io_surface)matches the expected pixel format derived fromSharedImageFormat(similar to the checks performed inIOSurfaceImageBackingFactory::CreateSharedImageGMBs). - Verify that
IOSurfaceGetPlaneCount(io_surface)matchesformat.NumberOfPlanes(). - Iterate over the planes and ensure that
IOSurfaceGetWidthOfPlaneandIOSurfaceGetHeightOfPlanemeet or exceed the expected dimensions for each plane given the claimedSharedImageFormatandsize.
Evaluated with Chrome root at commit: a9cbf6e8b275fe4147435aa905f3b7f5a656f5f0
Results from 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. 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 GPU process trusted the claimed SharedImageFormat without validating the actual IOSurface plane count, pixel format, or per-plane dimensions.
Impact
A compromised renderer could read out-of-bounds GPU process memory, leaking pointers and data that may defeat ASLR; the report notes the attack steps are potential and based on static analysis, not a working proof-of-concept.
What the attacker needed
Compromised macOS renderer process
The fix
The fix should validate the IOSurface pixel format, plane count, and per-plane dimensions against the claimed SharedImageFormat and size.
How it was found
- Create an IOSurface with large global dimensions but an under-allocated UV plane.
- Send the IOSurface via IPC to the GPU process, claiming NV12 format and mismatching visible_rect from coded_size.
- The GPU process accepts the handle after checking only global width and height.
- The mismatching visible_rect forces a software mapping fallback.
- Memory span for the UV plane is calculated based on the claimed format, extending out of bounds.
- The out-of-bounds span is encoded by VideoToolbox and the bitstream is returned to the renderer.
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 renderer process (the part of the browser that displays web pages) can send a crafted image description to the GPU process (which handles graphics and video). The GPU process trusts the description without checking that the image's internal memory layout matches, so it reads beyond the allocated memory. This can leak sensitive memory contents back to the attacker.
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.