Use after free in Verifier (CVE-2026-95354)
A compromised network process can replay the EnableNetworkAccess Mojo IPC, causing the browser to destroy in-flight certificate fetch jobs without notifying their RequestCore objects. When a request is later cancelled, a use-after-free occurs on the UI thread, deterministically crashing the browser process.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 3 months
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 compromised network process can replay the EnableNetworkAccess Mojo IPC, destroying in-flight jobs and leaving dangling pointers in RequestCore. When the request is cancelled, a MiraclePtr-bypassing Use-After-Free occurs on the UI thread. Because the free and dereference are consecutive instructions, this deterministically crashes the browser process (DoS).
Affected files:
services/cert_verifier/cert_net_url_loader/cert_net_fetcher_url_loader.ccservices/cert_verifier/cert_verifier_service.cc
Estimated timestamp from git blame: Unknown (Google3 checkout)
1. Summary of the Issue (Meant for Human Triage)
A potential Use-After-Free (UAF) vulnerability exists in the browser process within the CertNetFetcherURLLoader component. This issue can be triggered by an attacker who has compromised the sandboxed network service process.
The Mojo interface mojom::CertVerifierService::EnableNetworkAccess is hosted on the browser UI thread but lacks a replay guard. A compromised network service process holding this Mojo remote can invoke EnableNetworkAccess multiple times. In release builds of Chrome (where DCHECK macros are compiled out), doing so replaces the existing AsyncCertNetFetcherURLLoader and destroys its in-flight Job objects without notifying or detaching their corresponding RequestCore structures. This leaves any active RequestCore with a dangling raw_ptr<Job> job_ pointing to the deleted memory, quarantined by BackupRefPtr (BRP).
When a request is subsequently cancelled (e.g., due to a path building timeout), RequestCore::CancelJobOnTaskRunner is executed on the UI thread. This method executes a MiraclePtr-bypassing anti-pattern: it extracts the raw native pointer, clears the raw_ptr member variable to null (which drops the BRP refcount to 0 and immediately frees the quarantined allocation), and then dereferences the freed native pointer to call DetachRequest.
Because the free and the subsequent dereference are consecutive instructions on the same thread, PartitionAlloc handles the free synchronously via its thread cache. There is zero window for an attacker to reclaim the freed memory. The first member of the destroyed Job object is its requests_ vector (at offset 0), which PartitionAlloc immediately overwrites with an encoded freelist pointer. The subsequent call to std::ranges::find inside DetachRequest dereferences this invalid pointer and deterministically crashes the browser process. As a result, this issue strictly manifests as a browser-process Denial of Service (DoS), rather than an exploitable Sandbox Escape or Remote Code Execution.
2. Proof-of-Concept & Detailed Execution Flow
Note: Our tooling agent does not have the ability to run code, so these are the potential, verified sequence of steps an attacker would follow to trigger the vulnerability based on static analysis.
An attacker who has compromised the sandboxed network process can trigger this vulnerability through the following execution path:
Step 1: Stalling Certificate Fetches
The attacker triggers certificate verification with a maliciously crafted certificate containing multiple Authority Information Access (AIA) caIssuers URIs. The Browser process initiates network fetches for these URIs, creating RequestCore and Job objects on the UI thread (services/cert_verifier/cert_net_url_loader/cert_net_fetcher_url_loader.cc). The RequestCore retains a raw_ptr<Job> job_ to the Job. The attacker, acting as the URLLoaderFactory for these fetches from the compromised network service, intentionally stalls the HTTP responses to keep the Job objects alive while pushing the path builder toward its iteration limit or timeout.
Step 2: Replaying EnableNetworkAccess
While the stalled Job and RequestCore objects are active, the compromised network service replays the EnableNetworkAccess Mojo IPC to CertVerifierServiceImpl.
- File:
services/cert_verifier/cert_verifier_service.cc - Function:
CertVerifierServiceImpl::EnableNetworkAccess(lines 129-141)
void CertVerifierServiceImpl::EnableNetworkAccess(
mojo::PendingRemote<network::mojom::URLLoaderFactory> url_loader_factory,
mojo::PendingRemote<mojom::URLLoaderFactoryConnector> reconnector) {
if (cert_net_fetcher_) {
...
cert_net_fetcher_->SetURLLoaderFactoryAndReconnector(std::move(url_loader_factory), ...);
}
}
This unconditionally calls SetURLLoaderFactoryAndReconnector on the UI thread.
Step 3: Destructing the Old Fetcher and Jobs Without Notification
- File:
services/cert_verifier/cert_net_url_loader/cert_net_fetcher_url_loader.cc - Function:
CertNetFetcherURLLoader::SetURLLoaderFactoryAndReconnector(lines 760-768)
void CertNetFetcherURLLoader::SetURLLoaderFactoryAndReconnector(...) {
DCHECK(!impl_);
impl_ = std::make_unique<AsyncCertNetFetcherURLLoader>(...);
}
In release builds, DCHECK(!impl_) is optimized out. Reassigning impl_ destroys the previous AsyncCertNetFetcherURLLoader instance, which in turn destroys its jobs_ map (std::map<Job*, std::unique_ptr<Job>>). Destroying the unique_ptrs invokes Job::~Job() (lines 460-462):
Job::~Job() {
DCHECK(requests_.empty());
}
Because DCHECK(requests_.empty()) is completely compiled out in release builds, the active Job objects are deleted without notifying their attached RequestCores. The RequestCore objects now hold dangling raw_ptr<Job> job_ pointers, keeping the memory quarantined via BRP.
Step 4: Cancellation and MiraclePtr Bypass
On the worker thread, the path builder hits its timeout and discards the request, triggering core_->CancelJob(), which posts CancelJobOnTaskRunner to the UI thread.
- File:
services/cert_verifier/cert_net_url_loader/cert_net_fetcher_url_loader.cc - Function:
RequestCore::CancelJobOnTaskRunner(lines 444-449)
void CertNetFetcherURLLoader::RequestCore::CancelJobOnTaskRunner() {
if (job_) {
auto* job = job_.get();
job_ = nullptr;
job->DetachRequest(this);
}
SignalImmediateError();
}
auto* job = job_.get();extracts the raw native address.job_ = nullptr;drops the final BRP refcount to 0. PartitionAlloc immediately moves the memory block from quarantine to the active thread cache freelist.job->DetachRequest(this);dereferences the freed native pointer.
Step 5: Dereferencing Overwritten Memory
- File:
services/cert_verifier/cert_net_url_loader/cert_net_fetcher_url_loader.cc - Function:
Job::DetachRequest(lines 470-481)
void Job::DetachRequest(CertNetFetcherURLLoader::RequestCore* request) {
std::unique_ptr<Job> delete_this;
auto it = std::ranges::find(requests_, request);
CHECK(it != requests_.end());
...
The Job class has no virtual methods or base classes, meaning its std::vector member requests_ resides exactly at offset 0. When PartitionAlloc freed the memory in the prior instruction, it overwrote offset 0 with an encoded freelist pointer. The std::ranges::find call reads this encoded pointer as the vector's backing memory, resulting in a deterministic SIGSEGV / crash in the Browser Process.
Suggested Fix:
-
Add a replay guard in
CertVerifierServiceImpl::EnableNetworkAccessto prevent re-initialization if a fetcher is already active. -
Ensure
AsyncCertNetFetcherURLLoader::~AsyncCertNetFetcherURLLoaderexplicitly cancels or detaches all active jobs before destruction, soRequestCores are properly notified. -
In
RequestCore::CancelJobOnTaskRunner, change the order of operations to avoid the BRP bypass:C++ if (job_) { job_->DetachRequest(this); job_ = nullptr; }
3. Technical Verification Details (Automated Audit Logs - Reviewers may skip this section)
Prior Critic Verdict:
"The report accurately identifies a UAF in RequestCore::CancelJobOnTaskRunner that bypasses MiraclePtr due to the 'get(), clear(), dereference' pattern. However, as the researcher correctly notes, there is no window for reallocation because the free and the subsequent dereference are consecutive instructions on the same thread. Furthermore, the destroyed Job object has its 'requests_' vector at offset 0, which is immediately overwritten by PartitionAlloc's encoded freelist pointer when truly freed. The subsequent call to std::ranges::find will reliably crash the browser process by dereferencing this invalid pointer. Even if BRP keeps the object quarantined (multiple requests attached), the vector's backing buffer was still freed, leading to a CHECK failure or crash. Since this requires a compromised network process and strictly results in a Denial of Service, it is not exploitable for RCE or sandbox escape."
Automated Audit Logs:
CertVerifierServiceImpl::EnableNetworkAccessVerification: Codebase investigation verified thatCertVerifierServiceImpl::EnableNetworkAccess(services/cert_verifier/cert_verifier_service.cc:129) runs on the browser UI thread (viacontent/browser/network_service_instance_impl.cc:834). The method only checksif (cert_net_fetcher_)before callingSetURLLoaderFactoryAndReconnectorunconditionally. There is no call-once guard.DCHECKOptimization Verification: Codebase investigation confirmed thatDCHECK(requests_.empty());inJob::~Job()(services/cert_verifier/cert_net_url_loader/cert_net_fetcher_url_loader.cc:460-462) is compiled completely out in release builds.DCHECK_IS_ON()evaluates to false, causing the macro to expand to an optimized-out ternary expression (true ? (void)0 : ...). This guarantees no runtime overhead and zero enforcement, allowing activeJobinstances to destruct silently.JobClass Layout Verification: Codebase investigation confirmed thatJobdoes not inherit from any base classes and lacks virtual methods. Therefore, its first declared member,std::vector<scoped_refptr<CertNetFetcherURLLoader::RequestCore>> requests_;, is verifiably situated exactly at offset 0 of the object memory layout.- BRP /
JobSetMap Verification:JobSet(cert_net_fetcher_url_loader.cc:127) is typed asstd::map<Job*, std::unique_ptr<Job>, JobComparator>;. Destruction ofAsyncCertNetFetcherURLLoader::jobs_destroys theunique_ptr, deleting theJobfrom memory. Thus,RequestCore::job_(araw_ptr) is definitively the final pointer keeping theJobmemory quarantined by BRP. Thejob_ = nullptrassignment drops the final refcount to 0 before thejob->DetachRequest(this)dereference occurs on the subsequent instruction.
Evaluated with Chrome root at commit: 8c517fbcbb533e59ec9cedac868c8a9bdc30beb2
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 EnableNetworkAccess Mojo IPC lacks a replay guard, so a second call replaces the existing fetcher and destroys active Job objects without detaching their RequestCore pointers, and the subsequent cancellation dereferences a freed pointer.
Impact
The issue strictly manifests as a browser-process denial of service, not an exploitable sandbox escape or remote code execution.
What the attacker needed
Compromised network service process
The fix
It should be fixed by adding a replay guard in EnableNetworkAccess, ensuring the fetcher destructor detaches all active jobs, and reordering CancelJobOnTaskRunner to detach before clearing the pointer.
How it was found
- Trigger certificate verification with a certificate containing multiple AIA caIssuers URIs, causing the browser to create RequestCore and Job objects.
- As the compromised network service, stall the HTTP responses to keep the Job objects alive.
- Replay the EnableNetworkAccess Mojo IPC to CertVerifierServiceImpl.
- The replay destroys the old AsyncCertNetFetcherURLLoader and its Job objects without notifying RequestCore, leaving dangling pointers.
- Cause the path builder to time out, which triggers RequestCore::CancelJobOnTaskRunner on the UI thread.
- CancelJobOnTaskRunner frees the Job memory and then dereferences the freed pointer, crashing the browser.
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 is when a program frees memory but then keeps using a pointer to it. Here, a malicious network process can trick the browser into freeing some internal job objects while other parts still hold pointers to them. When those pointers are later used, the browser crashes.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.