Object corruption in Compositing (CVE-2026-8545)
A lack of collision detection in the resource ID generator combined with improper duplicate key handling allows a compromised renderer to alias a cross-origin GPU resource. The attacker could then render and exfiltrate the victim's texture via timing side-channels.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 45 days
Project Fortify, an experimental security project, has identified the following potential security issue.
Overview: A lack of collision detection in ResourceIdGenerator::GenerateNextId() combined with improper duplicate key handling in DisplayResourceProvider::ReceiveFromChild allows a compromised renderer to force a 32-bit ID wraparound. This creates an alias to a cross-origin victim's GPU resource, which the attacker can then render and exfiltrate.
Affected files:
components/viz/common/resources/resource_id.hcomponents/viz/service/display/display_resource_provider.cccomponents/viz/service/display/resolved_frame_data.cccomponents/viz/service/display/display_resource_provider_skia.cc
Estimated timestamp from git blame: 2021-08-20
Summary
A potential vulnerability in the viz component's resource management allows a compromised renderer to access and render GPU textures belonging to cross-origin surfaces (such as iframes or other windows) that share the same Display. The issue stems from a lack of collision detection in ResourceIdGenerator::GenerateNextId() when the 32-bit ID counter wraps around, combined with improper handling of duplicate resource IDs in DisplayResourceProvider::ReceiveFromChild.
Technical Details
In the Chromium compositor (Viz), DisplayResourceProvider is responsible for managing resources (like GPU textures) used for compositing a Display. A single DisplayResourceProvider instance is shared across all surfaces within a Display (e.g., the root surface and all its embedded iframes).
Resources are identified by a ResourceId, which is a 32-bit unsigned integer. When a child (a renderer process) sends resources to Viz via SubmitCompositorFrame, Viz assigns a local_id to each resource using a ResourceIdGenerator.
The generator simply increments a 32-bit next_id_. When next_id_ reaches the reserved range (near UINT32_MAX), it wraps back to start_id_. There is no check to ensure that the new local_id is not already in use by another resource in the DisplayResourceProvider.
In DisplayResourceProvider::ReceiveFromChild, the code handles new resources:
ResourceId local_id = resource_id_generator_.GenerateNextId();
resources_.emplace(local_id,
ChildResource(child_id, transferable_resource));
child_info.child_to_parent_map[transferable_resource.id] = local_id;
If local_id already exists in the resources_ map (because it is currently held by a victim surface), resources_.emplace will fail because std::unordered_map::emplace does not overwrite existing entries on duplicate keys. However, the code proceeds to update child_info.child_to_parent_map[transferable_resource.id] = local_id;. This creates an alias: the attacker's child-side resource ID now maps to the same local_id as the victim's resource.
When the compromised renderer subsequently submits a CompositorFrame containing a TextureDrawQuad that references this aliased resource ID, the Viz service resolves the ID to the victim's local_id and retrieves the victim's ChildResource and its associated GPU mailbox. The victim's texture is then sampled and rendered into the attacker's frame.
Potential Attack Scenario
Note: This is a suggested attack path; our tooling agent does not have the ability to run code to confirm this end-to-end.
- Renderer Compromise: An attacker compromises a renderer process (e.g., via a V8 bug) and gains the ability to send custom
CompositorFrameIPCs to the Viz service. - Victim Setup: The attacker embeds a cross-origin iframe (the victim) that holds a long-lived GPU resource (e.g., a static WebGL canvas or a video frame). This resource occupies a
local_idin the sharedDisplayResourceProvider. - Resource Flooding: The attacker churns
ResourceIds by repeatedly callingSubmitCompositorFramewith a large number of dummy resources. SinceSubmitCompositorFrameallows[UnlimitedSize]arrays, the attacker can quickly cycle through the 4.29 billion possible IDs without triggering out-of-memory errors by ensuring the resources are unused and immediately released. - Forcing a Collision: At 60fps with 100,000 resources per frame, the 32-bit
ResourceIdGeneratorwraps around in approximately 12 minutes. The attacker continues until it generates alocal_idthat collides with the victim's resource. - Malicious Aliasing: When the collision occurs,
resources_.emplacefails, but the attacker'schild_to_parent_mapis successfully updated to alias the victim'slocal_id. - Unauthorized Rendering: The attacker submits a
TextureDrawQuadusing the aliased child-side ID. The victim's cross-origin texture is rendered within the attacker's controlled region. - Data Exfiltration: The attacker can then use timing side-channels (such as applying computationally expensive CSS/SVG filters to the leaked texture and measuring rendering performance) to slowly exfiltrate the visual contents of the cross-origin iframe back to their JavaScript environment.
Suggested Fix
In DisplayResourceProvider::ReceiveFromChild, check the result of resources_.emplace to ensure the ID was successfully inserted. If it fails due to a collision, the code should generate a new ID and try again, or crash the child process if it attempts to submit an excessive number of resources that exhaust the 32-bit ID space.
ResourceId local_id;
bool inserted = false;
while (!inserted) {
local_id = resource_id_generator_.GenerateNextId();
auto result = resources_.emplace(local_id,
ChildResource(child_id, transferable_resource));
inserted = result.second;
// Optionally add a safeguard against infinite loops if the ID space is fully exhausted.
}
child_info.child_to_parent_map[transferable_resource.id] = local_id;
Evaluated with Chrome root at commit: a9cbf6e8b275fe4147435aa905f3b7f5a656f5f0
Results from 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 resource ID generator does not check for collisions when its 32-bit counter wraps around, and the code that inserts new resources ignores the failure of `resources_.emplace` on a duplicate key while still updating the child-to-parent mapping.
Impact
A compromised renderer could render and exfiltrate cross-origin GPU textures, but the attack requires a renderer compromise and the exfiltration is slow and timing-based.
What the attacker needed
Compromised renderer process; ability to send custom CompositorFrame IPCs; victim cross-origin iframe with long-lived GPU resource
The fix
The code should check the result of `resources_.emplace` and retry with a new ID on collision, or crash the child process if it exhausts the ID space.
How it was found
- Compromise a renderer process to send custom CompositorFrame IPCs to Viz.
- Embed a cross-origin iframe that holds a long-lived GPU resource.
- Flood the resource ID space by submitting many dummy resources until the 32-bit counter wraps.
- Continue until a generated local_id collides with the victim's resource ID.
- Submit a TextureDrawQuad using the aliased child-side ID to render the victim's texture.
- Use timing side-channels to exfiltrate the visual contents of the cross-origin iframe.
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.
In a web browser, different websites are kept separate so one site cannot read another's pixels. This report describes a flaw in how the browser's compositor (the part that draws pages) assigns numbers to GPU textures. A malicious site that already controls a renderer process could trick the compositor into reusing a number that belongs to another site, letting it draw that other site's texture and then slowly leak its contents.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.