Use after free in Loader (CVE-2024-6989)
A use-after-free vulnerability exists in the Loader component of Chromium, likely due to a missing check after a throttle callback. An attacker could potentially exploit this to cause memory corruption, though no proof-of-concept is provided.
- Fix shipped in 29 days
The cause of this vulnerability is the same as https://issues.chromium.org/issues/40068602. I don't have POC and ASAN proofs at the moment because there are problems with my current test, but I believe it should exist. I should construct ASAN to prove the vulnerability later.
void PluginResponseInterceptorURLLoaderThrottle::WillProcessResponse( const GURL& response_url, network::mojom::URLResponseHead* response_head, bool* defer) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
content::WebContents* web_contents = content::WebContents::FromFrameTreeNodeId(frame_tree_node_id_); if (!web_contents) return;
if (content::download_utils::MustDownload( web_contents->GetBrowserContext(), response_url, response_head->headers.get(), response_head->mime_type)) { return; }
std::string extension_id = PluginUtils::GetExtensionIdForMimeType( web_contents->GetBrowserContext(), response_head->mime_type);
if (extension_id.empty()) return;
// TODO(crbug.com/40180674): Support prerendering of MimeHandlerViews. if (web_contents->IsPrerenderedFrame(frame_tree_node_id_)) { delegate_->CancelWithError( net::Error::ERR_BLOCKED_BY_CLIENT, "MimeHandler prerendering support not implemented."); return; }
I believe the following fix completely resolves the root cause of the vulnerability
@@ -654,7 +654,11 @@ void ThrottlingURLLoader::OnReceiveResponse( base::Time start = base::Time::Now(); throttle->BeforeWillProcessResponse(response_url_, *response_head, &has_pending_restart);
-
RecordExecutionTimeHistogram("BeforeWillProcessResponse", start);
-
if (!weak_ptr) -
return; -
RecordExecutionTimeHistogram("BeforeWillProcessResponse", start); if (!HandleThrottleResult(throttle)) { return; }
bisect https://chromium-review.googlesource.com/c/chromium/src/+/4104103
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 missing check for a weak pointer after a throttle callback, leading to use-after-free.
Impact
Could lead to memory corruption and potentially arbitrary code execution, but no exploit has been demonstrated.
What the attacker needed
None
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 memory safety bug in a web browser. A use-after-free happens when a program frees memory but then keeps using it, which can let an attacker run malicious code or crash the browser. The author thinks the bug exists but hasn't yet proven it with a test.
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.