Google Chrome WebRTC addIceCandidate use after free vulnerability
A use-after-free flaw in Chrome's WebRTC handling of ICE candidates could let a malicious web page reuse freed memory and potentially achieve arbitrary code execution. The victim must visit a crafted page to trigger the crash.
Originally disclosed on Cisco Talos
A use after free vulnerability exists in the WebRTC functionality of Google Chrome 91.0.4472.114 (Stable) and 93.0.4575.0 (Canary). A specially-crafted web page can trigger reuse of previously freed memory which can lead to arbitrary code execution.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
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 Promise from setLocalDescription marks memory for garbage collection while AddIceCandidate later accesses that same freed memory.
Impact
With proper manipulation of the Promise, this could lead to control over freed memory and ultimately arbitrary code execution.
What the attacker needed
Victim visits a malicious website; Chrome version 91.0.4472.114 or 93.0.4575.0
How it was found
- Open a crafted web page in Chrome with garbage collection exposed.
- The page forces garbage collection before adding an ICE candidate.
- A Promise from setLocalDescription marks memory for collection.
- AddIceCandidate then accesses the freed memory, causing a crash.
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 some memory but then keeps using it, like deleting a file and still reading from it. Here, a web page can make Chrome's WebRTC code do this, which might let an attacker run their own code on your computer. You would have to visit a bad website for this to happen.
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.