Use after free in Updater (CVE-2026-14018)
A race condition in the Windows GoogleUpdater service lets a COM RPC thread copy a reference to the Configurator object while the main thread clears and deletes it during shutdown. This could cause a use-after-free of the Configurator, though the report is based on static review only and no working proof of concept exists.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 34 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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: A potential race condition exists in the GoogleUpdater service on Windows during shutdown between a COM MTA RPC thread and the main sequence thread. While the COM thread accesses and copy-constructs a scoped_refptr to Configurator via AppServer::config(), the main thread can simultaneously clear config_ inside AppServer::Uninitialize(). This unsynchronized access can lead to a Use-After-Free (UAF) of the Configurator object.
Affected files:
chrome/updater/app/server/win/com_classes_legacy.ccchrome/updater/app/app_server.ccchrome/updater/app/app_server.h
Estimated timestamp from git blame: 2023-07-13
Description
A potential race condition exists in the GoogleUpdater (Omaha) service on Windows between a COM Multithreaded Apartment (MTA) RPC thread and the main sequence thread during service shutdown, potentially leading to a Use-After-Free (UAF) vulnerability.
Specifically, the PolicyStatusImpl constructor executes on a COM RPC thread (inside SimpleClassFactory<PolicyStatusImpl>::CreateInstance) and retrieves the Configurator instance via GetAppServerWinInstance()->config() to obtain the policy service:
// chrome/updater/app/server/win/com_classes_legacy.cc
PolicyStatusImpl::PolicyStatusImpl()
: IDispatchImpl<IPolicyStatus4,
...
IPolicyStatus>({IID_MAP_ENTRY_USER(IPolicyStatus4),
...}),
policy_service_(GetAppServerWinInstance()->config()->GetPolicyService()) {
}
Concurrently, the main sequence's AppServer::Uninitialize() executes as part of the shutdown process, setting config_ to nullptr:
// chrome/updater/app/app_server.cc
void AppServer::Uninitialize() {
...
prefs_ = nullptr;
config_ = nullptr; // Releases and potentially deletes Configurator
}
Root Cause Analysis
- Lack of Thread Safety: The
scoped_refptr<T>class is not thread-safe for concurrent read/write operations on the smart pointer itself. Inbase/memory/scoped_refptr.h, copy-constructing ascoped_refptrperforms a non-atomic load of the internal raw pointer (ptr_), followed byAddRef(). - Race Window: While the main thread resets
config_tonullptrinsideUninitialize()(which releases the last reference to theConfiguratorobject, causing it to be deleted), the COM RPC thread can concurrently copyconfig_insideAppServer::config(). - Use-After-Free: If the COM RPC thread loads the raw pointer of
Configuratorright before the main thread clears and deletes it, the COM thread will callAddRef()or subsequent virtual methods (such asGetPolicyService()) on the freedConfiguratormemory. This results in a Use-After-Free. - No MiraclePtr Protection: Because
scoped_refptrmanages ownership via reference-counting and holds a standard raw C++ pointer internally, it is completely exempt from BackupRefPtr (BRP) / MiraclePtr protection.
Suggested / Potential Attack Steps
Note: Our analysis was performed using static review tools; we do not currently have the ability to run code or provide a working proof of concept (PoC).
- From a non-privileged client process, initialize COM MTA (
CoInitializeEx(NULL, COINIT_MULTITHREADED)). - Call
CoCreateInstance(CLSID_PolicyStatusSystemClass, NULL, CLSCTX_LOCAL_SERVER, ...)to demand-start the system-scope GoogleUpdater service (running as NT AUTHORITY/SYSTEM). - Obtain a class-factory proxy for
CLSID_PolicyStatusSystemClassviaCoGetClassObject. - On a background thread, repeatedly trigger
factory->CreateInstance(NULL, ...)to execute thePolicyStatusImplconstructor on a COM RPC thread. - On the main thread, release the initially obtained instance to force the service's WRL module count to drop to 0. This initiates service shutdown on the main sequence via
AppServer::Uninitialize(). - Observe if the concurrent MTA thread retrieves the stale raw pointer of
Configuratorfromconfig_and triggers a UAF upon callingAddRef()orRelease()on the freed object.
Suggested Fix
To resolve this issue, access to config_ must be synchronized, or initialization of policy_service_ should be marshaled to the main sequence.
For example, we can protect config_ with a lock inside AppServer, or ensure PolicyStatusImpl retrieves policy_service_ via a posted task running on the main sequence instead of calling config() directly on the COM RPC thread.
Evaluated with Chrome root at commit: b1520ef4a76878853a31f0943b565e42060edec8
Results so far have been promising, but there can be wrong deductions. Feel free to adjust as follows:
- If you are familiar with the severity guidelines, you may adjust the severity.
- If this is a false positive, and there's no work to be done, please close as WAI.
- If there is work to do here but not a vulnerability, please change the issue type to Task/Bug/FR.
Data from false positives will be used to improve accuracy over time. And please feel free to reach out to me directly if you have concerns or feedback on the project.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the shared scoped_refptr holding the Configurator is read and reset from two threads without synchronisation, and scoped_refptr copy-construction is not atomic.
Impact
The race could cause a use-after-free in a service running as SYSTEM, but the report only shows a theoretical window from static analysis and provides no working exploit.
What the attacker needed
Windows host; ability to start the updater service via COM; timing during service shutdown
The fix
Access to config_ should be synchronised with a lock, or the policy service should be fetched via a task posted to the main sequence instead of calling config() on the COM RPC thread.
How it was found
- Initialise COM in multithreaded apartment mode from an unprivileged client process.
- Ask COM to start the system-level updater service and obtain a class-factory proxy for the policy status class.
- On a background thread, repeatedly create instances so the constructor runs on a COM RPC thread.
- On the main thread, release the first instance so the service begins shutting down.
- Watch whether the background thread picks up the stale pointer and triggers the use-after-free.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When a program shuts down, it frees memory it no longer needs. Here two threads (independent streams of execution) touch the same pointer at the same time: one is still using the object while the other frees it. Using memory after it has been freed is called a use-after-free and can crash the program or, in the worst case, let an attacker influence what happens next.
What is Race condition?
Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.