Out of bounds read in ANGLE (CVE-2026-17678)
The GLES2 passthrough decoder sign-extends a renderer-supplied vertex attribute offset on 64-bit platforms, so a negative offset can reach ANGLE and be stored without validation. In the Vulkan backend's CPU-side vertex divisor emulation this offset is added to a mapped buffer pointer, producing an out-of-bounds read that could disclose memory from the GPU process.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 2 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: The GLES2 passthrough decoder sign-extends the VertexAttribPointer offset on 64-bit platforms, allowing a compromised renderer to specify a negative offset. In ANGLE's Vulkan backend, CPU-side vertex divisor emulation can use this negative offset to perform an out-of-bounds read from mapped GPU memory. This vulnerability potentially allows for cross-origin information disclosure within the GPU process.
Affected files:
gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers.ccthird_party/angle/src/libANGLE/renderer/vulkan/VertexArrayVk.cppthird_party/angle/src/libANGLE/VertexArray.cpp
Estimated timestamp from git blame: 2019-07-17
Summary
A potential sign-extension vulnerability exists in the GLES2 passthrough command decoder's handling of vertex attribute offsets. When combined with ANGLE's vertex divisor emulation in the Vulkan backend, this can lead to a CPU-side out-of-bounds (OOB) read. On 64-bit systems, a large unsigned 32-bit offset is incorrectly treated as a signed value, resulting in a negative 64-bit pointer/offset that bypasses standard bounds checks and points before the allocated buffer memory.
Root Cause Analysis
1. Sign-Extension in Passthrough Decoder
In gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers.cc, the handler for VertexAttribPointer (and VertexAttribIPointer) takes a renderer-controlled uint32_t c.offset and narrows it to a signed 32-bit GLsizei before converting it to a pointer:
// gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers.cc
GLsizei offset = static_cast<GLsizei>(c.offset); // e.g., 0x80000000 -> -2147483648
const void* ptr = reinterpret_cast<const void*>(offset); // Sign-extended on 64-bit systems
On 64-bit platforms, reinterpret_cast<const void*>(offset) performs sign-extension if the most significant bit of the 32-bit offset is set. For example, 0x80000000 becomes 0xFFFFFFFF80000000.
2. Negative Offset in ANGLE
ANGLE receives this sign-extended pointer and, when a buffer is bound, stores it as a signed 64-bit GLintptr binding offset in third_party/angle/src/libANGLE/VertexArray.cpp. There is currently no front-end validation to ensure this offset is non-negative when a buffer is bound.
3. OOB Read in Vulkan Backend
In ANGLE's Vulkan backend, if a vertex attribute divisor exceeds the hardware limit (e.g., 255), the renderer falls back to CPU-side emulation in VertexArrayVk::updateStreamedAttribs. This path maps the source vertex buffer and calculates the source pointer by adding the stored offset:
// third_party/angle/src/libANGLE/renderer/vulkan/VertexArrayVk.cpp
ANGLE_TRY(bufferVk->mapForReadAccessOnly(contextVk, &buffSrc));
// buffSrc points to the start of the suballocation
src = reinterpret_cast<const uint8_t *>(buffSrc) + binding.getOffset();
Since binding.getOffset() can be negative (e.g., -2GB), the resulting src pointer points to memory significantly before the intended buffer suballocation, leading to an OOB read during the subsequent data copy in StreamVertexDataWithDivisor.
Potential Impact
A compromised renderer could potentially leak up to 2GB of memory from the GPU process's address space. In the Vulkan backend, buffers are often suballocated from large shared BufferBlock pools. This OOB read could allow an attacker to disclose cross-origin vertex data, pixel data, or other sensitive information belonging to different WebGL contexts or origins sharing the GPU process. This is particularly relevant on Android, where the GPU process is often unsandboxed and uses the Vulkan backend.
Potential Steps to Reproduce
- From a compromised renderer, create a large
GL_ARRAY_BUFFERand populate it with data. - Call
glVertexAttribPointerwith an offset that has the 31st bit set (e.g.,0x80000000). - Set a vertex divisor for the same attribute that is greater than 255 (e.g.,
glVertexAttribDivisor(index, 256)). - Perform a draw call while capturing output via Transform Feedback.
- Read back the Transform Feedback buffer to inspect the leaked memory contents from the GPU process.
Suggested Fix
- Decoder Level: In
gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers.cc, treat the offset as an unsigned value (uintptr_t) during the conversion tovoid*to avoid sign-extension. - ANGLE Level: Update
ValidateVertexAttribPointerandValidateVertexAttribIPointerinthird_party/angle/src/libANGLE/validationES.cppto explicitly disallow negative offsets when a buffer is bound to the attribute.
Evaluated with Chrome root at commit: 29093e11cf509e3593f6229e4b1b075cca356049
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 decoder narrows an unsigned 32-bit offset to a signed type and casts it to a pointer, which sign-extends on 64-bit systems, and ANGLE does not reject negative binding offsets.
Impact
A compromised renderer could potentially leak up to 2GB of GPU process memory, including cross-origin vertex or pixel data, which is particularly relevant on Android where the GPU process is often unsandboxed.
What the attacker needed
Compromised renderer; 64-bit platform; Vulkan backend; vertex divisor above 255
The fix
The offset should be treated as unsigned when converted to a pointer, and ANGLE validation should reject negative offsets when a buffer is bound.
How it was found
- Create and fill a large array buffer from the renderer.
- Call the vertex attribute pointer function with an offset whose 31st bit is set.
- Set a vertex divisor above 255 for that attribute.
- Issue a draw call while capturing output through transform feedback.
- Read back the transform feedback buffer to inspect leaked memory.
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 page's graphics code asks the browser to read vertex data from a buffer at a certain position. A number meant to be unsigned was treated as negative, so the position ended up before the start of the buffer. When the graphics library later copied data from that position, it read memory it should never have touched, which could expose other pages' data.
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.