Use after free in WebRTC (CVE-2024-10488)
A use-after-free vulnerability exists in Chromium's WebRTC implementation when sending Blob data over an established data channel. An attacker could trigger a crash by visiting a malicious page, potentially leading to memory corruption.
Originally disclosed on Chrome VRP
- Fix shipped in 12 days
tested OS: Ubuntu & MacOS
tested chrome version:
- Chromium 132.0.6785.0
- Chromium 130.0.6699.3
Reproduction Steps:
./chrome --user-data-dir=/tmp/xx2 http://localhost:8880/crash.html
The issue should reproduce in approximately 30 seconds.
Note:
Two months ago, I submitted a WebRTC-related issue (issue 361782106). At that time, the CL was implemented as follows:
void RTCDataChannel::send(Blob* data, ExceptionState& exception_state) {
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
is_transferable_ = false;
- DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+ if (state_ != webrtc::DataChannelInterface::kOpen) {
+ ThrowNotOpenException(&exception_state);
+ return;
+ }
+
After this CL was applied, I tested the fix and confirmed that the issue no longer occurred. However, upon modifying the POC today, I found that the issue can still be reproduced in the latest version.
Differences from the Previous PoC:
- Previous PoC: Forcefully and continuously sent Blob-type data over the data channel.
- Current PoC: Establishes a normal data channel connection before sending Blob-type data.
Suspected Cause:
I suspect that the previous fix only partially addressed the underlying problem, which allows the new PoC to trigger the issue again. It appears that sending Blob-type data over an established data channel still leads to the same crash.
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 previous fix only added a state check but did not fully address the lifetime management of the Blob data during sending, allowing a use-after-free when the data channel is already open.
What the attacker needed
Victim visits a malicious page; Chromium browser
How it was found
- Launch Chromium with a temporary user data directory and navigate to a local crash page.
- Wait approximately 30 seconds for the crash to occur.
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 a memory bug where a program keeps using memory after it has been freed, which can crash the browser or let an attacker run code. Here, sending a special kind of data (a Blob) over a WebRTC data channel causes this. A malicious website could exploit it to crash the browser.
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.