Skip to content
Memory corruption Advisory Advanced CVE-2026-17676

Inappropriate implementation in ANGLE (CVE-2026-17676)

ANGLE's Vulkan backend calculated a framebuffer's sample count using only enabled draw buffers, so calling glDrawBuffers(GL_NONE) on a framebuffer with a multisampled render-to-texture attachment cached the count as one. The resulting mismatch between the Vulkan render pass and framebuffer could cause driver-level memory corruption in the unsandboxed GPU process on Android.

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: A logic error in ANGLE's Vulkan backend leads to a sample count mismatch between VkRenderPass and VkFramebuffer when glDrawBuffers(GL_NONE) is used with Multisampled Render-to-Texture (MSRTT) attachments. This issue specifically affects Android devices utilizing MSRTT emulation on tile-based GPUs. The resulting Vulkan VUID violations may cause exploitable memory corruption in the unsandboxed GPU process.

Affected files:

  • third_party/angle/src/libANGLE/renderer/vulkan/FramebufferVk.cpp
  • third_party/angle/src/libANGLE/renderer/vulkan/vk_cache_utils.cpp
  • third_party/angle/src/libANGLE/renderer/vulkan/TextureVk.cpp
  • third_party/angle/src/libANGLE/renderer/vulkan/RenderTargetVk.cpp
  • third_party/angle/src/libANGLE/renderer/vulkan/ContextVk.cpp
  • third_party/angle/src/libANGLE/renderer/vulkan/vk_renderer.cpp
  • third_party/angle/src/libANGLE/Framebuffer.cpp

Estimated timestamp from git blame: 2021-03-09

Summary

A potential vulnerability has been identified in ANGLE's Vulkan backend where the sample count for a framebuffer is incorrectly calculated when draw buffers are disabled. Specifically, FramebufferVk::getSamplesImpl() derives the framebuffer's sample count by iterating only over enabled draw buffers. However, subsequent logic that populates the Vulkan RenderPass and Framebuffer attachments iterates over all color attachments in the mask, regardless of their draw buffer state.

When glDrawBuffers(GL_NONE) is called on a framebuffer with a Multisampled Render-to-Texture (MSRTT) attachment, the sample count is incorrectly cached as 1. This leads to a VkRenderPass where the attachment is declared with 1 sample, while a multisampled VkImageView (e.g., 4 samples) is bound to that same attachment in the VkFramebuffer. This mismatch results in undefined behavior in the GPU driver.

Technical Details

In third_party/angle/src/libANGLE/renderer/vulkan/FramebufferVk.cpp, the getSamplesImpl() function filters by the enabled draw buffer state:

C++
// lines 4103-4114
for (size_t colorIndexGL : mState.getEnabledDrawBuffers() & mState.getColorAttachmentsMask())
{
    const gl::FramebufferAttachment *color = mState.getColorAttachment(colorIndexGL);
    if (color->isRenderToTexture()) 
    {
        return color->getSamples(); // Skipped if draw buffer is GL_NONE
    }
    lastAttachment = color;
}

When glDrawBuffers(GL_NONE) is set, mRasterizationSamples is cached as 1. However, updateRenderPassDesc still iterates over the full colorAttachmentMask to pack attachments (lines 2880-2911), leading to a VkRenderPass configuration that expects a single-sampled attachment. Simultaneously, updateAttachmentsAndRenderTargets binds the actual multisampled VkImageView to the framebuffer.

This results in several Vulkan Validation Layer (VUID) violations, including:

  • VUID-VkFramebufferCreateInfo-pAttachments-00881: Bound VkImageView sample count does not match VkAttachmentDescription sample count.
  • VUID-VkGraphicsPipelineCreateInfo-rasterizationSamples-06853: Pipeline rasterizationSamples does not match the bound attachment's sample count.

Impact

This issue is reachable from a compromised renderer process via standard GLES2 command buffer IPC. It affects the GPU process, which is unsandboxed on Android. On tile-based deferred rendering (TBDR) GPUs common in Android devices (Adreno, Mali, PowerVR), these metadata mismatches can lead to driver-level memory corruption during tile-to-memory operations, such as resolves. An attacker could potentially leverage this corruption to achieve code execution in the context of the GPU process.

Potential Reproduction Steps

Note: These are suggested steps; our analysis is based on code review.

  1. Use an Android device where ANGLE utilizes MSRTT emulation (typically those lacking VK_EXT_multisampled_render_to_single_sampled).
  2. Create a texture and an FBO.
  3. Attach the texture to the FBO using glFramebufferTexture2DMultisampleEXT with a sample count > 1.
  4. Set draw buffers to GL_NONE using glDrawBuffers(1, {GL_NONE}).
  5. Issue a draw call (e.g., glDrawArrays).
  6. The resulting Vulkan calls will contain mismatched sample counts between the RenderPass and Framebuffer, triggering the violation.

Suggested Fix

Modify FramebufferVk::getSamplesImpl() in third_party/angle/src/libANGLE/renderer/vulkan/FramebufferVk.cpp to iterate over the entire mState.getColorAttachmentsMask() instead of intersecting it with mState.getEnabledDrawBuffers(). The physical structure of the RenderPass and Framebuffer should reflect the attached resources regardless of the current draw buffer enablement state.

Evaluated with Chrome root at commit: 1a8d40fc44df2088d5945c0bf53584038aa1614a


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.

The original report as published on the Chromium issue tracker. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

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 sample count was derived only from enabled draw buffers while the render pass and framebuffer attachments were built from all colour attachments, so disabling draw buffers produced inconsistent metadata.

Impact

An attacker who already controls the renderer process could potentially turn the driver-level memory corruption into code execution in the GPU process, which is unsandboxed on Android; the report notes the steps are suggested and based on code review, not a demonstrated exploit.

What the attacker needed

Android device with MSRTT emulation; control of the renderer process

The fix

The sample count calculation should consider all colour attachments rather than only the enabled draw buffers, so the render pass and framebuffer always agree.

How it was found

  1. Use an Android device where ANGLE emulates multisampled render-to-texture.
  2. Create a texture and a framebuffer object.
  3. Attach the texture with a sample count greater than one.
  4. Set the draw buffers to none.
  5. Issue a draw call.
  6. Observe mismatched sample counts between the render pass and framebuffer.

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 graphics library called ANGLE translates drawing commands into Vulkan, the low-level interface used to talk to the graphics chip. It described a framebuffer (the surface being drawn into) as having one sample while actually attaching a surface with several samples, which breaks the driver's assumptions. On Android the graphics driver runs without the usual sandbox, so a bug there is more serious than one in a normal app.

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.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.