Use after free in Media (CVE-2026-11144)
An unchecked 64-bit to 32-bit integer truncation in Blink's media MultiBufferReader can produce a block ID of -2, which collides with a reserved deleted sentinel in a WTF::HashMap. This leads to a double-release and use-after-free of a media::DataBuffer in the renderer process, which the report says could lead to arbitrary code execution.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 53 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 without the Chrome Security team.
Overview: An unchecked integer truncation in MultiBufferReader::block() can produce a block ID of -2, which is a reserved deleted sentinel in WTF::HashMap. Inserting this key causes a collision with a tombstone, leading to an assignment on an already-destructed scoped_refptr. This results in a potential double-release and Use-After-Free of a media::DataBuffer in the renderer process.
Affected files:
third_party/blink/renderer/platform/media/multi_buffer_reader.hthird_party/blink/renderer/platform/media/multi_buffer.ccthird_party/blink/renderer/platform/media/multi_buffer.hthird_party/blink/renderer/platform/wtf/hash_table.hthird_party/blink/renderer/platform/media/resource_multi_buffer_data_provider.cc
Estimated timestamp from git blame: 2025-08-11
Overview
A potential Use-After-Free (UAF) vulnerability exists in the Blink media MultiBuffer component. It is triggered by an unchecked 64-bit to 32-bit integer truncation that allows a reserved WTF::HashMap sentinel key to be inserted into the map.
Vulnerability Details
- Integer Truncation:
MultiBufferReader::block(int64_t byte_pos)calculates a block ID by shifting a 64-bit byte offset by 15 (for 32KB blocks) and casting it toMultiBufferBlockId(int32_t). If the byte offset is near 128TB, specifically140737488289792(128TB - 64KB), the shifted value is0xFFFFFFFE. Cast toint32_t, this truncates to-2. - Bounds Check Bypass: The seek logic checks
if (preload_pos_ < block_ceil(end_)). For a file size of 128TB,block_ceilcalculates an offset that overflows to0. Since-2 < 0is true, the check passes. - Network Request: The reader requests the data provider to fetch block
-2. The provider calculates the byte offset as-2 << 15 = -65536and constructs an HTTP request with the malformed headerRange: bytes=-65536-. - Error Handling: The server responds with
416 Range Not Satisfiable. The provider handles this by setting an End-Of-Stream (EOS) flag and passing an EOSmedia::DataBuffertoMultiBuffer::OnDataProviderEventwithpos = -2. - Sentinel Collision: The event handler calls
data_.Set(-2, eos_buffer).data_is aWTF::HashMapconfigured withIntHashTraits<BlockId, -1, -2>, making-2the map's reserved "deleted" sentinel (tombstone). BecausekSafeToCompareToEmptyOrDeletedis true for integers,WTF::HashTable::insertchecks key equality before checking if a bucket is deleted. If the cache previously evicted a block, it will falsely match an existing tombstone bucket containing-2. - Use-After-Free:
HashMap::Setattempts to overwrite the mapped value of this tombstone. However, when the bucket was originally deleted, itsscoped_refptr<media::DataBuffer>value was explicitly destructed. The assignment operator performs a copy-and-swap using the tombstone's stale memory pointer, causing a double-decrement of the underlyingmedia::DataBufferreference count when the temporaryscoped_refptris destroyed.
Because scoped_refptr explicitly uses RAW_PTR_EXCLUSION for its internal pointer, this vulnerability bypasses MiraclePtr protections and can lead to arbitrary code execution.
Potential Steps to Trigger
(Note: These are suggested/potential steps based on code analysis, as our tooling agent does not currently have the ability to run code or build a working proof-of-concept.)
- An attacker hosts a malicious website with an embedded
<video>element pointing to a crafted MP4 file. - The server responds with an HTTP header advertising a file size of exactly 128TB (
140737488355328bytes). - The user plays the media normally for a short period to exceed the cache budget, forcing a
MultiBufferLRU eviction. This creates at least one tombstone bucket in thedata_hash map. - The MP4's index specifies a seek offset of
140737488289792. - The browser issues the
Range: bytes=-65536-request. The server immediately replies with a416status code. - The UAF is triggered during the EOS processing.
Suggested Fix
- Prevent Overflow: Modify
MultiBufferReader::blockandMultiBufferReader::block_ceilto usebase::checked_cast<int32_t>to safely handle excessively large byte offsets, or explicitly clamp the byte offsets to the supported 64TB limit. - Enforce Non-Negative IDs: In
MultiBuffer::OnDataProviderEvent, upgrade the existingDCHECK_GE(pos, 0)to aCHECK_GE(pos, 0)so that negative block IDs cause a safe process termination in Release builds before they can interact with the hash map.
Evaluated with Chrome root at commit: 096fc8fdbfacf2546485756d03f160a3d04fcc9b
Results so far have been promising, but there can be wrong deductions. If this proves to be a false positive, please close as WAI; 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 an unchecked 64-bit to 32-bit truncation in MultiBufferReader::block allows a negative block ID equal to the hash map's deleted sentinel to be inserted, and the insert path compares keys before checking whether a bucket is deleted.
Impact
The report claims a use-after-free in the renderer process that bypasses MiraclePtr protections and could lead to arbitrary code execution, though no working proof-of-concept was built.
What the attacker needed
Victim visits attacker page; server advertises a 128TB file size; crafted MP4 with a large seek offset; brief playback to force cache eviction
The fix
The report suggests using a checked cast or clamping byte offsets in the block calculations, and upgrading the existing debug assertion on non-negative block IDs to a release-build check.
How it was found
- Host a page with an embedded video element pointing to a crafted MP4 file.
- Have the server advertise a file size of exactly 128TB.
- Play the media briefly so the cache budget is exceeded and a MultiBuffer LRU eviction creates a tombstone bucket.
- Have the MP4 index specify a seek offset near 128TB minus 64KB.
- The browser sends a malformed Range request and the server replies with a 416 status.
- The use-after-free is triggered during end-of-stream processing.
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 browser plays a video, it fetches pieces of the file and keeps track of them in a lookup table. A very large file size makes a number wrap around to a negative value, and that value happens to be the special marker the table uses for deleted entries. Writing to that stale entry frees the same memory twice, which can crash the browser or let an attacker run their own code.
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.