Insufficient validation of untrusted input in Media (CVE-2026-10917)
Chromium's Mojo IPC interface for media encryption patterns accepts 32-bit integers instead of the 4-bit values defined by the ISO specification, and these unvalidated values are forwarded to the CDM (Widevine) and GPU processes. A compromised renderer could send out-of-bounds values that may cause integer overflows and memory corruption in those processes, potentially leading to sandbox escape.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 2 months
Project Fortify, an experimental security project, has identified the following potential security issue.
Overview: Chromium fails to validate the crypt_byte_block and skip_byte_block fields of media::EncryptionPattern when receiving Mojo IPC messages from a renderer. These fields are defined as 4-bit values by the ISO specification, but the Mojo interface accepts arbitrary 32-bit integers. A compromised renderer can send out-of-bounds values to the CDM or GPU processes, potentially triggering integer overflows and memory corruption in Widevine or hardware video drivers.
Affected files:
media/mojo/mojom/encryption_pattern_mojom_traits.ccmedia/cdm/cdm_type_conversion.ccmedia/mojo/services/mojo_decryptor_service.ccmedia/mojo/services/mojo_video_decoder_service.ccmedia/mojo/common/validation_utils.ccmedia/base/decrypt_config.cc
Estimated timestamp from git blame: 2025-03-17
Description
There is a potential sandbox escape vulnerability caused by a missing bounds check on EncryptionPattern parameters passed via Mojo IPC.
Per the ISO/IEC 23001-7:2016 specification, the pattern encryption blocks (crypt_byte_block and skip_byte_block) are 4-bit values, capping them at a maximum of 15. While Chromium's MP4 parser correctly masks these values during file parsing, the Mojo IPC interface (media.mojom.EncryptionPattern) represents them as uint32 values.
When a compromised renderer process sends a mojom::DecoderBuffer to the GPU process or CDM Utility process, these values are deserialized in StructTraits<media::mojom::EncryptionPatternDataView, media::EncryptionPattern>::Read (media/mojo/mojom/encryption_pattern_mojom_traits.cc) without any bounds checking. Furthermore, ValidateAndConvertMojoDecryptConfig (media/mojo/common/validation_utils.cc) does not validate the range of the encryption_pattern fields.
These massive 32-bit values (e.g., 0xFFFFFFFF) are subsequently forwarded to highly sensitive, lower-level components:
- CDM Utility Process (Widevine):
ToCdmInputBuffer(media/cdm/cdm_type_conversion.cc) copies the unvalidated values directly into thecdm::InputBuffer_2.patternstruct. This struct is passed across the CDM interface to the closed-source Widevine library. - GPU Process (Hardware Decoders): Hardware delegates, such as the VAAPI delegate (
media/gpu/vaapi/vaapi_video_decoder_delegate.cc), copy the unvalidated values into structures likeVAEncryptionParameters(crypto_params->blocks_stripe_encrypted), which are then passed to graphics drivers.
If the receiving component (Widevine or the GPU driver) calculates buffer offsets, loop bounds, or total protected block sizes assuming these values are standard 4-bit numbers, providing UINT32_MAX will likely cause an integer overflow. This can lead to out-of-bounds reads/writes or heap corruption, potentially allowing the attacker to escape the renderer sandbox and execute code in the GPU or CDM process.
Potential Reproduction Steps
Note: Our tooling agent does not have the ability to run code, so these are theoretical steps an attacker would follow.
- Gain code execution within a sandboxed renderer process (e.g., via a V8 exploit).
- Obtain a Mojo handle to either
media::mojom::VideoDecoder(GPU process) ormedia::mojom::Decryptor(CDM utility process). - Construct a
media::mojom::DecryptConfigobject withencryption_schemeset tocbcs. - Embed a
media::mojom::EncryptionPatternwithcrypt_byte_blockandskip_byte_blockset to0xFFFFFFFF. - Wrap this
DecryptConfigin amedia::mojom::DecoderBufferand send it over the Mojo pipe usingDecodeorDecrypt. - The receiving process deserializes the buffer without range checks and passes the malicious block counts to the CDM or graphics driver, triggering an integer overflow and subsequent memory corruption.
Proposed Fix
Add explicit range validation during Mojo deserialization or validation to ensure these fields do not exceed their maximum 4-bit limit.
Modify ValidateAndConvertMojoDecryptConfig in media/mojo/common/validation_utils.cc (or StructTraits::Read in encryption_pattern_mojom_traits.cc) to reject the configuration if the values exceed 15:
if (decrypt_config->encryption_pattern.has_value()) {
if (decrypt_config->encryption_pattern->crypt_byte_block() > 15 ||
decrypt_config->encryption_pattern->skip_byte_block() > 15) {
return nullptr; // Or return false in StructTraits::Read
}
}
Evaluated with Chrome root at commit: a9cbf6e8b275fe4147435aa905f3b7f5a656f5f0
Results from 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
The Mojo IPC interface represents the 4-bit encryption pattern fields as 32-bit integers and does not validate their range during deserialisation or conversion, unlike the MP4 parser which masks them.
Impact
If the receiving component assumes standard 4-bit values, the out-of-bounds numbers could cause integer overflows leading to out-of-bounds reads/writes or heap corruption, potentially allowing the attacker to escape the renderer sandbox and execute code in the GPU or CDM process.
What the attacker needed
Compromised renderer process; Mojo handle to VideoDecoder or Decryptor
The fix
The fields should be validated during Mojo deserialisation or conversion to reject values greater than 15.
How it was found
- Gain code execution within a sandboxed renderer process.
- Obtain a Mojo handle to the VideoDecoder or Decryptor interface.
- Construct a DecryptConfig object with encryption_scheme set to cbcs.
- Embed an EncryptionPattern with crypt_byte_block and skip_byte_block set to 0xFFFFFFFF.
- Wrap the DecryptConfig in a DecoderBuffer and send it over the Mojo pipe using Decode or Decrypt.
- The receiving process deserialises the buffer without range checks and passes the malicious block counts to the CDM or graphics driver.
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 web browser separates web pages into sandboxed processes to limit damage if one is hacked. This report says a hacked renderer process could send malformed numbers to more privileged parts of the browser, and those parts might mishandle the numbers and crash or be exploited. The flaw is that the browser does not check the numbers are within the small range the media encryption standard requires.
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.