Out of bounds write in GPU (CVE-2026-10892)
A mismatch between the GLES2 command validator and its size calculation logic allows certain sized internal formats to pass validation with a calculated buffer size of zero. An attacker who has already compromised a renderer could trigger an out-of-bounds write in the GPU process by issuing a ReadPixels command with an affected format.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 20 days
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 without the Chrome Security team. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: A desync between the GLES2 command validator and its size calculation logic allows certain sized internal formats to pass validation with a calculated buffer size of zero. This results in an out-of-bounds write when the native GPU driver executes glReadPixels into a shared memory buffer that was only validated for zero bytes.
Affected files:
gpu/command_buffer/service/gles2_cmd_decoder.ccgpu/command_buffer/common/gles2_cmd_utils.ccgpu/command_buffer/service/feature_info.cc
Estimated timestamp from git blame: 2020-01-30
Summary
A potential out-of-bounds (OOB) write vulnerability exists in the GLES2 validating command decoder's handling of glReadPixels. The issue arises from a discrepancy between the set of formats permitted by the command validator and the formats supported by the size calculation utility. When certain sized internal formats (e.g., GL_R16_EXT) are used, the decoder incorrectly validates a zero-byte destination buffer, while the underlying native driver performs a full-sized write, leading to memory corruption in the GPU process.
Root Cause Analysis
The vulnerability is caused by a logic desync between gpu::gles2::FeatureInfo and gpu::GLES2Util.
In gpu/command_buffer/service/feature_info.cc, if the GL_EXT_texture_norm16 extension is supported, several sized internal formats are added to the read_pixel_format validator (lines 1412-1414):
validators_.read_pixel_format.AddValue(GL_R16_EXT);
validators_.read_pixel_format.AddValue(GL_RG16_EXT);
validators_.read_pixel_format.AddValue(GL_RGBA16_EXT);
However, GLES2Util::ElementsPerGroup in gpu/command_buffer/common/gles2_cmd_utils.cc (lines 553-596) does not recognize these sized formats. In the switch (format) block, these enums are missing, causing the function to hit the default case and return 0.
Consequently:
ComputeImageGroupSizereturns0(bytes_per_element * 0).ComputeImageDataSizesES3(called by the decoder) calculates apixels_sizeof0for these formats.- In
GLES2DecoderImpl::HandleReadPixels(gpu/command_buffer/service/gles2_cmd_decoder.cc), the call toGetSharedMemoryAs<uint8_t*>(pixels_shm_id, pixels_shm_offset, pixels_size)uses this zero size. - The shared memory validation in
gpu/command_buffer/common/buffer.cc(line 101) passes for any valid offset because the requested size is 0.
Potential Vulnerability Path
The following steps outline how an attacker might potentially trigger this issue (note: these steps are theoretical as our tooling cannot currently execute code):
- A compromised renderer process establishes a GLES2 context on an Android device where
GL_EXT_texture_norm16is supported. - The renderer issues a
ReadPixelscommand using an affected sized format (e.g.,GL_R16_EXT). - The decoder incorrectly calculates
pixels_size = 0due to the root cause mentioned above. GetSharedMemoryAsvalidates the shared memory region for 0 bytes; this check passes for an offset at the end of a valid shared memory mapping.- The
read_pixel_formatvalidator identifies the format as valid because it was explicitly whitelisted byFeatureInfo. - The command falls through to the native
glReadPixelscall. If the driver supports this format for the current framebuffer, it executes the read and writes the actual pixel data (e.g.,width * height * 2bytes forGL_R16_EXT) to the provided pointer. - This results in an out-of-bounds write into adjacent GPU process memory.
Impact
This issue allows an out-of-bounds write in the GPU process. On Android, the GPU process is typically unsandboxed (not using isolatedProcess by default). An attacker who has already compromised a renderer can potentially use this vulnerability to escalate privileges to the GPU process, leading to a full device compromise.
Suggested Fix
Update gpu/command_buffer/common/gles2_cmd_utils.cc to include the missing sized formats in GLES2Util::ElementsPerGroup:
case GL_R16_EXT:
return 1;
case GL_RG16_EXT:
return 2;
case GL_RGBA16_EXT:
return 4;
Additionally, ComputeImageGroupSize should likely CHECK that the result of ElementsPerGroup is non-zero if the format itself is not zero.
Evaluated with Chrome root at commit: b3153093eb3c78c3e88ccf562bcbc20437a04b0e
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 a logic desync: FeatureInfo whitelists sized internal formats such as GL_R16_EXT for read_pixel_format, but GLES2Util::ElementsPerGroup does not recognise them and returns 0, so the decoder validates a zero-byte destination buffer while the native driver writes full-sized pixel data.
Impact
An attacker who has already compromised a renderer could potentially use this out-of-bounds write to escalate privileges to the GPU process, which on Android is typically unsandboxed, leading to a full device compromise.
What the attacker needed
Compromised renderer process; Android device with GL_EXT_texture_norm16; driver supports the affected format
The fix
The missing sized formats should be added to GLES2Util::ElementsPerGroup, and ComputeImageGroupSize should likely check that the result is non-zero for a non-zero format.
How it was found
- A compromised renderer establishes a GLES2 context on an Android device that supports GL_EXT_texture_norm16.
- The renderer issues a ReadPixels command using an affected sized format such as GL_R16_EXT.
- The decoder calculates pixels_size as zero because ElementsPerGroup does not recognise the format.
- GetSharedMemoryAs validates the shared memory region for zero bytes, which passes for an offset at the end of a valid mapping.
- The read_pixel_format validator accepts the format because FeatureInfo whitelisted it.
- The command reaches the native glReadPixels call, and if the driver supports the format, it writes the actual pixel data past the validated 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.
The GPU process handles graphics commands from web pages. A validation step checks that a command like reading pixels will fit into a shared memory buffer, but for some pixel formats the size calculation returns zero, so the check passes even though the real write is larger. This lets a compromised renderer write past the end of the buffer in the GPU process, which on Android is often unsandboxed.
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.