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

Use after free in Chromecast (CVE-2026-10884)

A compromised renderer can call the Cast renderer's Initialize method twice; if the second call fails, the underlying player is freed but a dangling pointer remains, allowing a later compositor frame to write attacker-controlled bounds to freed memory.

Google Chrome

Originally disclosed on Chrome VRP

Critical View original
  • Fix shipped in 47 days

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 without the Chrome Security team. Please see go/chrome-ai-generated-security-bugs-faq for more information.

Overview: A compromised renderer can trigger a Use-After-Free in the Cast browser process by initializing a StarboardRenderer twice via its Mojo interface. If the second initialization fails, the underlying player is freed but a dangling pointer remains in GeometryChangeHandler, which can later be dereferenced by submitting a specific compositor frame.

Affected files:

  • chromecast/starboard/media/renderer/starboard_renderer.cc
  • chromecast/starboard/media/renderer/geometry_change_handler.cc
  • chromecast/starboard/media/renderer/geometry_change_handler.h
  • chromecast/starboard/media/renderer/starboard_player_manager.cc
  • media/mojo/services/mojo_renderer_service.cc
  • chromecast/starboard/media/media/starboard_api_wrapper_base.cc

Estimated timestamp from git blame: 2025-10-06

Summary

A potential Use-After-Free (UAF) vulnerability exists in the Cast browser process on Starboard builds. The MojoRendererService uses a DCHECK to prevent re-initialization, which is compiled out in release builds. This allows a compromised renderer to call Initialize multiple times. If a subsequent initialization fails, StarboardRenderer destroys the existing StarboardPlayerManager (freeing the SbPlayer) but fails to clear the sb_player_ pointer in its GeometryChangeHandler. A subsequent geometry update via a VideoHoleDrawQuad will then write attacker-controlled bounds to the freed SbPlayer memory.

Vulnerability Details

  1. MojoRendererService::Initialize (in media/mojo/services/mojo_renderer_service.cc) uses a debug-only DCHECK_EQ(state_, STATE_UNINITIALIZED) to ensure it is only called once. In release builds, a compromised renderer can call this method multiple times on the same remote.

  2. When Initialize is called a second time, it eventually invokes StarboardRenderer::Initialize (in chromecast/starboard/media/renderer/starboard_renderer.cc).

  3. StarboardRenderer::Initialize attempts to create a new StarboardPlayerManager by calling StarboardPlayerManager::Create(...).

  4. If the attacker provides an unsupported media configuration (e.g., using AudioCodec::kAMR_NB), Create fails and returns nullptr.

  5. The assignment player_manager_ = StarboardPlayerManager::Create(...) evaluates to nullptr. Because player_manager_ is a std::unique_ptr, this destroys the old StarboardPlayerManager from the first initialization, which in turn calls SbPlayerDestroy to free the underlying vendor-allocated SbPlayer.

  6. Because player_manager_ is now null, StarboardRenderer::Initialize returns early with an error:

    C++
    if (!player_manager_) {
      // Early return on failure
      media_task_runner_->PostTask(..., PIPELINE_ERROR_INITIALIZATION_FAILED);
      return;
    }
    
  7. Crucially, the early return skips the subsequent call to geometry_change_handler_.SetSbPlayer(...). As a result, the GeometryChangeHandler retains a dangling raw_ptr<void> sb_player_ pointing to the freed memory.

  8. The attacker can then trigger GeometryChangeHandler::OnVideoGeometryChange by submitting a compositor frame from the renderer containing a VideoHoleDrawQuad with the original overlay_plane_id and attacker-controlled bounds.

  9. OnVideoGeometryChange calls SetPlayerBounds, which invokes the vendor Starboard API SbPlayerSetBounds with the dangling sb_player_ pointer and the attacker-controlled coordinates, resulting in a highly controllable Write-After-Free in the browser process.

Note: MiraclePtr (BackupRefPtr) does not mitigate this vulnerability because SbPlayer is allocated by an external vendor library, not PartitionAlloc.

Potential Reproduction Steps

Note: These are suggested steps for an attacker; we do not have a working proof of concept.

  1. From a compromised renderer, call media.mojom.InterfaceFactory::CreateCastRenderer with a generated overlay_plane_id to obtain a browser-process media.mojom.Renderer remote.
  2. Call Renderer::Initialize with a valid media configuration (e.g., AAC/H264) and wait for the success callback. This successfully allocates the SbPlayer.
  3. Call Renderer::Initialize again on the same remote, this time providing an invalid configuration (e.g., advertising AudioCodec::kAMR_NB). This frees the SbPlayer but leaves a dangling pointer in GeometryChangeHandler.
  4. Submit a compositor frame from the renderer containing a VideoHoleDrawQuad. Set its overlay_plane_id to match the one from Step 1, and set its bounds to arbitrary values payload.
  5. The Viz process will forward the bounds to the browser process, triggering a write to the freed SbPlayer memory.

Suggested Fix

There are two places where this should be addressed for defense-in-depth:

  1. Prevent re-initialization at the Mojo boundary: In MojoRendererService::Initialize, replace or supplement the DCHECK with a hard check that terminates the renderer if it attempts to initialize twice:

    C++
    if (state_ != STATE_UNINITIALIZED) {
      mojo::ReportBadMessage("MojoRendererService cannot be initialized multiple times");
      return;
    }
    
  2. Clear the dangling pointer on failure: In StarboardRenderer::Initialize, ensure the GeometryChangeHandler's pointer is cleared if player creation fails:

    C++
    if (!player_manager_) {
      geometry_change_handler_.SetSbPlayer(nullptr); // ADD THIS LINE
      LOG(ERROR) << "Unable to create StarboardPlayerManager";
      // ...
      return;
    }
    

Evaluated with Chrome root at commit: 661452647ddb2827305122ff3273bd5dea403f09


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

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

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a debug-only check (DCHECK) that is removed in release builds allows re-initialization, and the failure path does not clear a dangling pointer in GeometryChangeHandler.

Impact

A compromised renderer could achieve a highly controllable write-after-free in the browser process, potentially leading to code execution or sandbox escape.

What the attacker needed

Compromised renderer; Starboard build of Cast

The fix

The report suggests adding a hard check to reject re-initialization at the Mojo boundary and clearing the dangling pointer in GeometryChangeHandler when player creation fails.

How it was found

  1. From a compromised renderer, call CreateCastRenderer to obtain a browser-process Renderer remote.
  2. Call Renderer::Initialize with a valid media configuration and wait for success.
  3. Call Renderer::Initialize again on the same remote with an invalid configuration to free the player.
  4. Submit a compositor frame containing a VideoHoleDrawQuad with the original overlay_plane_id and arbitrary bounds.
  5. The Viz process forwards the bounds to the browser process, triggering a write to freed memory.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A use-after-free happens when a program frees some memory but keeps a pointer to it, then later writes through that pointer. Here, a malicious web page (running in a sandboxed renderer) can ask the browser to set up a media player twice; the second setup fails and frees the player, but a leftover pointer is still used when the page sends a special drawing instruction, letting the attacker write to memory they no longer own.

What is Memory corruption?

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

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

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