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

Use after free in UI (CVE-2026-10932)

A race condition in the browser process on Android could lead to a use-after-free or double-free of a state object. An attacker could trigger it by luring a user to a crafted data-sharing URL with a long token, causing a background thread to race with UI thread destruction.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 54 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.

Overview: A data race leading to a potential Double-Free or Use-After-Free exists in the browser process's CollaborationController. Binary protobufs passed to Java via UTF-8 conversion become corrupted, triggering an error handler that incorrectly posts a native callback to a background thread. Because thread-affinity checks compile out in Release builds, concurrent access to the state machine between the UI and background threads causes memory corruption.

Affected files:

  • components/data_sharing/internal/android/java/src/org/chromium/components/data_sharing/DataSharingSDKDelegateBridge.java
  • components/data_sharing/internal/android/data_sharing_sdk_delegate_android.cc
  • components/collaboration/internal/collaboration_controller.cc
  • components/data_sharing/internal/data_sharing_service_impl.cc
  • chrome/browser/data_sharing/data_sharing_navigation_throttle.cc
  • components/collaboration/internal/collaboration_controller.h

Estimated timestamp from git blame: 2025-03-19

Summary

A race condition leading to a potential Use-After-Free (UAF) or Double-Free exists in the browser process on Android. The vulnerability is triggered when binary protobuf data passed from C++ to Java is corrupted during UTF-8 conversion. The subsequent error handling in Java incorrectly dispatches the native callback to the ThreadPool instead of the UI thread. Because C++ base::WeakPtr thread affinity checks are disabled in Release builds, the CollaborationController state machine performs thread-unsafe transitions, leading to a data race on a std::unique_ptr and resulting in memory corruption.

Technical Description

1. Corrupted Protobuf Transmission In data_sharing_sdk_delegate_android.cc, ReadGroupWithToken (and related methods) serializes request protobufs to a binary std::string and passes them to Java via ConvertUTF8ToJavaString. ConvertUTF8ToJavaString strictly enforces valid UTF-8 and replaces invalid sequences with the replacement character U+FFFD.

If an access_token is 128 bytes or larger, the protobuf length varint contains a high-bit byte (e.g., 0x80 0x01). Because 0x80 is a continuation byte without a valid lead byte, it is invalid UTF-8 and is replaced with U+FFFD. When Java attempts to re-encode this string back to bytes using String.getBytes(), U+FFFD converts to the 3-byte sequence [0xEF, 0xBF, 0xBD]. This irrevocably corrupts the binary protobuf, causing ReadGroupWithTokenParams.parseFrom() to throw an InvalidProtocolBufferException.

2. Incorrect Thread Dispatching The Java catch handler for this exception in DataSharingSDKDelegateBridge.java invokes PostTask.postTask(TaskTraits.USER_VISIBLE, ...) to run the failure callback. On Android, TaskTraits.USER_VISIBLE dispatches to a base::ThreadPool worker thread rather than the UI thread where the flow originated.

3. Bypassed Thread Checks The ThreadPool worker thread invokes the native callback, JNI_DataSharingSDKDelegateBridge_RunReadGroupsCallback, which resolves to DataSharingServiceImpl::OnReadSingleGroupCompleted and eventually AddingUserToGroupState::ProcessGroupDataOrFailureOutcome.

Both of these C++ callbacks are bound using base::WeakPtr. WeakPtr ensures safety against destroyed objects, but its sequence affinity enforcement relies on DCHECK_CALLED_ON_VALID_SEQUENCE. In standard Release builds, DCHECKs are compiled out. Consequently, execution silently proceeds on the background ThreadPool worker.

4. Memory Corruption Inside ProcessGroupDataOrFailureOutcome, the code eventually calls controller_->TransitionTo(kError). This method reassigns the std::unique_ptr<ControllerState> current_state_ inside CollaborationController.

Because current_state_ is being reassigned from a ThreadPool worker without synchronization, it races with the UI thread. If the UI thread concurrently destroys the CollaborationController (e.g., if the user navigates away or closes the tab), a data race occurs between the std::unique_ptr's assignment operator and its destructor. MiraclePtr (BRP) does not rewrite or protect the internal pointer of a std::unique_ptr, meaning this race directly leads to a Double-Free or UAF of the ControllerState object within the highly-privileged Browser process.

Potential Steps to Trigger

(Note: Our tooling agent does not have the ability to run code or build a working proof-of-concept; these are the suggested steps an attacker would follow to exploit the vulnerability.)

  1. An attacker creates a malicious link to a data sharing URL with a sufficiently long token (e.g., https://www.google.com/chrome/tabshare/?g=abc&t=[128+ bytes]).
  2. The attacker tricks an Android user into clicking the link.
  3. DataSharingNavigationThrottle intercepts the URL and starts the CollaborationController join flow on the UI thread.
  4. The long token triggers the protobuf corruption, causing the Java exception handler to post the native callback to the ThreadPool.
  5. Concurrently, the attacker's page triggers a navigation or closes the tab, causing the UI thread to destroy the CollaborationController.
  6. The concurrent state transition on the ThreadPool worker races with the destruction on the UI thread, causing a Double-Free in the Browser process.

Suggested Fix

  1. Correct Binary Data Passing: Stop using ConvertUTF8ToJavaString for serialized protobufs. Instead, use base::android::ToJavaByteArray to pass the binary data accurately as a byte[] to Java.
  2. Ensure Thread Safety for Callbacks: Wrap the native callbacks passed over JNI using base::BindPostTask(base::SingleThreadTaskRunner::GetCurrentDefault(), ...) before passing them to the SDK wrapper. This ensures that even if Java invokes the callback on a background thread, the C++ execution will always correctly hop back to the thread where the callback was created.

Evaluated with Chrome root at commit: 096fc8fdbfacf2546485756d03f160a3d04fcc9b


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 the root cause is that binary protobuf data is passed through a UTF-8 string conversion that corrupts it, and the resulting error handler posts a native callback to a background thread instead of the UI thread, where thread-affinity checks are disabled in release builds.

Impact

A data race could lead to a double-free or use-after-free of a state object in the highly-privileged browser process, potentially allowing memory corruption, though the report notes the tooling could not build a working proof-of-concept.

What the attacker needed

Android device; victim clicks a crafted link; attacker can trigger navigation or tab close

The fix

The report suggests passing binary data as a byte array instead of a UTF-8 string and ensuring native callbacks are posted back to the correct thread.

How it was found

  1. An attacker creates a malicious link to a data sharing URL with a sufficiently long token.
  2. The attacker tricks an Android user into clicking the link.
  3. DataSharingNavigationThrottle intercepts the URL and starts the CollaborationController join flow on the UI thread.
  4. The long token triggers the protobuf corruption, causing the Java exception handler to post the native callback to the ThreadPool.
  5. Concurrently, the attacker's page triggers a navigation or closes the tab, causing the UI thread to destroy the CollaborationController.
  6. The concurrent state transition on the ThreadPool worker races with the destruction on the UI thread, causing a Double-Free in the Browser process.

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.

This report describes a bug where two parts of the browser try to use the same piece of memory at the same time, and one part frees it while the other is still using it. That can crash the browser or, in theory, let an attacker run their own code. The trigger is a specially crafted link that makes the browser mishandle some data.

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.