Inappropriate implementation in Media (CVE-2026-76035)
The macOS VideoToolbox AV1 accelerator fails to validate the size of generated av1C atoms and omits bit depth and maximum frame dimensions from its format change-detection logic. An attacker could feed malicious streams to trigger a 0-byte configuration record or reuse a stale 8-bit session for 10-bit decoding, potentially causing driver-side out-of-bounds memory corruption within the sandboxed GPU process.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 31 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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: The macOS VideoToolbox AV1 accelerator fails to validate the size of generated av1C atoms and omits bit depth/max frame dimensions from its format change-detection logic. An attacker can feed malicious streams to trigger a 0-byte configuration record or reuse a stale 8-bit session for 10-bit decoding. This can result in potential driver-side out-of-bounds memory corruption within the sandboxed GPU process.
Affected files:
media/gpu/mac/video_toolbox_av1_accelerator.ccmedia/gpu/mac/vt_config_util.mm
Estimated timestamp from git blame: 2023-11-14
1. Summary of the Issue (Meant for Human Triage)
A security logic vulnerability exists in the macOS AV1 hardware decoder path (VideoToolboxAV1Accelerator::ProcessFormat). An attacker-controlled server can deliver a maliciously crafted AV1 bitstream to force Apple's VideoToolbox graphics driver into processing out-of-spec or inconsistent stream structures, potentially causing out-of-bounds memory operations within the sandboxed GPU process.
The vulnerability stems from two independent flaws in the format regeneration logic:
- Unchecked Codec Configuration Box (
av1C) Retrieval: Format regeneration does not validate the output oflibgav1::ObuParser::GetAV1CodecConfigurationBox(). If format regeneration is triggered on a frame lacking an in-band Sequence Header,libgav1returns anullptrwith a size of0. The accelerator blindly wraps this in aspan, creating a 0-byteav1Cextension atom that is passed to Apple CoreMedia'sVTDecompressionSessionCreate. This violates the AV1-ISOBMFF specification (requiring >= 4 bytes) and hands a 0-byte bounds-bearing configuration structure to the driver. - Insufficient Format Change-Detection Keys: The accelerator tracks format changes by checking only
{color_space, profile, per-frame coded_size}. It completely omits the stream's bit depth and sequence-level maximum frame dimensions (max_frame_width,max_frame_height). If a stream transitions from 8-bit to 10-bit, or drastically increases its maximum sequence frame size while holding the per-frame size constant, the format regeneration block is skipped. A stale 8-bit configuration is then used to decode 10-bit inputs viaVTDecompressionSessionDecodeFrame, forcing the driver to decode into undersized/incorrectly formatted memory surfaces.
Note: These steps represent potential exploitation paths based on code analysis; our tooling agent does not run or execute code to empirically demonstrate the Apple VideoToolbox internal driver panic.
2. Proof-of-Concept & Detailed Execution Flow
The following outlines the potential steps an attacker could take using a webpage with a <video> tag or WebCodecs configured for hardware AV1 decode on macOS (M3+ Apple Silicon).
Case A: 0-byte av1C Driver Submission via Reference-Frame Scaling
- Temporal Unit 1 (TU1): The attacker serves a chunk containing
[OBU_SEQUENCE_HEADER max_frame=4096x4096]and[OBU_FRAME key_frame width=2048 height=2048].AV1Decoder::SetStream()copies this intotemporal_unit_data_.ProcessFormatexecutes, branches into format regeneration, and extracts a validav1Cvialibgav1::ObuParser::GetAV1CodecConfigurationBox(media/gpu/mac/video_toolbox_av1_accelerator.cc:204).active_coded_size_is saved as{2048, 2048}. A validVTDecompressionSessionis created.
- Temporal Unit 2 (TU2): The attacker serves a chunk containing no Sequence Header OBU, just an
[OBU_FRAME inter_frame frame_size_override_flag=1 width=1024 height=1024].AV1Decoder::DecodeInternalprocesses this without returningkConfigChange.ProcessFormatcomputes the new per-framecoded_sizeas{1024, 1024}.- At
video_toolbox_av1_accelerator.cc:197,coded_size != active_coded_size_, so the regeneration branch is entered.active_format_.reset()executes. libgav1::ObuParser::GetAV1CodecConfigurationBox()runs on the TU2 bytes. Finding no sequence header,libgav1returnskStatusBitstreamErrorand outputsnullptrand*av1c_size = 0(third_party/libgav1/src/src/obu_parser.cc:3017-3019).- At
video_toolbox_av1_accelerator.cc:206,av1c_spanis constructed with{nullptr, 0}. No null-check or size boundary validation is performed. CreateFormatExtensions(vt_config_util.mm:241) receives the span.[NSData dataWithBytes:nullptr length:0]creates a 0-byteNSDataobject for theav1Cextension atom.CMVideoFormatDescriptionCreatesuccessfully builds a malformed format description, which is passed toVTDecompressionSessionCreatein Apple's driver, risking an OOB memory fetch during parser initialization.
Case B: Stale av1C Reuse via Missing Parameter Keys
- Temporal Unit 1 (TU1): The attacker serves
[OBU_SEQUENCE_HEADER bitdepth=8, max_frame=128x128]+[OBU_FRAME key_frame 128x128].ProcessFormatinitializes a format description for 8-bit AV1 video.session_metadata_.bit_depthis set to8.- A VideoToolbox session configured with an 8-bit output pixel format is initialized.
- Temporal Unit 2 (TU2): The attacker serves
[OBU_SEQUENCE_HEADER bitdepth=10, max_frame=8192x8192]+[OBU_FRAME frame_size_override_flag=1 width=128 height=128].AV1Decoder::DecodeInternalparses the new sequence header and registers the bitdepth change, safely returningAcceleratedVideoDecoder::kConfigChange(media/gpu/av1_decoder.cc:385).VideoToolboxVideoDecoder::DecodereceiveskConfigChange, issues acontinue, and resumes without resetting the accelerator.ProcessFormatis invoked. It checks if the parameters changed (video_toolbox_av1_accelerator.cc:197):C++ if (color_space != active_color_space_ || profile != active_profile_ || coded_size != active_coded_size_)color_spaceis identical (bitdepth is not mapped intoVideoColorSpace).profileis identical.coded_size(the 128x128 per-frame size) is identical.- Because
bitdepthandmax_frameare structurally omitted from this condition, the block is skipped.active_format_is not reset. VideoToolboxDecompressionSessionManager::Processcompares theCMFormatDescriptionRefpointer (format != active_format_.get()). Since they match, it bypasses format evaluation.- The macOS VideoToolbox HW-accelerated driver (
VTDecompressionSessionDecodeFrame) begins decoding a 10-bit frame with an 8192x8192 sequence maximum into an 8-bit driver-allocated context, forcing an out-of-bounds driver memory write.
Suggested Fix
- Case A: Add a boundary check immediately after
GetAV1CodecConfigurationBox()inProcessFormatto ensureav1cis not null andav1c_size >= 4. If the stream lacks a sequence header (causingnullptr), the decoder should either fetch the cached header or cleanly abort decoding. - Case B: Expand the change-detection validation in
ProcessFormatto evaluatesequence_header.color_config.bitdepth != session_metadata_.bit_depthand include a comparison against the maximum sequence dimensions.
3. Technical Verification Details (Automated Audit Logs - Reviewers may skip this section)
Verbatim Critic Verdict: The vulnerability report is accurate and verified in the codebase. In
media/gpu/mac/video_toolbox_av1_accelerator.cc,ProcessFormatfails to validate the return value oflibgav1::ObuParser::GetAV1CodecConfigurationBox(). If a frame chunk lacking a sequence header triggers a format regeneration (e.g., due to a per-frame resolution change), it returnsnullptrand size0. This directly leads to a 0-byteav1Catom being passed toVTDecompressionSessionCreate, violating the AV1-ISOBMFF §2.3 spec (which requires >= 4 bytes). Furthermore, the change-detection key at line 197 omitsbitdepthandmax_frame, meaning an in-band sequence header change from 8-bit to 10-bit will not trigger a format regeneration, feeding a 10-bit stream to an 8-bitVTDecompressionSessionDecodeFrame.Severity Justification: High (S1).
- Ceiling (S1): The vulnerability exists in
media/gpu/mac/, which is macOS-specific and compile-time excluded on Android. Therefore, the GPU process is sandboxed on the target platform. Memory corruption in a sandboxed GPU process reachable from web content is capped at High (S1); the Android-unsandboxed Critical (S0) rationale does not apply.- Modifier (S2 -> S1): The original report conservatively rated this as Medium (S2) because the closed-source nature of Apple's VideoToolbox prevented empirical demonstration of an OOB write. However, per the explicit instruction: 'Bitstream field passed unvalidated to a HW-decode driver struct... Do NOT reject for no ASAN report — the corruption is driver-side. PoC = the bad value at the delegate copy step.' Because the spec-invalid values observably reach the driver call (
VTDecompressionSessionCreateandVTDecompressionSessionDecodeFrame), we assess it at the full S1 severity.
Codebase Investigator Verifications:
- Data Passthrough Validation: We checked
media/gpu/av1_decoder.cc:627-646. InAV1Decoder::DecodeAndOutputPicture,*decoder_buffer_is passed as the final argument (data) toaccelerator_->SubmitDecode(). The parameter isscoped_refptr<media::DecoderBuffer>, which resolves viastd::ranges::contiguous_rangemapping directly tobase::span<const uint8_t> data. The bytes passed are identical to the chunk delivered by the renderer. - kConfigChange Handling: We verified
media/gpu/mac/video_toolbox_video_decoder.cc:260-300.VideoToolboxVideoDecoder::Decodesafely identifiesAcceleratedVideoDecoder::kConfigChange(line 273), and subsequently triggers acontinue;(line 274). This loops without resetting or alteringaccelerator_, proving the premise of Case B. - Manager Pointer Comparison: We analyzed
VideoToolboxDecompressionSessionManager::Process(media/gpu/mac/video_toolbox_decompression_session_manager.mm:154-170). The logic explicitly gatesdecompression_session_->CanAcceptFormat(format)behind the pointer comparisonformat != active_format_.get(). If the format description reference matches, validation is bypassed.
Environmental & Feature Checks:
- The feature requires
VTIsHardwareDecodeSupported(kCMVideoCodecType_AV1), natively available on Apple Silicon M3+ / A17 Pro+ hardware. - The vulnerability triggers purely through A-SERVER logic via the
<video>orWebCodecsAPIs. No user interaction or prior renderer compromise is required.
Evaluated with Chrome root at commit: b96d2ec58f4f5f92b540a723966b199d6e9951b4
Results so far have been promising, but there can be wrong deductions. Feel free to adjust as follows:
- If you are familiar with the severity guidelines, you may adjust the severity.
- If this is a false positive, and there's no work to be done, please close as WAI.
- If there is work to do here but not a vulnerability, please change the issue type to Task/Bug/FR.
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 accelerator does not validate the output of GetAV1CodecConfigurationBox and its format change-detection logic omits bit depth and maximum frame dimensions.
Impact
This could result in potential driver-side out-of-bounds memory corruption within the sandboxed GPU process, though the report notes that empirical demonstration was not performed.
What the attacker needed
MacOS with Apple Silicon M3+ or A17 Pro+; Hardware AV1 decode support; Attacker-controlled video stream
The fix
The report suggests adding a boundary check after GetAV1CodecConfigurationBox to ensure the av1C is not null and at least 4 bytes, and expanding the change-detection validation to include bit depth and maximum sequence dimensions.
How it was found
- Serve a first temporal unit with a sequence header and a key frame, causing a valid av1C to be extracted and a decompression session to be created.
- Serve a second temporal unit without a sequence header but with a different per-frame size, triggering format regeneration.
- Observe that GetAV1CodecConfigurationBox returns nullptr and size 0, which is wrapped in a span without validation.
- The 0-byte av1C is passed to CreateFormatExtensions and then to VTDecompressionSessionCreate, risking out-of-bounds memory access.
- Alternatively, serve a first temporal unit with an 8-bit sequence header and a key frame, initialising an 8-bit session.
- Serve a second temporal unit with a 10-bit sequence header and a larger maximum frame size but the same per-frame size, so the format change is not detected and the stale 8-bit session is reused.
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 flaw in how Chrome on macOS handles certain video files. When a video changes format, the code that prepares the video for hardware decoding does not check that the configuration data is valid or that important details like colour depth have changed. An attacker could craft a video that tricks the decoder into using the wrong settings, which might crash or corrupt memory in the part of the browser that handles graphics.
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.