Skip to content
Info disclosure Advisory Advanced CVE-2026-5283

Inappropriate implementation in ANGLE (CVE-2026-5283)

ANGLE's robust resource initialisation tracked TEXTURE_2D_ARRAY initialisation per mip level rather than per layer, so clearing one layer marked the whole mip as initialised while sibling layers still held stale GPU memory. A WebGL2 page could then read those uninitialised layers and recover pixel data left behind by other pages after they navigated away.

sweetchip Follow

Originally disclosed on Chrome VRP

  • Fix shipped in 20 days

Report description

ANGLE WebGL2: Missing Per-Layer Init Tracking in TEXTURE_2D_ARRAY Leaves Layers Uninitialized, Leads to Cross-Origin GPU Texture Data Leak


Bug location

Where do you want to report your vulnerability?

Chrome VRP – Report security issues affecting the Chrome browser. See program rules


The problem

Please describe the technical details of the vulnerability

Summary

ANGLE's robust resource initialization tracks TEXTURE_2D_ARRAY init state per mip-level (mipmap level = resolution step: level 0 is full-size, level 1 is half, etc.), but not per layer (layer = individual 2D slice within an array texture). A TEXTURE_2D_ARRAY with 4 layers at mip 0 has only one initState shared across all 4 layers. Clearing one layer via framebufferTextureLayer + gl.clear marks the entire mip level (all layers) as initialized — but only that single layer actually receives a GPU write. Sibling layers remain filled with stale GPU memory from previously freed textures. readPixels on those uninitialized layers bypasses all init checks and returns the stale data directly to JavaScript.

Tested on

  • AWS G4DN instance (Nvidia T4)
  • Ubuntu 24.04.4 server + XRDP
  • Chromium asan build (vulkan backend)
  • For reliable reproduction, I recommend testing under the same or similar environment (NVIDIA GPU + Linux + Vulkan backend). See the Notes section for details on hardware-dependent behavior.

Root Cause

The frontend tracks TEXTURE_2D_ARRAY init state per mip-level (mipmap resolution step) but missing per-layer tracking (individual 2D slice within the array). Note that cube maps already have per-face tracking (level * 6 + faceIndex), but array textures do not — GetImageDescIndex returns only level, collapsing all layers into one ImageDesc.initState. This is a frontend logic bug — all backends (Vulkan, D3D11, Metal) are equally affected because they trust the frontend's initState verdict.

C++
// src/libANGLE/Texture.cpp:43-47
size_t GetImageDescIndex(TextureTarget target, size_t level)
{
    return IsCubeMapFaceTarget(target) ? (level * 6 + CubeMapTextureTargetToFaceIndex(target))
                                       : level;  // ← BUG: cube maps get per-face tracking,
                                                  //    but 2D_ARRAY layers all share one ImageDesc per mip
}

All layers of a mip map to a single ImageDesc.initState. When a single layer is cleared:

C++
// src/libANGLE/Framebuffer.cpp:2498-2508
if (partialClearNeedsInit(context, color, depth, stencil))
{
    ANGLE_TRY(ensureDrawAttachmentsInitialized(context));  // ← SKIPPED for full-viewport clear
}
markAttachmentsInitialized(clearedColorAttachments, depth, stencil);  // ← marks entire mip Initialized

partialClearNeedsInit returns false for a full-viewport, unmasked clear. The code skips ensureDrawAttachmentsInitialized (which would zero ALL layers) and jumps to markAttachmentsInitialized, setting initState = Initialized for the whole mip — even though only one layer received a GPU write.

After this, ensureReadAttachmentsInitialized (the readPixels init gate) sees mResourceNeedsInit is empty and skips initialization:

C++
// src/libANGLE/Framebuffer.cpp:2623-2630
angle::Result Framebuffer::ensureReadAttachmentsInitialized(const Context *context)
{
    ASSERT(context->isRobustResourceInitEnabled());

    if (mState.mResourceNeedsInit.none())   // ← false because initState was set to Initialized
    {
        return angle::Result::Continue;     // ← init SKIPPED, stale GPU memory returned
    }

Introduced in commit 05b35b210e (2017-10-03, "D3D11: Lazy robust resource init") which added ImageDesc.initState, partialClearNeedsInit, markAttachmentsInitialized, and ensureReadAttachmentsInitialized all at once — with per-mip-only granularity from the start.

Execution Flow

texStorage3D(2D_ARRAY, 4 layers)        ImageDesc[mip0].initState = MayNeedInit
                                        (all 4 layers share this single ImageDesc)

framebufferTextureLayer(FBO_A, layer=0) FBO_A targets layer 0 only
                                        mResourceNeedsInit.set(0, true)  (MayNeedInit)

gl.clear(COLOR_BUFFER_BIT) on FBO_A     partialClearNeedsInit() = false  (full-viewport, no mask)
                                        ensureDrawAttachmentsInitialized SKIPPED
                                        GPU writes ONLY layer 0
                                        markAttachmentsInitialized:
                                          setInitState(Initialized) on attachment
                                          -> Texture::setInitState -> getImageDesc(target, level)
                                          -> GetImageDescIndex returns level=0
                                          -> ImageDesc[mip0].initState = Initialized  <-- BUG
                                          (layers 1-3 still contain stale GPU memory)

framebufferTextureLayer(FBO_B, layer=2) FBO_B attach: attachment->initState() called
                                        -> Texture::initState(imageIndex) -> getImageDesc(level=0)
                                        -> returns Initialized (false: layer 2 was never written)
                                        -> mResourceNeedsInit.set(0, false)

gl.readPixels() on FBO_B               ensureReadAttachmentsInitialized:
                                          mResourceNeedsInit.none() == true -> skip init
                                        backend reads layer 2 stale GPU memory -> INFO LEAK

Notes

  • ASAN cannot detect this vulnerability. The stale data resides in GPU device memory (VRAM), which is outside ASAN's instrumentation scope. All CPU-side operations (staging buffer allocation, memcpy to JavaScript ArrayBuffer) are correctly sized and within bounds. The bug produces wrong data content (stale instead of zero), not an out-of-bounds memory access — so no ASAN signal is expected.
  • Reproduction depends on GPU hardware and driver. The leaked data comes from VRAM blocks that are freed and reallocated by the GPU driver's memory allocator (e.g. Vulkan VMA). Whether stale data persists depends on the driver's allocation behavior:
    • NVIDIA Vulkan: does not zero-fill VRAM on allocation → 100% reproducible
    • Apple Metal: zero-fills on allocation → not reproducible despite identical frontend bug
    • AMD/Intel Vulkan: behavior may vary by driver version
    • VRAM reuse also depends on texture size alignment and allocator fragmentation — same-sized textures maximize reuse probability.

Suggested Fix

  1. Quick fix: In partialClearNeedsInit (Framebuffer.cpp), treat a single-layer clear on a multi-layer texture (TEXTURE_2D_ARRAY, TEXTURE_2D_MULTISAMPLE_ARRAY, TEXTURE_CUBE_MAP_ARRAY) as a partial clear when the mip's initState is MayNeedInit. This forces ensureDrawAttachmentsInitialized to zero all sibling layers before markAttachmentsInitialized marks the entire mip as initialized.

  2. Thorough fix: Extend GetImageDescIndex (Texture.cpp) to track init state per-layer for array texture types, similar to how cube maps already track per-face via level * 6 + faceIndex. This requires resizing mImageDescs to account for the layer count, which is a larger refactor.

Reproduction Steps

Minimal Reproduction (poc.html)

Bash
# Linux with Vulkan GPU (tested on T4 / Ubuntu)
./chrome --headless=new --no-sandbox --disable-gpu-sandbox \
  --use-gl=angle --use-angle=vulkan --ignore-gpu-blocklist \
  poc.html --dump-dom
  1. Create TEXTURE_2D_ARRAY texture A (2x1, 4 layers), clear layers 1-2 with magenta [255,0,255,255]
  2. Delete texture A
  3. Create TEXTURE_2D_ARRAY texture B (same dimensions)
  4. Clear only layer 1 of B with green
  5. readPixels on layer 2 of B
**Check 'poc_html_result.png'**
Expected:  [0,0,0,0, 0,0,0,0]  (uninitialized → zeroed by robust init)
Actual:    [255,0,255,255, 255,0,255,255]  (stale magenta from deleted texture A)

10-Round Spray-and-Leak (poc_v2_enhanced.html)

Bash
./chrome --headless=new --no-sandbox --disable-gpu-sandbox \
  --use-gl=angle --use-angle=vulkan --ignore-gpu-blocklist \
  poc_v2_enhanced.html --dump-dom
Check 'poc_v2_enhanced_html_result.png'
# Output (10 rounds, 256x256x4 RGBA8):
# Round 1 seed=#deadbeef | status=LEAK | stale=100.0% (65536/65536) | err=0
# Round 2 seed=#cafebabe | status=LEAK | stale=100.0% (65536/65536) | err=0
# ...
# Total stale bytes leaked: 2621440

Seeds 10 different patterns (0xDEADBEEF, 0xCAFEBABE, 0x41414141, ...) into texture A across rounds, verifies each pattern leaks back through texture B's uninitialized layer 2. 256x256 RGBA8 = 262,144 bytes leaked per round.

Cross-Origin Visual Reproduction (victim_layer_visual.html + poc_attacker_layer_visual.html)

Bash
./chrome --no-sandbox --disable-gpu-sandbox --use-gl=angle --use-angle=vulkan --ignore-gpu-blocklist

Demonstrates real-world cross-origin GPU memory leak between two independent pages:

  1. Open victim_layer_visual.html — sprays 100 TEXTURE_2D_ARRAY textures (256x256x4 layers, ~100 MB) with a distinctive blue+red cross pattern, then deletes all textures
  2. Open poc_attacker_layer_visual.html in a separate tab — probes every 1 second for stale victim data via the layer leak bug
  3. Trigger condition: The victim page must navigate away, refresh, or close the tab so that its WebGL textures are freed back to the GPU memory allocator (VMA free list). While the victim's textures are live, they cannot be reallocated to the attacker.
  4. After victim navigation/close, the attacker's new TEXTURE_2D_ARRAY allocations reuse the same VMA blocks → readPixels on uninitialized layer 2 returns the victim's stale cross pattern

This matches the real-world attack scenario: a victim browses a GPU-intensive site (Google Maps satellite tiles, Google Earth 3D terrain, video conferencing frames), then navigates away. The attacker page — open in another tab — continuously probes and recovers the victim's freed GPU texture data.

Impact analysis

Impact

A WebGL2 page can read GPU pixel data left behind by other websites after they navigate away. An attacker page continuously probes for reused GPU memory blocks; when a victim page (e.g. Google Maps, Google Earth, Google Meet) navigates away and its textures are freed, the attacker recovers the victim's rendered pixel data — satellite imagery, map tiles, video frames — without any user interaction.

cross_origin_texture_leak_poc_1.png : Google Maps/Earth satellite imagery tiles (which were freed via leaving / navigating to other page) visible in leaked stale texture data on above aws environment. (Please check image attachments)


The cause

What version of Chrome have you found the security issue in?

147.0.7726.0

Is the security issue related to a crash?

No, it is not related to a crash.

Choose the type of vulnerability

Information Leak

How would you like to be publicly acknowledged for your report?

sweetchip

The original report as published on the Chromium issue tracker, by sweetchip. 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 frontend's GetImageDescIndex collapses all layers of an array texture into a single per-mip ImageDesc, so a full-viewport clear of one layer marks the entire mip as initialised and the readPixels init gate is skipped for the untouched layers.

Impact

A WebGL2 page could read GPU pixel data left behind by other websites after they navigate away, though reproduction depends on the GPU driver not zero-filling VRAM (NVIDIA Vulkan reproduced; Apple Metal did not).

What the attacker needed

Victim visits a GPU-heavy site; victim navigates away or closes tab; attacker page open in another tab; NVIDIA Vulkan driver that does not zero VRAM

The fix

It should be fixed either by treating a single-layer clear on a multi-layer texture as a partial clear, or by extending GetImageDescIndex to track init state per layer for array textures.

How it was found

  1. Create a 2x1 four-layer TEXTURE_2D_ARRAY and clear layers 1-2 with magenta.
  2. Delete that texture so its GPU memory is freed.
  3. Create a second TEXTURE_2D_ARRAY with the same dimensions.
  4. Clear only layer 1 of the new texture with green.
  5. Read pixels from layer 2 and observe the stale magenta data instead of zeroes.

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.

Graphics memory (VRAM) is reused between programs, so a well-behaved browser zeroes any texture memory before handing it to a web page. Here the browser thought it had zeroed a whole array texture after clearing just one slice of it, so the other slices still contained whatever an earlier page had drawn. A malicious page could then read that leftover picture data.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by sweetchip

View all

27 more disclosed reports, best first.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.