Skip to content
Memory corruption Advisory Advanced CVE-2024-10826

Use after free in Family Experiences (CVE-2024-10826)

A use-after-free vulnerability exists in the SupervisedUserGoogleAuthNavigationThrottle on Android when an unauthenticated supervised user accesses Google-owned sites. If the native view is unavailable, a synchronous failure callback cancels navigation and deletes the throttle object, leading to use-after-free when the code continues to access member variables.

Anonymous Follow

Originally disclosed on Chrome VRP

  • Fix shipped in 38 days

VULNERABILITY DETAILS

On Android platform, when an unauthenticated supervised user tries to access some Google-owned sites, the SupervisedUserGoogleAuthNavigationThrottle would start a reauthentication process, as shown in the following call sequence:

SupervisedUserGoogleAuthNavigationThrottle::WillStartOrRedirectRequest
  -> SupervisedUserGoogleAuthNavigationThrottle::ShouldProceed
    -> ReauthenticateChildAccount

ReauthenticateChildAccount may run the on_failure_callback synchronously if the native view is not available [1]. The on_failure_callback is SupervisedUserGoogleAuthNavigationThrottle::OnReauthenticationFailed, and it will cancel the navigation which deletes the current running throttle object [2]. After ShouldProceed returns, the code would continue access some member variables which results in UAF [3].

Note that the UAF would be triggered only if on_failure_callback is invoked synchronously, as the code comment indicates, it may only happen on tab or browser shutdown. I did not find a way to stably destroy the view while keeping the throttle running (although it might exist), so feel free to downgrade the severity.

C++
void ReauthenticateChildAccount(
    content::WebContents* web_contents,
    const std::string& email,
    const base::RepeatingCallback<void()>& on_failure_callback) {
  ui::WindowAndroid* window_android =
      web_contents->GetNativeView()->GetWindowAndroid();
  if (!window_android) {
    // The native view may not be available on shutdown (crbug.com/1468955).
    on_failure_callback.Run();      // ===> [1]
    return;
  }
  ...
}

void SupervisedUserGoogleAuthNavigationThrottle::OnReauthenticationFailed() {
  // Cancel the navigation if reauthentication failed.
  CancelDeferredNavigation(content::NavigationThrottle::CANCEL_AND_IGNORE);  // ===> [2]
}

content::NavigationThrottle::ThrottleCheckResult
SupervisedUserGoogleAuthNavigationThrottle::WillStartOrRedirectRequest() {
  // ...
  content::NavigationThrottle::ThrottleCheckResult result = ShouldProceed();

  if (result.action() == content::NavigationThrottle::DEFER) {
    google_auth_state_subscription_ =
        child_account_service_->ObserveGoogleAuthState(       // ===> [3]
            base::BindRepeating(&SupervisedUserGoogleAuthNavigationThrottle::
                                    OnGoogleAuthStateChanged,
                                base::Unretained(this)));
  }

  return result;
}

[1] https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/supervised_user/child_accounts/child_account_service_android.cc;l=35;drc=f522344e45882da4c7f7cb1b3a0a7bd747d654bb

[2] https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/supervised_user/supervised_user_google_auth_navigation_throttle.cc;l=244;drc=f522344e45882da4c7f7cb1b3a0a7bd747d654bb

[3] https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/supervised_user/supervised_user_google_auth_navigation_throttle.cc;l=100;drc=f522344e45882da4c7f7cb1b3a0a7bd747d654bb

VERSION

Chrome Version: stable + dev

Operating System: Android

REPRODUCTION CASE

  1. Apply the attached patch.diff, this is to simulate an signed-in unauthenticated supervised user to Chromium

  2. Run webserver using nodejs

    node server.js

    adb reverse tcp:8000 tcp:8000

  3. Launch asan build chromium on Android

    out/Default/bin/chrome_public_apk run

    and navigate to http://localhost:8000/poc.html

FOR CRASHES, PLEASE INCLUDE THE FOLLOWING ADDITIONAL INFORMATION

Type of crash: browser

Crash State: see asan.log for details

Bisection

This was introduced in https://chromium.googlesource.com/chromium/src/+/b40c9c2acdd4b858053ee4d8988daeb412db4d04

The original report as published on the Chromium issue tracker, by Anonymous. 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 on_failure_callback is invoked synchronously, which cancels the navigation and deletes the throttle object, but the calling code continues to access member variables of the deleted object.

Impact

The use-after-free could crash the browser, but the reporter notes it may only happen on tab or browser shutdown and did not find a stable way to trigger it, so severity may be lower.

What the attacker needed

Android platform; unauthenticated supervised user; native view unavailable (e.g., shutdown)

How it was found

  1. Apply the attached patch.diff to simulate a signed-in unauthenticated supervised user in Chromium.
  2. Run a webserver using nodejs and set up adb reverse port forwarding.
  3. Launch an ASAN build of Chromium on Android and navigate to the proof-of-concept page.

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 memory but then keeps using it, like deleting a file and then trying to open it. Here, a navigation helper object is deleted during a failure callback, but the code still tries to use it afterwards, which can crash the browser or potentially allow an attacker to run code. The bug only triggers in a specific situation, such as when the browser is shutting down.

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 by Anonymous

View all

2,270 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.