Uninitialized Use in ANGLE (CVE-2026-17740)
ANGLE's Vulkan backend pads vertex buffers by 2KB for AMD and Samsung GPUs, but this padding is not zero-initialised and is included in the Vulkan buffer binding size. A malicious WebGL application could read this uninitialised padding via out-of-bounds vertex fetches, potentially leaking stale GPU memory from other origins.
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 without the security team.
Overview: On AMD and Samsung GPUs, ANGLE's Vulkan backend adds a 2KB uninitialized padding to vertex buffers to work around driver issues. Because this padding is included in the Vulkan buffer binding size, a malicious WebGL application can read the uninitialized padding using out-of-bounds vertex fetches. This potentially allows an attacker to leak stale GPU memory from other origins.
Affected files:
third_party/angle/src/libANGLE/renderer/vulkan/VertexArrayVk.cppthird_party/angle/src/libANGLE/renderer/vulkan/vk_renderer.cppthird_party/angle/src/libANGLE/renderer/vulkan/vk_helpers.cpp
Estimated timestamp from git blame: 2025-11-05
Description
A potential cross-origin GPU memory leak exists in ANGLE's Vulkan backend for AMD and Samsung Exynos GPUs. To work around driver bugs on these platforms, ANGLE artificially pads vertex buffers by 2048 bytes (mMaxVertexAttribStride). However, this padding region is never initialized and contains raw, stale GPU memory.
Because ANGLE includes this padded size when binding vertex buffers to the Vulkan API, and relies on the GPU's hardware robust buffer access rather than validating indices on the CPU, an attacker can safely index past their user-requested buffer size and read the uninitialized padding. This bypasses WebGL's robust resource initialization guarantees and leaks cross-origin memory.
Root Cause Analysis
- Padding Applied: In
vk_renderer.cpp,padBuffersToMaxVertexAttribStrideis enabled for AMD and Samsung GPUs, settingmMaxVertexAttribStrideto 2048. When allocating buffers,BufferHelper::initSuballocationinflates the size by this amount. - Incomplete Initialization: WebGL enforces robust resource initialization.
Buffer::bufferDataImplhandles this by creating a zero-filled scratch buffer, but it only sizes it to the user's requested length. The 2048-byte padding appended by the backend is skipped and remains uninitialized physical GPU memory (which may contain data from other processes/origins). - CPU Validation Bypassed: During Context creation, if the Vulkan driver supports
robustBufferAccessBehaviorKHR, ANGLE disables its own CPU-side bounds checking (mBufferAccessValidationEnabled = false). - Padded Size Bound to Vulkan: When preparing a draw call,
VertexArrayVk::syncDirtyEnabledNonStreamingAttribcomputes the bound size asuser_size + 2048. This padded size is passed down tovkCmdBindVertexBuffers2EXT. - Hardware Validation Fooled: When an out-of-bounds fetch occurs, the GPU hardware checks the requested index against the Vulkan bound size. Since the bound size includes the padding, the hardware considers the out-of-bounds read valid, successfully feeding stale memory into the shader.
Potential Attacker Steps
Note: These are suggested/potential steps derived from code analysis; our tooling does not currently have the ability to run or verify live exploits.
- Initialize a WebGL context on a vulnerable device (AMD or Samsung GPU).
- Create a vertex buffer with a specific size
Susinggl.bufferData. - Configure a WebGL Transform Feedback object to capture the outputs of a vertex shader.
- Issue a
gl.drawArraysorgl.drawElementscall that intentionally fetches vertex indices located past the buffer sizeS, but within theS + 2048boundary. - Because CPU validation is disabled and the hardware considers the read in-bounds, the vertex shader will process the uninitialized GPU memory.
- Read back the leaked memory from the Transform Feedback buffer using
gl.getBufferSubDatainto a JavaScript TypedArray to exfiltrate the data.
Suggested Fix
Ensure that the padding region is zero-initialized when robust resource initialization is required. This can be done by:
- Modifying the ANGLE frontend (
Buffer::bufferDataImpl) to query and include the backend padding size when allocating the zero-filled scratch buffer. - Alternatively, explicitly issuing a Vulkan
vkCmdFillBufferor similar zeroing command on the padded region[user_size, user_size + padding]within the Vulkan backend when a suballocation is initialized and robust access is requested.
Evaluated with Chrome root at commit: ff3d2b74fa39431785bd60e51463b08fcc71ee33
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. 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 padding added to vertex buffers for driver workarounds is not zero-initialised, and because the padded size is used for Vulkan buffer binding while CPU-side bounds checking is disabled, the GPU's hardware validation allows reads into the uninitialised padding.
Impact
A malicious WebGL application could potentially leak stale GPU memory from other origins, bypassing WebGL's robust resource initialization guarantees.
What the attacker needed
Vulnerable device (AMD or Samsung GPU); WebGL support; malicious web page
The fix
The padding region should be zero-initialised when robust resource initialization is required, either by including the backend padding size in the zero-filled scratch buffer or by explicitly zeroing the padded region with a Vulkan command.
How it was found
- Initialise a WebGL context on a vulnerable device (AMD or Samsung GPU).
- Create a vertex buffer of size S using gl.bufferData.
- Configure a WebGL Transform Feedback object to capture vertex shader outputs.
- Issue a draw call that fetches vertex indices past S but within S + 2048.
- The vertex shader processes uninitialised GPU memory because CPU validation is disabled and hardware considers the read in-bounds.
- Read back the leaked memory from the Transform Feedback buffer using gl.getBufferSubData into a JavaScript TypedArray.
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.
WebGL lets web pages draw 3D graphics using the GPU. To work around bugs in some graphics drivers, the software adds extra space to buffers, but this extra space is not cleared and may contain leftover data from other programs. A malicious page could trick the GPU into reading that leftover data, which might include information from other websites.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.