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

Use after free in ViewTransitions (CVE-2026-11646)

A use-after-poison occurs in Blink's ViewTransitionSupplement::OnTransitionCaptured because a JavaScript callback invoked during iteration can re-enter the function and clear the container being iterated. An attacker could trigger heap corruption in the renderer from any web page, potentially leading to code execution within the renderer sandbox.

Quac Tran Follow

Originally disclosed on Chrome VRP

Bounty$500 High View original
  • Fix shipped in 13 days

Report description

use-after-poison in ViewTransitionSupplement::OnTransitionCaptured


Bug location

Where do you want to report your vulnerability?

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

Which URL (or repository) have you found the vulnerability in?

Blink > ViewTransition


The problem

Please describe the technical details of the vulnerability

VULNERABILITY DETAILS

Type: use-after-poison (cppgc heap) / container invalidation during iteration Component: Blink > ViewTransition Affected file: third_party/blink/renderer/core/view_transition/view_transition_supplement.cc Affected function: ViewTransitionSupplement::OnTransitionCaptured (line 346-357) Version: Chromium 150.0.7847.0 (commit f3ab90db77d) Process: Renderer MiraclePtr: NOT PROTECTED (cppgc/Oilpan heap, not PartitionAlloc) User interaction: Print dialog appears; triggers regardless of user choice (cancel/close/print)

Variant of: The $50K LayerTreeHost::NotifyTransitionRequestsFinished UAF (fixed by CL 6542846). Same bug class — nested RunLoop re-entrancy causing container invalidation during iteration. The cc-level fix (PostTask) does not prevent the blink-level re-entrancy.

Root Cause Analysis

OnTransitionCaptured() iterates captured_transitions_ (a HeapVector<Member<ViewTransition>>) using a range-for loop. For each transition it calls OnCapturePhaseComplete(), which synchronously invokes a JavaScript callback via ViewTransition::ProcessCurrentState() -> DOMViewTransition::InvokeDOMChangeCallback() -> V8ViewTransitionCallback::Invoke().

If the JS callback triggers window.print(), the print preview path creates a nested RunLoop (base::RunLoop{kNestableTasksAllowed} at print_render_frame_helper.cc:2702). This nested RunLoop processes pending tasks, including compositor-originated BeginMainFrame tasks that run a full lifecycle update.

During the lifecycle update inside the nested RunLoop, newly created view transitions advance through their state machines (kCaptureTagDiscovery -> kCaptureRequestPending -> kCapturing), generating capture requests that are committed to the compositor. The compositor processes these immediately (due to kDelayLayerTreeViewDeletionOnLocalSwap, which is FEATURE_ENABLED_BY_DEFAULT) and posts completion callbacks back to the main thread.

These callbacks are processed during the same nested RunLoop, calling OnTransitionCaptured() re-entrantly. The re-entrant call executes captured_transitions_.clear() (line 356), which poisons the cppgc-managed HeapVector backing store. When the outer OnTransitionCaptured() resumes its range-for loop, it dereferences a Member<ViewTransition> pointer into poisoned memory.

The developers were aware of this re-entrancy risk. The same file contains ForEachTransition() (line 388-398) with the explicit comment: "Local copy of the list, since the function may modify the transition map." However, OnTransitionCaptured() has no such protection.

Vulnerable Code

C++
// view_transition_supplement.cc:346-357
void ViewTransitionSupplement::OnTransitionCaptured(ViewTransition* transition) {
  CHECK(transition);
  captured_transitions_.push_back(transition);           // [1]
  if (--in_flight_capture_requests_ == 0) {
    std::sort(captured_transitions_.begin(), ...);
    for (auto captured_transition : captured_transitions_) {  // [2] range-for
      captured_transition->OnCapturePhaseComplete();          // [3] -> JS -> print()
    }                                                         //     -> nested RunLoop
    captured_transitions_.clear();                            // [4] poisons memory
  }                                                           //     re-entrant [4]
}                                                             //     invalidates [2]

Compare with the protected pattern in the same file:

C++
// view_transition_supplement.cc:388-398
void ViewTransitionSupplement::ForEachTransition(...) {
  // Local copy of the list, since the function may modify the transition map.
  HeapVector<Member<ViewTransition>> transitions;  // <-- local copy, SAFE
  // ... populate from element_transitions_ ...
  for (auto transition : transitions) {
    function(*transition);
  }
}

Reproduction Steps

chrome --no-sandbox --user-data-dir=/tmp/test poc.html

Close/cancel/interact with the print dialog that appears. The crash triggers regardless of user choice.

Note: --headless will NOT work. The nested RunLoop only exists in the print preview path (RequestPrintPreview), which is disabled when IsPrintPreviewEnabled() returns false in headless mode.

Trigger Chain

1. JS: 4x element.startViewTransition(callback)
   -> in_flight_capture_requests_ = 4
   -> 4 transitions enter kCapturing state

2. Compositor processes all 4 captures -> 4 PostTask'd callbacks fire sequentially:
   OnTransitionCaptured(A) -> push_back, counter 4->3
   OnTransitionCaptured(B) -> push_back, counter 3->2
   OnTransitionCaptured(C) -> push_back, counter 2->1
   OnTransitionCaptured(D) -> push_back, counter 1->0 -> ENTERS LOOP

3. Loop: OnCapturePhaseComplete(first) -> ProcessCurrentState() -> kCaptured
   -> InvokeDOMChangeCallback() -> V8 callback RUNS SYNCHRONOUSLY

4. JS callback:
   a. element5.startViewTransition(cb5)  -> in_flight_capture_requests_ = 1
      element6.startViewTransition(cb6)  -> in_flight_capture_requests_ = 2
   b. window.print()
      -> ScriptedPrint -> RequestPrintPreview(kScripted)
      -> base::RunLoop{kNestableTasksAllowed}.Run()  [line 2702]

5. DURING NESTED RUNLOOP:
   - BeginMainFrame -> lifecycle update -> RunViewTransitionStepsDuringMainFrame
   - Transitions E,F advance: kCaptureTagDiscovery -> kCapturing
   - PushPaintArtifactToCompositor -> capture requests committed
   - Impl processes captures immediately (kDelayLayerTreeViewDeletionOnLocalSwap)
   - PostTask chain: impl -> NotifyTransitionRequestsFinished [PostTask] -> callback

6. RE-ENTRANT OnTransitionCaptured(E): push_back(E), counter 2->1
   RE-ENTRANT OnTransitionCaptured(F): push_back(F), counter 1->0
   -> ENTERS INNER LOOP
   -> inner loop iterates captured_transitions_ [A,B,C,D,E,F]
   -> captured_transitions_.clear()  <<<--- POISONS MEMORY

7. Outer loop resumes -> dereferences Member<> into POISONED memory -> CRASH

Prerequisites (all enabled by default)

  • ScopedViewTransitions: runtime feature, status: "stable"
  • kDelayLayerTreeViewDeletionOnLocalSwap: FEATURE_ENABLED_BY_DEFAULT
  • No special flags required

ASAN Report

==424011==ERROR: AddressSanitizer: use-after-poison on address 0x7edc02142c2c
READ of size 4 at 0x7edc02142c2c thread T0 (chrome)
    #0 in blink::ViewTransitionSupplement::OnTransitionCaptured
       v8/include/cppgc/member.h:59:55

Address 0x7edc02142c2c is a wild pointer inside of access range of size 0x000000000004.
SUMMARY: AddressSanitizer: use-after-poison v8/include/cppgc/member.h:59:55
         in blink::ViewTransitionSupplement::OnTransitionCaptured

Shadow byte: f7 (Poisoned by user)

Task trace:
    #0 cc::LayerTreeHost::NotifyTransitionRequestsFinished  cc/trees/layer_tree_host.cc:605
    #1 cc::ProxyImpl::NotifyTransitionRequestFinished       cc/trees/proxy_impl.cc:648

Suggested Fix

Make a local copy before iterating, matching the existing ForEachTransition pattern:

C++
void ViewTransitionSupplement::OnTransitionCaptured(ViewTransition* transition) {
  CHECK(transition);
  captured_transitions_.push_back(transition);
  if (--in_flight_capture_requests_ == 0) {
    std::sort(captured_transitions_.begin(), captured_transitions_.end(),
              CompareTransitions);
    // Local copy to prevent re-entrancy from invalidating the iteration.
    HeapVector<Member<ViewTransition>> local_copy(captured_transitions_);
    captured_transitions_.clear();
    for (auto captured_transition : local_copy) {
      captured_transition->OnCapturePhaseComplete();
    }
  }
}

Files

  • poc.html — Reproduction HTML
  • asan.txt — Full ASAN report from Chromium 150.0.7847.0

Impact analysis

Security Impact

Severity: High (Renderer Process Heap Corruption)

Primitive: use-after-poison on cppgc HeapVector backing store. After captured_transitions_.clear() poisons the memory, the outer loop dereferences Member<ViewTransition> pointers into attacker-influenced heap space. Because cppgc recycles backing store pages, a well-timed allocation between the inner clear() and the outer loop resumption can place attacker-controlled data at the poisoned address — converting the use-after-poison into a controlled read/write on a fake ViewTransition object.

MiraclePtr / BackupRefPtr: NOT PROTECTED. The HeapVector<Member<ViewTransition>> lives on the cppgc (Oilpan) managed heap, which is entirely outside PartitionAlloc's MiraclePtr coverage. There is no dangling pointer detection or use-after-free mitigation for this object type.

Exploitation path:

  1. Heap spray during nested RunLoop: The nested RunLoop created by window.print() stays open for seconds (waiting for user interaction with print dialog). During this window, the attacker's JS callback can allocate arbitrary objects (ArrayBuffers, strings, TypedArrays) via the same cppgc allocator to reclaim the freed backing store.
  2. Type confusion via fake Member<>: When the outer loop dereferences the reclaimed memory as a Member<ViewTransition>, the attacker controls the vtable pointer. Calling OnCapturePhaseComplete() on a fake object gives arbitrary virtual call — a standard vtable hijack primitive.
  3. RCE in renderer: Arbitrary virtual call → stack pivot → ROP/JOP chain → arbitrary code execution within the renderer process sandbox.

Attack surface:

  • Triggered from any web page via standard DOM APIs (element.startViewTransition() + window.print())
  • No special permissions, flags, or user gestures required beyond the print dialog appearing
  • All prerequisites enabled by default in stable Chrome (ScopedViewTransitions: "stable", kDelayLayerTreeViewDeletionOnLocalSwap: FEATURE_ENABLED_BY_DEFAULT)
  • Works on all desktop platforms with print preview (Linux, Windows, macOS, ChromeOS)

User interaction: Minimal. The window.print() call opens a print dialog, but the UAF triggers regardless of user choice (cancel, close, or print). A phishing page could social-engineer the user with "Please print this receipt" to make the dialog appear expected. The corruption occurs during the nested RunLoop — before the user interacts with the dialog.

Scope: Renderer process only. Full exploitation requires combining with a sandbox escape for system-level impact. However, renderer-process RCE alone enables:

  • Reading all cross-site data in the renderer (cookies, passwords in autofill, DOM content)
  • Bypassing Site Isolation within the compromised renderer
  • Serving as the first stage of a full exploit chain (renderer RCE → sandbox escape → system compromise)

The cause

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

Chromium 150.0.7847.0 (commit f3ab90db77d)

Is the security issue related to a crash?

Yes, it is related to a crash.

Choose the type of vulnerability

Memory Corruption

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

Quac Tran

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

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 9 min read.

Context

This is a Chrome VRP report against the Blink rendering engine, specifically the View Transitions feature. View Transitions let a page call element.startViewTransition(callback) to animate between two DOM states: the browser captures the old state, runs the page's callback to mutate the DOM, captures the new state, and animates between the two. The capture work is coordinated by ViewTransitionSupplement, which tracks in-flight capture requests and, once all of them have completed, advances each transition to its next phase.

The bug is a use-after-poison on the cppgc (Oilpan) heap in ViewTransitionSupplement::OnTransitionCaptured, in third_party/blink/renderer/core/view_transition/view_transition_supplement.cc (lines 346-357). The researcher describes it as a container invalidation during iteration, triggered by re-entrancy through a nested RunLoop opened by the print preview path. It is reported as a variant of an earlier LayerTreeHost::NotifyTransitionRequestsFinished use-after-free (fixed by CL 6542846), which was addressed at the cc level with a PostTask; that fix does not prevent the Blink-level re-entrancy described here.

Setup

  • Target: Chrome browser, Blink > ViewTransition.
  • Version: Chromium 150.0.7847.0 (commit f3ab90db77d).
  • Process: Renderer.
  • Memory protection: the object lives on the cppgc/Oilpan heap, so MiraclePtr (PartitionAlloc) does not cover it. The report marks it NOT PROTECTED.
  • Prerequisites, all enabled by default: the ScopedViewTransitions runtime feature has status "stable", and kDelayLayerTreeViewDeletionOnLocalSwap is FEATURE_ENABLED_BY_DEFAULT. No special flags are required.
  • User interaction: a print dialog appears, and the crash triggers regardless of the user's choice (cancel, close or print).
  • Headless does not work: the nested RunLoop only exists in the print preview path (RequestPrintPreview), which is disabled when IsPrintPreviewEnabled() returns false in headless mode.

The report ships two files: poc.html (reproduction HTML) and asan.txt (full ASAN report from Chromium 150.0.7847.0).

Finding it

The researcher noticed that OnTransitionCaptured() iterates captured_transitions_, a HeapVector<Member<ViewTransition>>, with a range-for loop, and that each iteration calls OnCapturePhaseComplete(). That call synchronously invokes a JavaScript callback through ViewTransition::ProcessCurrentState() -> DOMViewTransition::InvokeDOMChangeCallback() -> V8ViewTransitionCallback::Invoke(). If that callback calls window.print(), the print preview path creates a nested RunLoop (base::RunLoop{kNestableTasksAllowed} at print_render_frame_helper.cc:2702), which processes pending tasks, including compositor-originated BeginMainFrame tasks that run a full lifecycle update.

During that lifecycle update, newly created view transitions advance through their state machines (kCaptureTagDiscovery -> kCaptureRequestPending -> kCapturing), generating capture requests that are committed to the compositor. The compositor processes them immediately (because of kDelayLayerTreeViewDeletionOnLocalSwap) and posts completion callbacks back to the main thread. Those callbacks are processed in the same nested RunLoop, calling OnTransitionCaptured() re-entrantly. The re-entrant call runs captured_transitions_.clear() (line 356), which poisons the cppgc-managed backing store. When the outer loop resumes, it dereferences a Member<ViewTransition> pointer into poisoned memory.

The researcher also points out that the developers were aware of this re-entrancy risk: the same file contains ForEachTransition() (lines 388-398) with the explicit comment "Local copy of the list, since the function may modify the transition map." OnTransitionCaptured() has no such protection.

Exploitation

Step 1: launch the PoC

Text
chrome --no-sandbox --user-data-dir=/tmp/test poc.html

This starts Chrome with the given profile directory and loads the reproduction page. Close, cancel or otherwise interact with the print dialog that appears; the crash triggers regardless of the user's choice. As noted above, --headless will not work because the nested RunLoop only exists in the print preview path.

Step 2: understand the trigger chain

The report lays out the full sequence:

Text
1. JS: 4x element.startViewTransition(callback)
   -> in_flight_capture_requests_ = 4
   -> 4 transitions enter kCapturing state

2. Compositor processes all 4 captures -> 4 PostTask'd callbacks fire sequentially:
   OnTransitionCaptured(A) -> push_back, counter 4->3
   OnTransitionCaptured(B) -> push_back, counter 3->2
   OnTransitionCaptured(C) -> push_back, counter 2->1
   OnTransitionCaptured(D) -> push_back, counter 1->0 -> ENTERS LOOP

3. Loop: OnCapturePhaseComplete(first) -> ProcessCurrentState() -> kCaptured
   -> InvokeDOMChangeCallback() -> V8 callback RUNS SYNCHRONOUSLY

4. JS callback:
   a. element5.startViewTransition(cb5)  -> in_flight_capture_requests_ = 1
      element6.startViewTransition(cb6)  -> in_flight_capture_requests_ = 2
   b. window.print()
      -> ScriptedPrint -> RequestPrintPreview(kScripted)
      -> base::RunLoop{kNestableTasksAllowed}.Run()  [line 2702]

5. DURING NESTED RUNLOOP:
   - BeginMainFrame -> lifecycle update -> RunViewTransitionStepsDuringMainFrame
   - Transitions E,F advance: kCaptureTagDiscovery -> kCapturing
   - PushPaintArtifactToCompositor -> capture requests committed
   - Impl processes captures immediately (kDelayLayerTreeViewDeletionOnLocalSwap)
   - PostTask chain: impl -> NotifyTransitionRequestsFinished [PostTask] -> callback

6. RE-ENTRANT OnTransitionCaptured(E): push_back(E), counter 2->1
   RE-ENTRANT OnTransitionCaptured(F): push_back(F), counter 1->0
   -> ENTERS INNER LOOP
   -> inner loop iterates captured_transitions_ [A,B,C,D,E,F]
   -> captured_transitions_.clear()  <<<--- POISONS MEMORY

7. Outer loop resumes -> dereferences Member<> into POISONED memory -> CRASH

The key points: the counter in_flight_capture_requests_ is decremented on every capture completion, and the loop only starts when it reaches zero. The JS callback runs synchronously inside that loop, so anything it does happens while the outer loop is still iterating. Starting two more transitions inside the callback raises the counter again, and window.print() opens the nested RunLoop that lets those new transitions complete and re-enter OnTransitionCaptured() before the outer loop has finished. The inner invocation drains the counter to zero, enters its own loop, and calls captured_transitions_.clear(), poisoning the backing store the outer loop is still walking.

Step 3: the vulnerable code

C++
// view_transition_supplement.cc:346-357
void ViewTransitionSupplement::OnTransitionCaptured(ViewTransition* transition) {
  CHECK(transition);
  captured_transitions_.push_back(transition);           // [1]
  if (--in_flight_capture_requests_ == 0) {
    std::sort(captured_transitions_.begin(), ...);
    for (auto captured_transition : captured_transitions_) {  // [2] range-for
      captured_transition->OnCapturePhaseComplete();          // [3] -> JS -> print()
    }                                                         //     -> nested RunLoop
    captured_transitions_.clear();                            // [4] poisons memory
  }                                                           //     re-entrant [4]
}                                                             //     invalidates [2]

[1] appends the completed transition. [2] is the range-for over the heap vector. [3] is the synchronous call into JavaScript. [4] is the clear() that poisons the backing store; when it runs re-entrantly, it invalidates the iterator the outer [2] is using.

Step 4: the ASAN evidence

Text
==424011==ERROR: AddressSanitizer: use-after-poison on address 0x7edc02142c2c
READ of size 4 at 0x7edc02142c2c thread T0 (chrome)
    #0 in blink::ViewTransitionSupplement::OnTransitionCaptured
       v8/include/cppgc/member.h:59:55

Address 0x7edc02142c2c is a wild pointer inside of access range of size 0x000000000004.
SUMMARY: AddressSanitizer: use-after-poison v8/include/cppgc/member.h:59:55
         in blink::ViewTransitionSupplement::OnTransitionCaptured

Shadow byte: f7 (Poisoned by user)

Task trace:
    #0 cc::LayerTreeHost::NotifyTransitionRequestsFinished  cc/trees/layer_tree_host.cc:605
    #1 cc::ProxyImpl::NotifyTransitionRequestFinished       cc/trees/proxy_impl.cc:648

The faulting read is a 4-byte load through cppgc::Member inside OnTransitionCaptured, and the shadow byte f7 marks the memory as poisoned by the user. The task trace shows the call arriving from LayerTreeHost::NotifyTransitionRequestsFinished via ProxyImpl::NotifyTransitionRequestFinished, matching the compositor callback path in the trigger chain.

Root cause

OnTransitionCaptured() iterates a HeapVector<Member<ViewTransition>> while calling into code that can synchronously run JavaScript, and that JavaScript can open a nested RunLoop (through window.print() and the print preview path). The nested loop lets new capture completions arrive and re-enter OnTransitionCaptured(), which calls captured_transitions_.clear() and poisons the cppgc backing store. The outer range-for then dereferences a Member<ViewTransition> into poisoned memory.

The existing defence against this class of bug is the local-copy pattern already used in ForEachTransition() in the same file, but OnTransitionCaptured() does not use it. The earlier cc-level fix (a PostTask in CL 6542846) does not help, because the re-entrancy here happens at the Blink level. MiraclePtr does not apply either: the vector lives on the cppgc/Oilpan heap, outside PartitionAlloc's coverage, so there is no dangling pointer detection or use-after-free mitigation for this object type.

Impact

The report rates this High: renderer process heap corruption. The primitive is a use-after-poison on the cppgc HeapVector backing store. After captured_transitions_.clear() poisons the memory, the outer loop dereferences Member<ViewTransition> pointers into attacker-influenced heap space. Because cppgc recycles backing store pages, a well-timed allocation between the inner clear() and the outer loop resumption can place attacker-controlled data at the poisoned address, which the researcher says converts the use-after-poison into a controlled read/write on a fake ViewTransition object.

The suggested exploitation path, as described in the report:

  1. Heap spray during the nested RunLoop: the loop created by window.print() stays open for seconds while waiting for user interaction with the print dialog. During that window the attacker's JS callback can allocate arbitrary objects (ArrayBuffers, strings, TypedArrays) via the same cppgc allocator to reclaim the freed backing store.
  2. Type confusion via a fake Member<>: when the outer loop dereferences the reclaimed memory as a Member<ViewTransition>, the attacker controls the vtable pointer. Calling OnCapturePhaseComplete() on a fake object gives an arbitrary virtual call, a standard vtable hijack primitive.
  3. RCE in the renderer: arbitrary virtual call, then stack pivot, then a ROP/JOP chain, then arbitrary code execution within the renderer process sandbox.

Attack surface, per the report:

  • Triggered from any web page via standard DOM APIs (element.startViewTransition() plus window.print()).
  • No special permissions, flags or user gestures are required beyond the print dialog appearing.
  • All prerequisites are enabled by default in stable Chrome (ScopedViewTransitions: "stable", kDelayLayerTreeViewDeletionOnLocalSwap: FEATURE_ENABLED_BY_DEFAULT).
  • Works on all desktop platforms with print preview (Linux, Windows, macOS, ChromeOS).

User interaction is minimal: window.print() opens a print dialog, but the use-after-free triggers regardless of what the user chooses (cancel, close or print). The report notes that a phishing page could social-engineer the user with "Please print this receipt" to make the dialog appear expected, and that the corruption occurs during the nested RunLoop, before the user interacts with the dialog.

Scope is the renderer process only. Full exploitation requires combining this with a sandbox escape for system-level impact. Renderer-process RCE alone, the report argues, enables reading all cross-site data in the renderer (cookies, passwords in autofill, DOM content), bypassing Site Isolation within the compromised renderer, and serving as the first stage of a full exploit chain (renderer RCE, sandbox escape, system compromise).

Fix

The report proposes making a local copy before iterating, matching the existing ForEachTransition pattern:

C++
void ViewTransitionSupplement::OnTransitionCaptured(ViewTransition* transition) {
  CHECK(transition);
  captured_transitions_.push_back(transition);
  if (--in_flight_capture_requests_ == 0) {
    std::sort(captured_transitions_.begin(), captured_transitions_.end(),
              CompareTransitions);
    // Local copy to prevent re-entrancy from invalidating the iteration.
    HeapVector<Member<ViewTransition>> local_copy(captured_transitions_);
    captured_transitions_.clear();
    for (auto captured_transition : local_copy) {
      captured_transition->OnCapturePhaseComplete();
    }
  }
}

The proposed change clears the shared vector before the loop starts and walks a private copy instead.

Variants to test

  • Other synchronous JS callbacks inside container iteration. Look for loops over heap containers in Blink that call into V8 synchronously and then mutate or clear the same container. A positive result is an ASAN use-after-poison or use-after-free whose task trace shows a re-entrant call arriving from a compositor or other posted callback while the outer loop is still running.
  • Other nested RunLoop entry points. window.print() is one way to pump tasks from inside a callback; modal dialogs and other synchronous UI paths may do the same. A positive result is a crash that disappears when the nested loop is removed or when the callback is deferred.
  • The same pattern in other transition phases. OnTransitionCaptured is one phase; check whether the other phase-completion handlers iterate shared state while invoking page callbacks. A positive result is the same poisoned-shadow-byte signature in a sibling function.
  • Counter-based batching. Any code that decrements an in-flight counter and enters a loop at zero is a candidate, because a callback that starts new work can push the counter back up and re-enter. A positive result is a re-entrant entry into the same loop before the outer one finishes.
  • cppgc containers holding Member<>. Because MiraclePtr does not cover the Oilpan heap, any such container that is cleared during iteration is worth checking. A positive result is a faulting read through cppgc/member.h in the ASAN stack.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 29 min read.

What happened, in plain words

A security researcher found a bug in Google Chrome, the web browser. The bug lives in a part of Chrome called Blink, which is the engine that turns the HTML, CSS and JavaScript of a web page into what you see on screen. Inside Blink there is a feature called View Transitions, which lets a website animate smoothly from one look to another, for example sliding an image from a thumbnail into a full-size picture.

The bug is a memory safety problem. In simple terms, Chrome keeps a list of things it is working on in a small area of memory. While Chrome is walking through that list, a web page can make Chrome run some of the page's own code in the middle of the walk. That code can open a print dialog, and the print dialog makes Chrome pause and do other pending work. That other work ends up emptying the very list Chrome was walking through. When Chrome goes back to its walk, it reads from memory that has been deliberately marked as unusable, and it crashes. The researcher argues that, in principle, an attacker could use that moment to take control of the renderer process.

The researcher reported it through Google's Chrome Vulnerability Reward Program (VRP), a scheme that pays people for finding and reporting security bugs. The report describes the issue as High severity renderer heap corruption. The researcher is credited as Quac Tran.

Before going further, a few words on the vocabulary you will meet throughout, because the rest of this article uses it constantly.

  • API stands for Application Programming Interface. It is a set of commands a program offers so that other code can ask it to do things. Think of a restaurant menu: you do not go into the kitchen, you order from the menu. A browser API is the menu a web page uses to ask the browser to do something, like start an animation or open a print dialog.
  • DOM stands for Document Object Model. It is the browser's in-memory tree of everything on the page: each heading, paragraph, image and button is a node in that tree. When JavaScript changes the page, it is changing the DOM.
  • JavaScript is the programming language web pages run inside the browser. It is what makes pages interactive.
  • Renderer process is the separate, sandboxed program that Chrome starts for a web page. Chrome splits itself into many processes so that a crash or attack on one page does not automatically take down the whole browser. The renderer is where page code runs.
  • Sandbox is the fence around a process. Even if an attacker gets code running inside the renderer, the sandbox is supposed to stop that code from reading your files or taking over the operating system.
  • Heap is the region of memory a program uses for objects it creates while running, as opposed to the small fixed slots used for simple local variables. When you hear "heap corruption", it means the bookkeeping of that region has been damaged.
  • Use-after-free and use-after-poison are two names for closely related mistakes. Use-after-free means the program keeps using a piece of memory after it has handed it back (freed it). Use-after-poison is the same idea in a debugging build: the memory is not truly returned to the system, it is filled with a special marker value (poison) so that any later read or write is caught immediately. The bug here is a use-after-poison.
  • ASAN stands for AddressSanitizer. It is a tool built into a special debugging version of a program that watches every memory access and shouts loudly the moment one is wrong. Security researchers use it to prove a bug is real.
  • CVE is a public catalogue number for a known security vulnerability.

Context

This is a Chrome VRP report against the Blink rendering engine, specifically the View Transitions feature. View Transitions let a page call element.startViewTransition(callback) to animate between two DOM states: the browser captures the old state, runs the page's callback to mutate the DOM, captures the new state, and animates between the two. The capture work is coordinated by ViewTransitionSupplement, which tracks in-flight capture requests and, once all of them have completed, advances each transition to its next phase.

Let us unpack that paragraph, because it is dense.

A view transition is the smooth animation you sometimes see when a website changes layout. The page asks for it with a function called startViewTransition, and hands it a callback: a piece of the page's own JavaScript that the browser promises to run at the right moment. The browser's job is roughly: take a picture of how the page looks now (the "old state"), run your callback so you can rearrange the page, take a picture of the new look, then blend between the two pictures. Each of those pictures is called a capture.

Because a page can start several transitions at once, Chrome needs a little bookkeeper to keep track. That bookkeeper is ViewTransitionSupplement. It keeps a counter of how many captures are still outstanding ("in flight"). Every time one capture finishes, the counter goes down by one. When the counter reaches zero, all captures are done, and the bookkeeper moves each transition on to its next phase.

The bug is a use-after-poison on the cppgc (Oilpan) heap in ViewTransitionSupplement::OnTransitionCaptured, in third_party/blink/renderer/core/view_transition/view_transition_supplement.cc (lines 346-357). The researcher describes it as a container invalidation during iteration, triggered by re-entrancy through a nested RunLoop opened by the print preview path. It is reported as a variant of an earlier LayerTreeHost::NotifyTransitionRequestsFinished use-after-free (fixed by CL 6542846), which was addressed at the cc level with a PostTask; that fix does not prevent the Blink-level re-entrancy described here.

A few more terms from that paragraph:

  • cppgc / Oilpan is Chrome's garbage collector for certain objects. A garbage collector is a memory manager that automatically reclaims objects the program no longer needs, so programmers do not have to free them by hand. Oilpan is the name of Chrome's collector for Blink objects.
  • Container invalidation during iteration is the core mistake. Imagine reading names off a list pinned to a noticeboard while a colleague is allowed to tear the list down and pin up a new one. You keep reading from where you were, but the paper is gone. In programming, "iterating" means walking through a collection item by item; "invalidating" means changing the collection so that the walk is no longer valid.
  • Re-entrancy means a function gets called again while an earlier call to the same function is still running. Like a phone call that interrupts you mid-sentence, and the new caller starts giving you instructions before you have finished the first conversation.
  • RunLoop is the browser's main work loop. It repeatedly picks up queued tasks and runs them. A nested RunLoop is a second loop started from inside the first, so tasks that were waiting get processed before the outer loop resumes. This is exactly the mechanism that lets the page's code run in the middle of Chrome's own bookkeeping.
  • cc is Chrome's compositor layer, the part that assembles the final picture from pieces and hands it to the graphics system. A PostTask is a way of saying "run this function later, on the task queue", instead of running it immediately. The earlier fix used a PostTask to defer work; the researcher's point is that this does not help when the problem is at the Blink level.

Setup

  • Target: Chrome browser, Blink > ViewTransition.
  • Version: Chromium 150.0.7847.0 (commit f3ab90db77d).
  • Process: Renderer.
  • Memory protection: the object lives on the cppgc/Oilpan heap, so MiraclePtr (PartitionAlloc) does not cover it. The report marks it NOT PROTECTED.
  • Prerequisites, all enabled by default: the ScopedViewTransitions runtime feature has status "stable", and kDelayLayerTreeViewDeletionOnLocalSwap is FEATURE_ENABLED_BY_DEFAULT. No special flags are required.
  • User interaction: a print dialog appears, and the crash triggers regardless of the user's choice (cancel, close or print).
  • Headless does not work: the nested RunLoop only exists in the print preview path (RequestPrintPreview), which is disabled when IsPrintPreviewEnabled() returns false in headless mode.

The report ships two files: poc.html (reproduction HTML) and asan.txt (full ASAN report from Chromium 150.0.7847.0).

What the setup section is telling us, in plain terms:

  • Version and commit identify the exact build of Chrome the researcher tested. A commit is a saved snapshot in the source code history, like a version number for the code itself.
  • MiraclePtr and PartitionAlloc are Chrome's general-purpose memory protections. PartitionAlloc is the allocator, the component that hands out chunks of memory. MiraclePtr is a safety net that detects when a pointer is used after its object was freed. The report says this object is not covered by that net, because it lives on a different heap (Oilpan). So the usual safety net is absent.
  • Runtime feature means a feature that can be switched on or off inside a running browser. ScopedViewTransitions is the switch for view transitions, and its status is "stable", meaning it is on for ordinary users.
  • FEATURE_ENABLED_BY_DEFAULT is a label meaning the feature is on unless someone deliberately turns it off. kDelayLayerTreeViewDeletionOnLocalSwap is one such feature, and it matters because it makes the compositor process capture requests immediately.
  • Headless mode is Chrome running with no visible window, used by servers and automated tests. The report warns that the bug will not reproduce there, because the print preview path, and therefore the nested RunLoop, does not exist in headless mode. This is a useful hint for anyone trying to reproduce: you need a real, visible browser.

Finding it

The researcher noticed that OnTransitionCaptured() iterates captured_transitions_, a HeapVector<Member<ViewTransition>>, with a range-for loop, and that each iteration calls OnCapturePhaseComplete(). That call synchronously invokes a JavaScript callback through ViewTransition::ProcessCurrentState() -> DOMViewTransition::InvokeDOMChangeCallback() -> V8ViewTransitionCallback::Invoke(). If that callback calls window.print(), the print preview path creates a nested RunLoop (base::RunLoop{kNestableTasksAllowed} at print_render_frame_helper.cc:2702), which processes pending tasks, including compositor-originated BeginMainFrame tasks that run a full lifecycle update.

During that lifecycle update, newly created view transitions advance through their state machines (kCaptureTagDiscovery -> kCaptureRequestPending -> kCapturing), generating capture requests that are committed to the compositor. The compositor processes them immediately (because of kDelayLayerTreeViewDeletionOnLocalSwap) and posts completion callbacks back to the main thread. Those callbacks are processed in the same nested RunLoop, calling OnTransitionCaptured() re-entrantly. The re-entrant call runs captured_transitions_.clear() (line 356), which poisons the cppgc-managed backing store. When the outer loop resumes, it dereferences a Member<ViewTransition> pointer into poisoned memory.

The researcher also points out that the developers were aware of this re-entrancy risk: the same file contains ForEachTransition() (lines 388-398) with the explicit comment "Local copy of the list, since the function may modify the transition map." OnTransitionCaptured() has no such protection.

This is the heart of the report, so let us walk through it slowly.

  1. The list. captured_transitions_ is a HeapVector, which is simply a growable list stored on the heap. Each entry is a Member<ViewTransition>, which is a special kind of pointer that the garbage collector understands and keeps track of. Think of Member as a labelled string tied to an object, so the collector knows not to throw the object away while the string is attached.
  2. The walk. A range-for loop is a compact way of saying "for each item in this list, do something". The loop here calls OnCapturePhaseComplete() on each transition.
  3. The jump into page code. OnCapturePhaseComplete() does not just do internal work. It ends up calling the page's JavaScript callback, synchronously. Synchronously means "right now, before anything else happens". The chain is ViewTransition::ProcessCurrentState() -> DOMViewTransition::InvokeDOMChangeCallback() -> V8ViewTransitionCallback::Invoke(). V8 is Chrome's JavaScript engine, the part that actually runs page scripts.
  4. The print dialog. If the page's callback calls window.print(), Chrome opens the print preview. That path starts a nested RunLoop, a second work loop inside the first. The nested loop picks up tasks that were waiting, including a BeginMainFrame task from the compositor.
  5. New transitions sneak in. During that update, any newly created view transitions move forward through their internal stages, called a state machine: kCaptureTagDiscovery -> kCaptureRequestPending -> kCapturing. A state machine is just a set of stages an object moves through, one after another, like an order in a shop going from "placed" to "packed" to "shipped".
  6. The compositor answers back. The new capture requests are sent to the compositor, which processes them immediately because of kDelayLayerTreeViewDeletionOnLocalSwap, and posts completion callbacks back to the main thread. Those callbacks are handled inside the same nested RunLoop, so OnTransitionCaptured() is called again while the first call is still in the middle of its loop. That is the re-entrancy.
  7. The list is emptied. The inner call reaches captured_transitions_.clear() at line 356. clear() empties the list and marks its memory as poisoned. When the outer loop resumes, it tries to read the next entry from memory that is now poisoned. That is the use-after-poison.

The researcher's final observation is telling: the same source file already contains a function, ForEachTransition(), that does the safe thing. Its comment says "Local copy of the list, since the function may modify the transition map." In other words, the developers knew that walking a shared list while calling code that might change it is dangerous, and they protected one function but not the other.

Exploitation

Step 1: launch the PoC

Text
chrome --no-sandbox --user-data-dir=/tmp/test poc.html

This starts Chrome with a throwaway profile and loads the reproduction page. Close, cancel or otherwise interact with the print dialog that appears; the crash triggers regardless of the user's choice. As noted above, --headless will not work because the nested RunLoop only exists in the print preview path.

Line by line:

  • chrome is the browser program being started.
  • --no-sandbox tells Chrome to run without its sandbox. It is not something an attacker needs, and it is not part of the bug itself.
  • --user-data-dir=/tmp/test sets the profile directory Chrome uses. A profile is the folder where Chrome stores your personal data.
  • poc.html is the reproduction HTML file listed in the report. PoC stands for proof of concept: a small demonstration that the bug is real.

Why this step matters: the researcher needs a controlled, disposable browser to show the crash. The

Step 2: understand the trigger chain

The report lays out the full sequence:

Text
1. JS: 4x element.startViewTransition(callback)
   -> in_flight_capture_requests_ = 4
   -> 4 transitions enter kCapturing state

2. Compositor processes all 4 captures -> 4 PostTask'd callbacks fire sequentially:
   OnTransitionCaptured(A) -> push_back, counter 4->3
   OnTransitionCaptured(B) -> push_back, counter 3->2
   OnTransitionCaptured(C) -> push_back, counter 2->1
   OnTransitionCaptured(D) -> push_back, counter 1->0 -> ENTERS LOOP

3. Loop: OnCapturePhaseComplete(first) -> ProcessCurrentState() -> kCaptured
   -> InvokeDOMChangeCallback() -> V8 callback RUNS SYNCHRONOUSLY

4. JS callback:
   a. element5.startViewTransition(cb5)  -> in_flight_capture_requests_ = 1
      element6.startViewTransition(cb6)  -> in_flight_capture_requests_ = 2
   b. window.print()
      -> ScriptedPrint -> RequestPrintPreview(kScripted)
      -> base::RunLoop{kNestableTasksAllowed}.Run()  [line 2702]

5. DURING NESTED RUNLOOP:
   - BeginMainFrame -> lifecycle update -> RunViewTransitionStepsDuringMainFrame
   - Transitions E,F advance: kCaptureTagDiscovery -> kCapturing
   - PushPaintArtifactToCompositor -> capture requests committed
   - Impl processes captures immediately (kDelayLayerTreeViewDeletionOnLocalSwap)
   - PostTask chain: impl -> NotifyTransitionRequestsFinished [PostTask] -> callback

6. RE-ENTRANT OnTransitionCaptured(E): push_back(E), counter 2->1
   RE-ENTRANT OnTransitionCaptured(F): push_back(F), counter 1->0
   -> ENTERS INNER LOOP
   -> inner loop iterates captured_transitions_ [A,B,C,D,E,F]
   -> captured_transitions_.clear()  <<<--- POISONS MEMORY

7. Outer loop resumes -> dereferences Member<> into POISONED memory -> CRASH

This is a timeline, so read it as a story with numbered scenes.

  • Scene 1. The page starts four view transitions at once. The bookkeeper's counter, in_flight_capture_requests_, is set to 4, and four transitions enter the kCapturing stage.
  • Scene 2. The compositor finishes all four captures and sends four completion callbacks back, one after another. Each callback calls OnTransitionCaptured(), which adds the transition to the list (push_back) and lowers the counter: 4 to 3, 3 to 2, 2 to 1, 1 to 0. When the counter hits zero, the function enters its loop. The four transitions are named A, B, C and D here.
  • Scene 3. The loop calls OnCapturePhaseComplete() on the first transition. That moves it to the kCaptured stage and invokes the page's JavaScript callback, synchronously, right there in the middle of the loop.
  • Scene 4. The page's callback does two things. First, it starts two more transitions, on element5 and element6, which pushes the counter back up to 1 and then 2. Second, it calls window.print(), which goes through ScriptedPrint and RequestPrintPreview(kScripted) and opens the nested RunLoop at line 2702.
  • Scene 5. Inside the nested RunLoop, a new frame is produced (BeginMainFrame), the page state is updated, and the two new transitions, E and F, move from kCaptureTagDiscovery to kCapturing. Their capture requests are sent to the compositor (PushPaintArtifactToCompositor), processed immediately, and completion callbacks are posted back.
  • Scene 6. Those callbacks run inside the same nested RunLoop, so OnTransitionCaptured() is called again, re-entrantly, for E and then F. The counter goes 2 to 1 to 0, and the inner call enters its own loop. That inner loop walks the list, which now holds A, B, C, D, E and F, and then calls captured_transitions_.clear(). The memory is poisoned.
  • Scene 7. The outer loop, which never finished, resumes and reads the next entry from the poisoned memory. Crash.

The key points: the counter in_flight_capture_requests_ is decremented on every capture completion, and the loop only starts when it reaches zero. The JS callback runs synchronously inside that loop, so anything it does happens while the outer loop is still iterating. Starting two more transitions inside the callback raises the counter again, and window.print() opens the nested RunLoop that lets those new transitions complete and re-enter OnTransitionCaptured() before the outer loop has finished. The inner invocation drains the counter to zero, enters its own loop, and calls captured_transitions_.clear(), poisoning the backing store the outer loop is still walking.

Step 3: the vulnerable code

C++
// view_transition_supplement.cc:346-357
void ViewTransitionSupplement::OnTransitionCaptured(ViewTransition* transition) {
  CHECK(transition);
  captured_transitions_.push_back(transition);           // [1]
  if (--in_flight_capture_requests_ == 0) {
    std::sort(captured_transitions_.begin(), ...);
    for (auto captured_transition : captured_transitions_) {  // [2] range-for
      captured_transition->OnCapturePhaseComplete();          // [3] -> JS -> print()
    }                                                         //     -> nested RunLoop
    captured_transitions_.clear();                            // [4] poisons memory
  }                                                           //     re-entrant [4]
}                                                             //     invalidates [2]

[1] appends the completed transition. [2] is the range-for over the heap vector. [3] is the synchronous call into JavaScript. [4] is the clear() that poisons the backing store; when it runs re-entrantly, it invalidates the iterator the outer [2] is using.

Line by line, in plain words:

  • void ViewTransitionSupplement::OnTransitionCaptured(ViewTransition* transition) { declares the function. It takes one argument, a pointer to the transition that has just been captured. A pointer is a memory address, a note saying "the object is over there".
  • CHECK(transition); is a safety assertion: if the pointer is empty, stop immediately. It is a guard against a different, simpler mistake.
  • captured_transitions_.push_back(transition); adds the transition to the end of the list. This is step [1].
  • if (--in_flight_capture_requests_ == 0) { lowers the counter by one and checks whether it has reached zero. Only when every capture is done does the rest run.
  • std::sort(captured_transitions_.begin(), ...); sorts the list. The report abbreviates the arguments with ....
  • for (auto captured_transition : captured_transitions_) { is the range-for loop, step [2]. It walks the list from start to finish.
  • captured_transition->OnCapturePhaseComplete(); is step [3]. It tells the transition that its capture phase is complete, and that call ends up running the page's JavaScript synchronously.
  • captured_transitions_.clear(); is step [4]. It empties the list and poisons its memory.
  • The closing braces end the loop and the function. The comments on the right point out the danger: a re-entrant call can run [4] while the outer [2] is still walking, which invalidates the walk.

Step 4: the ASAN evidence

Text
==424011==ERROR: AddressSanitizer: use-after-poison on address 0x7edc02142c2c
READ of size 4 at 0x7edc02142c2c thread T0 (chrome)
    #0 in blink::ViewTransitionSupplement::OnTransitionCaptured
       v8/include/cppgc/member.h:59:55

Address 0x7edc02142c2c is a wild pointer inside of access range of size 0x000000000004.
SUMMARY: AddressSanitizer: use-after-poison v8/include/cppgc/member.h:59:55
         in blink::ViewTransitionSupplement::OnTransitionCaptured

Shadow byte: f7 (Poisoned by user)

Task trace:
    #0 cc::LayerTreeHost::NotifyTransitionRequestsFinished  cc/trees/layer_tree_host.cc:605
    #1 cc::ProxyImpl::NotifyTransitionRequestFinished       cc/trees/proxy_impl.cc:648

The faulting read is a 4-byte load through cppgc::Member inside OnTransitionCaptured, and the shadow byte f7 marks the memory as poisoned by the user (the clear()). The task trace shows the re-entrant call arriving from LayerTreeHost::NotifyTransitionRequestsFinished via ProxyImpl::NotifyTransitionRequestFinished, which matches the compositor callback path described in the trigger chain.

Reading the ASAN output:

  • The first line says AddressSanitizer caught a use-after-poison at a particular memory address. The address itself is just a location in memory; it is not meaningful to a reader.
  • READ of size 4 means the program tried to read four bytes.
  • thread T0 (chrome) names the thread where the fault happened.
  • The #0 line names the function where the bad read happened: OnTransitionCaptured, and the file v8/include/cppgc/member.h, which is the code that implements the Member pointer. So the crash is exactly where the report predicted.
  • Shadow byte: f7 (Poisoned by user) is ASAN's internal bookkeeping. ASAN keeps a parallel "shadow" map of memory that records whether each region is valid. The value f7 means "poisoned on purpose", and "by user" means the program itself marked it, which is what clear() did.
  • The task trace shows which queued task was running when the fault occurred. It points at LayerTreeHost::NotifyTransitionRequestsFinished and ProxyImpl::NotifyTransitionRequestFinished, which are the compositor's completion callbacks. That confirms the re-entrant call came from the compositor path described in the trigger chain, not from somewhere unrelated.

Root cause

OnTransitionCaptured() iterates a HeapVector<Member<ViewTransition>> while calling into code that can synchronously run JavaScript, and that JavaScript can open a nested RunLoop (through window.print() and the print preview path). The nested loop lets new capture completions arrive and re-enter OnTransitionCaptured(), which calls captured_transitions_.clear() and poisons the cppgc backing store. The outer range-for then dereferences a Member<ViewTransition> into poisoned memory.

The existing defence against this class of bug is the local-copy pattern already used in ForEachTransition() in the same file, but OnTransitionCaptured() does not use it. The earlier cc-level fix (a PostTask in CL 6542846) does not help, because the re-entrancy here happens at the Blink level. MiraclePtr does not apply either: the vector lives on the cppgc/Oilpan heap, outside PartitionAlloc's coverage, so there is no dangling pointer detection or use-after-free mitigation for this object type.

In everyday terms: the function walks a shared list while giving the page a chance to change that list. The safe pattern is to copy the list first and walk the copy, so that changes to the original cannot pull the rug out from under the walk. The same file already does this elsewhere, which shows the team knew the risk. The earlier fix at the compositor level does not help because the problem is one layer up, in Blink. And the general memory safety net does not cover this kind of object, so nothing catches the mistake until ASAN does.

Impact

The report rates this High: renderer process heap corruption. The primitive is a use-after-poison on the cppgc HeapVector backing store. After captured_transitions_.clear() poisons the memory, the outer loop dereferences Member<ViewTransition> pointers into attacker-influenced heap space. Because cppgc recycles backing store pages, a well-timed allocation between the inner clear() and the outer loop resumption can place attacker-controlled data at the poisoned address, which the researcher says converts the use-after-poison into a controlled read/write on a fake ViewTransition object.

The suggested exploitation path, as described in the report:

  1. Heap spray during the nested RunLoop: the loop created by window.print() stays open for seconds while waiting for user interaction with the print dialog. During that window the attacker's JS callback can allocate arbitrary objects (ArrayBuffers, strings, TypedArrays) via the same cppgc allocator to reclaim the freed backing store.
  2. Type confusion via a fake Member<>: when the outer loop dereferences the reclaimed memory as a Member<ViewTransition>, the attacker controls the vtable pointer. Calling OnCapturePhaseComplete() on a fake object gives an arbitrary virtual call, a standard vtable hijack primitive.
  3. RCE in the renderer: arbitrary virtual call, then stack pivot, then a ROP/JOP chain, then arbitrary code execution within the renderer process sandbox.

Attack surface, per the report:

  • Triggered from any web page via standard DOM APIs (element.startViewTransition() plus window.print()).
  • No special permissions, flags or user gestures are required beyond the print dialog appearing.
  • All prerequisites are enabled by default in stable Chrome (ScopedViewTransitions: "stable", kDelayLayerTreeViewDeletionOnLocalSwap: FEATURE_ENABLED_BY_DEFAULT).
  • Works on all desktop platforms with print preview (Linux, Windows, macOS, ChromeOS).

User interaction is minimal: window.print() opens a print dialog, but the use-after-free triggers regardless of what the user chooses (cancel, close or print). The report notes that a phishing page could social-engineer the user with "Please print this receipt" to make the dialog appear expected, and that the corruption occurs during the nested RunLoop, before the user interacts with the dialog.

Scope is the renderer process only. Full exploitation requires combining this with a sandbox escape for system-level impact. Renderer-process RCE alone, the report argues, enables reading all cross-site data in the renderer (cookies, passwords in autofill, DOM content), bypassing Site Isolation within the compromised renderer, and serving as the first stage of a full exploit chain (renderer RCE, sandbox escape, system compromise).

This section is full of jargon, so here is a translation.

  • Primitive in security means a small, reliable building block that an attacker can use. A use-after-poison is a primitive; it is not yet full control, but it is a foothold.
  • Heap spray is a technique where an attacker fills memory with lots of carefully crafted data, hoping that one of those chunks lands exactly where the program will later read. Think of scattering hundreds of identical keys on a table, hoping one fits the lock.
  • ArrayBuffer, string and TypedArray are ordinary JavaScript objects that hold data. The point is that the page can create many of them during the print dialog's pause, and they come from the same memory manager that just freed the list.
  • Vtable is a table of function addresses that a program uses to decide which code to run for an object. If an attacker can control the vtable pointer, they can make the program call code of their choosing. That is a vtable hijack.
  • Type confusion means the program treats one kind of object as another. Here, memory the attacker filled is treated as a ViewTransition.
  • Arbitrary virtual call means the attacker can make the program jump to any address they like. Stack pivot means redirecting the program's stack to memory the attacker controls. ROP/JOP (Return-Oriented Programming / Jump-Oriented Programming) are techniques for stitching together small existing code fragments into a useful attack. RCE stands for Remote Code Execution: running your own code on someone else's machine.
  • Site Isolation is a Chrome defence that puts different websites in different processes, so one site cannot read another's data. The report says a compromised renderer could bypass it within that renderer.
  • Phishing is tricking a person into doing something, here getting them to accept a print dialog by making it look like part of a normal task such as printing a receipt.

The report is careful about scope: this bug alone gives control of the renderer, not the whole computer. Getting to the operating system would need a second bug, a sandbox escape. But renderer control is still serious, because the renderer holds the page's data: cookies, autofill passwords, and the page content itself. A cookie is a small piece of data a website stores in your browser to remember you, for example to keep you logged in.

Fix

The report proposes making a local copy before iterating, matching the existing ForEachTransition pattern:

C++
void ViewTransitionSupplement::OnTransitionCaptured(ViewTransition* transition) {
  CHECK(transition);
  captured_transitions_.push_back(transition);
  if (--in_flight_capture_requests_ == 0) {
    std::sort(captured_transitions_.begin(), captured_transitions_.end(),
              CompareTransitions);
    // Local copy to prevent re-entrancy from invalidating the iteration.
    HeapVector<Member<ViewTransition>> local_copy(captured_transitions_);
    captured_transitions_.clear();
    for (auto captured_transition : local_copy) {
      captured_transition->OnCapturePhaseComplete();
    }
  }
}

With this change the shared vector is cleared before the loop starts, and the loop walks a private copy that re-entrant calls cannot invalidate. The report does not state which fix, if any, was ultimately landed.

Line by line:

  • The function signature and the CHECK are unchanged.
  • captured_transitions_.push_back(transition); still adds the completed transition to the shared list.
  • The counter check is unchanged: the rest runs only when every capture is done.
  • std::sort(...) sorts the shared list, now with the full arguments spelled out and a comparison function, CompareTransitions, that decides the order.
  • HeapVector<Member<ViewTransition>> local_copy(captured_transitions_); is the crucial new line. It makes a private copy of the list. The comment explains why: to prevent re-entrancy from invalidating the iteration.
  • captured_transitions_.clear(); empties the shared list before the loop starts, so any re-entrant call that arrives later sees an empty list and cannot disturb the walk.
  • for (auto captured_transition : local_copy) { walks the private copy instead of the shared list.
  • captured_transition->OnCapturePhaseComplete(); still calls into the page's JavaScript, but now the loop is reading from memory that no re-entrant call can touch.

In plain terms: instead of reading names off the shared noticeboard while someone may tear it down, you photocopy the list first, then read the photocopy at your leisure. The original can be changed or removed without affecting your reading.

Variants to test

  • Other synchronous JS callbacks inside container iteration. Look for loops over heap containers in Blink that call into V8 synchronously and then mutate or clear the same container. A positive result is an ASAN use-after-poison or use-after-free whose task trace shows a re-entrant call arriving from a compositor or other posted callback while the outer loop is still running.
  • Other nested RunLoop entry points. window.print() is one way to pump tasks from inside a callback; modal dialogs and other synchronous UI paths may do the same. A positive result is a crash that disappears when the nested loop is removed or when the callback is deferred.
  • The same pattern in other transition phases. OnTransitionCaptured is one phase; check whether the other phase-completion handlers iterate shared state while invoking page callbacks. A positive result is the same poisoned-shadow-byte signature in a sibling function.
  • Counter-based batching. Any code that decrements an in-flight counter and enters a loop at zero is a candidate, because a callback that starts new work can push the counter back up and re-enter. A positive result is a re-entrant entry into the same loop before the outer one finishes.
  • cppgc containers holding Member<>. Because MiraclePtr does not cover the Oilpan heap, any such container that is cleared during iteration is worth checking. A positive result is a faulting read through cppgc/member.h in the ASAN stack.

These are suggestions for where to look next, and each one is a small recipe:

  • Synchronous JS callbacks inside container iteration means: find code that walks a list and, in the middle of the walk, runs page code that might change that list. The proof is an ASAN report showing the bad read, with a task trace that shows the re-entrant call coming from a queued callback.
  • Other nested RunLoop entry points means: window.print() is not the only way to make Chrome pause and process other work. Modal dialogs, which block the page until dismissed, may do the same. The proof is a crash that goes away when the pause is removed.
  • The same pattern in other transition phases means: view transitions have several stages, and the capture stage is only one of them. If another stage-completion handler walks shared state while calling page code, it may have the same flaw. The proof is the same ASAN signature in a neighbouring function.
  • Counter-based batching means: any code that counts down to zero and then starts a loop is suspicious, because page code running inside that loop can start new work and push the counter back up, causing a second entry into the loop.
  • cppgc containers holding Member<> means: because the usual memory safety net does not cover this heap, any such container that gets emptied during a walk deserves a look. The proof is a faulting read through cppgc/member.h in the ASAN stack.

Glossary

  • API: a set of commands one program offers so other code can ask it to do things, like a menu you order from.
  • ASAN (AddressSanitizer): a debugging tool that watches every memory access and reports invalid reads and writes immediately.
  • ArrayBuffer: a JavaScript object that holds a block of raw binary data.
  • Blink: the part of Chrome that renders web pages, turning HTML, CSS and JavaScript into what you see.
  • Bounty: a payment made by a company to a researcher who reports a security bug.
  • Callback: a piece of code handed to another piece of code, to be run at the right moment.
  • cc: Chrome's compositor layer, which assembles the final picture from pieces.
  • Commit: a saved snapshot in a source code history, identified by a hash.
  • Container invalidation during iteration: changing or emptying a collection while a loop is still walking through it, so the walk reads stale or invalid memory.
  • Cookie: a small piece of data a website stores in your browser, often to keep you logged in.
  • cppgc / Oilpan: Chrome's garbage collector for Blink objects, which automatically reclaims memory no longer in use.
  • CVE: a public catalogue number for a known security vulnerability.
  • DOM (Document Object Model): the browser's in-memory tree of everything on the page.
  • Garbage collector: a memory manager that automatically frees objects the program no longer needs.
  • Headless mode: running a browser with no visible window, used by servers and automated tests.
  • Heap: the region of memory a program uses for objects it creates while running.
  • Heap spray: filling memory with many crafted chunks so that one lands where the program will later read.
  • HeapVector: a growable list stored on the heap.
  • JavaScript: the programming language web pages run inside the browser.
  • Member: a special pointer type that the garbage collector tracks, so it knows not to free the object while the pointer exists.
  • MiraclePtr: a Chrome safety net that detects use of a pointer after its object was freed.
  • Nested RunLoop: a second work loop started from inside the first, so queued tasks run before the outer loop resumes.
  • PartitionAlloc: Chrome's general-purpose memory allocator, which hands out chunks of memory.
  • Phishing: tricking a person into doing something, such as accepting a dialog that looks expected.
  • Pointer: a memory address, a note saying where an object lives.
  • PoC (proof of concept): a small demonstration that a bug is real.
  • PostTask: a way of saying "run this function later, on the task queue".
  • Primitive: a small, reliable building block an attacker can use towards a larger attack.
  • Profile: the folder where a browser stores your personal data, such as bookmarks and history.
  • Range-for loop: a compact loop that walks every item in a collection.
  • RCE (Remote Code Execution): running your own code on someone else's machine.
  • Re-entrancy: a function being called again while an earlier call to it is still running.
  • Renderer process: the separate, sandboxed program Chrome starts for a web page.
  • ROP/JOP (Return-Oriented / Jump-Oriented Programming): techniques for stitching together small existing code fragments into an attack.
  • RunLoop: the browser's main work loop, which repeatedly picks up queued tasks and runs them.
  • Runtime feature: a feature that can be switched on or off inside a running browser.
  • Sandbox: the fence around a process that limits what it can do to the rest of the computer.
  • Sandbox escape: a second bug that lets an attacker break out of the sandbox to reach the operating system.
  • ScriptedPrint: a print request made by page script rather than by the user clicking a menu.
  • Site Isolation: a Chrome defence that puts different websites in different processes so one cannot read another's data.
  • Stack pivot: redirecting the program's stack to memory the attacker controls.
  • State machine: a set of stages an object moves through, one after another.
  • Synchronous: happening right now, before anything else can run.
  • TypedArray: a JavaScript object that holds an array of numbers of a fixed type.
  • Use-after-free: using memory after the program has handed it back.
  • Use-after-poison: using memory that has been deliberately marked as unusable, usually in a debugging build.
  • V8: Chrome's JavaScript engine, the part that runs page scripts.
  • View transition: a smooth animation between two states of a page, requested with startViewTransition.
  • VRP (Vulnerability Reward Program): a scheme that pays people for finding and reporting security bugs.
  • Vtable: a table of function addresses a program uses to decide which code to run for an object.
  • Vtable hijack: taking control of an object's vtable pointer so the program calls attacker-chosen code.
  • Type confusion: treating one kind of object as another.

More by Quac Tran

View all

3 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.

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.