Use after free in Compositing (CVE-2026-113081)
A use-after-free was identified in Chrome's compositor tile management: the code caches raw pointers to tile resources in stack vectors, then synchronously triggers scheduler actions that can activate a new tree and destroy those tiles. An attacker could potentially cause the renderer to dereference freed memory, though the report is based on code analysis only and no proof of concept was run.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 3 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 potential Use-After-Free (UAF) vulnerability exists in the compositor thread of the Chrome renderer process during tile management. The function TileManager::CheckPendingGpuWorkAndIssueSignals stores raw pointers to InUsePoolResource subobjects within Tile heap allocations inside stack-allocated vectors, then synchronously invokes scheduler actions mid-loop via NotifyTileStateChanged. This can trigger sync tree activation, destroying the underlying tiles and leaving dangling pointers in the vectors which are subsequently dereferenced.
Affected files:
cc/tiles/tile_manager.cccc/raster/gpu_raster_buffer_provider.cccc/raster/one_copy_raster_buffer_provider.cc
Estimated timestamp from git blame: 2018-01-18
Root Cause Analysis
In cc/tiles/tile_manager.cc, the function TileManager::CheckPendingGpuWorkAndIssueSignals checks the status of pending GPU work for tiles. During this check, it builds two local stack-allocated vectors of bare pointers pointing to InUsePoolResource subobjects:
// cc/tiles/tile_manager.cc
std::vector<const ResourcePool::InUsePoolResource*> required_for_activation;
std::vector<const ResourcePool::InUsePoolResource*> required_for_draw;
for (auto it = pending_gpu_work_tiles_.begin();
it != pending_gpu_work_tiles_.end();) {
Tile* tile = *it;
DCHECK(tile->draw_info().has_resource());
const ResourcePool::InUsePoolResource& resource =
tile->draw_info().GetResource();
...
if (global_state_.tree_priority != SMOOTHNESS_TAKES_PRIORITY ||
raster_buffer_provider_->IsResourceReadyToDraw(resource)) {
tile->draw_info().set_resource_ready_for_draw();
client_->NotifyTileStateChanged(tile, /*update_damage=*/true,
/*set_needs_redraw=*/true); // <--- Re-entrancy Hazard
it = pending_gpu_work_tiles_.erase(it);
continue;
}
if (tile->required_for_activation())
required_for_activation.push_back(&resource); // <--- Caching raw address
if (tile->required_for_draw())
required_for_draw.push_back(&resource); // <--- Caching raw address
++it;
}
The variable resource is a reference to the TileDrawInfo::resource_ member variable, which is embedded inside the Tile object itself (cc/tiles/tile.h:201 and cc/tiles/tile_draw_info.h:112). Therefore, &resource is a raw C++ pointer directly into the Tile heap allocation.
Inside the loop, if a tile is ready to draw, client_->NotifyTileStateChanged is called with set_needs_redraw=true. If this task executes outside of a scheduler action (such as via a posted task from signals_check_notifier_ or a weak pointer callback from SignalSyncToken), the call synchronously re-enters the scheduler:
NotifyTileStateChanged -> SetNeedsRedraw -> ProxyImpl::SetNeedsRedrawOnImplThread -> Scheduler::SetNeedsRedraw -> ProcessScheduledActions().
Since the recursion guards are not active, ProcessScheduledActions runs and can decide to dispatch ACTIVATE_SYNC_TREE if a pending tree is ready (or if we can abort the current frame because of visibility or pauses). This synchronous activation destroys obsolete active-tree tilings and their tiles, including previously iterated tiles whose resource addresses have already been cached in required_for_draw or required_for_activation.
When a tile is destroyed, it calls ~Tile(), which synchronously invokes TileManager::Release -> FreeResourcesForTile, freeing the underlying resource and the tile heap memory. The cached stack-allocated vectors are left with dangling pointers pointing to the freed memory.
Once the loop finishes, the provider dereferences the dangling pointers:
// cc/raster/gpu_raster_buffer_provider.cc
for (const auto* in_use : resources) {
const gpu::SyncToken& sync_token = in_use->backing()->mailbox_sync_token; // <--- UAF Dereference
...
}
Lack of Mitigations
- MiraclePtr: The local vectors hold plain
const T*pointers, andInUsePoolResource::resource_is explicitly marked asRAW_PTR_EXCLUSIONfor performance reasons. MiraclePtr (BackupRefPtr) does not protect this path. - Iterator Invalidation: Erasing from the
std::unordered_setonly invalidates the iterator pointing to the erased element, meaning the loop iterator 'it' can survive and reach the end of the loop, triggering the post-loop dereference.
Potential Steps to Reproduce
Note: These are potential steps based on code analysis; our tooling does not currently have the capability to run code to confirm with a proof of concept.
- Load a page that triggers accelerated scrolling or CSS transformations so that
global_state_.tree_priority == SMOOTHNESS_TAKES_PRIORITYis active. - Force a layout/scale update on the pending tree that will cause active-tree tilings to be replaced upon activation.
- Arrange for two active-tree tiles (
Tile AandTile B) to be inpending_gpu_work_tiles_withrequired_for_drawset totrue. - Trigger the completion of
Tile B's rasterization so it is ready, whileTile Aremains incomplete. - Wait for the
signals_check_notifier_posted task to fireCheckPendingGpuWorkAndIssueSignals. - The loop visits
Tile Afirst, caching itsresource_address inrequired_for_draw. - The loop visits
Tile B, callingNotifyTileStateChangedwithset_needs_redraw=true. - The scheduler synchronously runs and executes
ACTIVATE_SYNC_TREE, causing the destruction ofTile A's tiling and freeingTile A's memory. - The loop finishes, and
SetReadyToDrawCallbackdereferences the dangling pointer toTile A's resource, causing a Use-After-Free.
Suggested Fix
To prevent re-entrancy and potential UAF, defer the redraw notifications until after the loop has completed. This is the exact pattern already applied in the sibling MarkTilesOutOfMemory loop:
// Pass set_needs_redraw = false inside the loop
if (global_state_.tree_priority != SMOOTHNESS_TAKES_PRIORITY ||
raster_buffer_provider_->IsResourceReadyToDraw(resource)) {
tile->draw_info().set_resource_ready_for_draw();
client_->NotifyTileStateChanged(tile, /*update_damage=*/true,
/*set_needs_redraw=*/false);
it = pending_gpu_work_tiles_.erase(it);
has_ready_tiles_for_redraw = true;
continue;
}
// Trigger SetNeedsRedraw synchronously once the loop has safely finished and stack vectors are processed
if (has_ready_tiles_for_redraw) {
client_->SetNeedsRedraw(/*animation_only=*/false, /*skip_if_inside_draw=*/true);
}
Evaluated with Chrome root at commit: b5b015ea5f690560237d1f0cff1405844cd12b8d
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 a re-entrancy hazard: a synchronous callback inside the loop can run scheduler actions that destroy tiles whose resource addresses were already stored in local vectors, leaving dangling pointers.
Impact
A crafted page could potentially trigger a use-after-free in the renderer, which may lead to a crash or memory corruption; the report notes MiraclePtr does not protect this path, but no exploit was demonstrated.
What the attacker needed
Victim loads a crafted page; accelerated scrolling or CSS transforms; pending tree ready for activation
The fix
The redraw notification should be deferred until after the loop finishes, matching the pattern already used in the sibling out-of-memory loop.
How it was found
- Load a page that triggers accelerated scrolling or CSS transformations so smoothness priority is active.
- Force a layout or scale update on the pending tree so active-tree tilings will be replaced on activation.
- Arrange for two active-tree tiles to be pending GPU work with required_for_draw set.
- Trigger completion of the second tile's rasterisation while the first remains incomplete.
- Wait for the posted signals check task to run the pending GPU work loop.
- The loop caches the first tile's resource address, then the second tile's notification synchronously activates the new tree, freeing the first tile before the post-loop dereference.
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.
When a web page is drawn, the browser breaks it into small image pieces called tiles and keeps track of them in memory. This report says the code saved the memory addresses of some tiles, then did something that could delete those tiles, and later used the saved addresses again. Using memory after it has been freed is called a use-after-free and can crash the browser or, in the worst case, let an attacker run their own code.
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.