Out of bounds read in SurfaceCapture (CVE-2026-14011)
The renderer fails to validate that the shared memory buffer is large enough for the V-plane when custom strides are supplied by a compromised GPU process. An attacker could trigger an out-of-bounds heap read, potentially leaking adjacent renderer memory.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 35 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: A potential vulnerability in Chromium's video capture pipeline allows a compromised GPU/viz process to relay unvalidated video frame stride parameters to the renderer. Due to a lack of bounds verification in the renderer's frame-wrapping and copying logic, this can lead to an out-of-bounds heap read. An attacker could potentially exploit this to leak adjacent renderer memory back to the GPU process or the capturing web page.
Affected files:
content/browser/media/capture/frame_sink_video_capture_device.ccthird_party/blink/renderer/platform/video_capture/video_capture_impl.ccthird_party/blink/renderer/modules/mediastream/web_media_player_ms_compositor.cc
Estimated timestamp from git blame: 2021-02-01
Potential Heap Out-Of-Bounds Read in Renderer via Video Capture Relay
Summary
A potential security vulnerability in the capture pipeline allows a compromised GPU/viz process to send unvalidated video frame stride parameters to a renderer. Because the renderer fails to verify that the allocated shared memory region is large enough to satisfy the custom strides of all planes, subsequent frame-copying operations can trigger an out-of-bounds (OOB) heap read, potentially exposing adjacent renderer memory.
Root Cause Analysis
-
Unvalidated Strides in
ProcessBuffer: Inthird_party/blink/renderer/platform/video_capture/video_capture_impl.cc, theVideoCaptureImpl::ProcessBufferfunction processeskUnsafeShmemRegionbuffers with custom strides. While it usessplit_at()to split the main shared memory span intoy_dataanduv_data, it only validates that the sum of the Y and U plane sizes does not exceed the buffer. It does not validate whether the remainingv_dataspan is large enough to cover the expected size of the V-plane (i.e.,Rows(Plane::kV, format, height) * stride_by_plane[2]):C++ const size_t y_size = Rows(kY, fmt, coded_h) * stride[0]; const size_t u_size = Rows(kU, fmt, coded_h) * stride[1]; auto [y_data, uv_data] = data.split_at(y_size); auto [u_data, v_data] = uv_data.split_at(u_size);If the attacker specifies an arbitrarily large V-stride,
v_datais wrapped into aVideoFrameviamedia::VideoFrame::WrapExternalYuvDatadespite being truncated. -
Bypassing Span Guards during Copying: In
third_party/blink/renderer/modules/mediastream/web_media_player_ms_compositor.cc(insideReplaceCurrentFrameWithACopy), the raw pointers to the planes are retrieved usingframe->data(plane):C++ libyuv::I420Copy(frame->data(media::VideoFrame::Plane::kY), frame->stride(media::VideoFrame::Plane::kY), frame->data(media::VideoFrame::Plane::kU), frame->stride(media::VideoFrame::Plane::kU), frame->data(media::VideoFrame::Plane::kV), frame->stride(media::VideoFrame::Plane::kV), ...);Because
frame->data(plane)returns raw pointers directly, it bypasses the bounds checking and subspan restrictions that would normally be enforced by callingframe->visible_data(plane)or checkingdata_span(plane). Whenlibyuv::I420Copyattempts to copy the V-plane using the malicious, massive stride, it reads heavily out-of-bounds on the renderer's heap.
Suggested Potential Reproduction Steps
(Note: These are theoretical/potential steps, as our current tooling does not have the ability to execute or verify proof-of-concept code.)
- From a compromised GPU process, intercept or initiate an active screen/tab/window capture session.
- Invoke
OnFrameCapturedvia theviz::mojom::FrameSinkVideoConsumerMojo interface, passing a customVideoFrameInfowherestride_by_plane[2](V-plane stride) is set to an exceptionally large value (e.g.,1,000,000), while allocating a shared memory handle only large enough to cover the Y and U planes. - In the renderer, trigger a frame copy event (such as pausing the video capture self-preview or backgrounding the tab).
- Observe
libyuv::I420Copyperforming an out-of-bounds heap read based on the custom stride, copying adjacent heap data into the destination video frame.
Proposed Remediation
To fix this issue, ensure that the renderer validates all custom strides against the actual sizes of the respective spans before wrapping them into a VideoFrame.
Inside VideoCaptureImpl::ProcessBuffer:
- Verify that the final plane's remaining buffer (
v_data) size is at least as large as the computed V-plane size (Rows(Plane::kV, format, height) * stride_by_plane[2]). If not, discard the buffer and drop the frame. - Additionally, update
WebMediaPlayerMSCompositorto retrieve spans or check dimensions prior to callinglibyuvcopy functions.
Evaluated with Chrome root at commit: b1520ef4a76878853a31f0943b565e42060edec8
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
Likely the renderer only checked that the Y and U plane sizes fit within the shared memory, but did not verify that the remaining space covered the V-plane size computed from the attacker-controlled stride.
Impact
A compromised GPU process could potentially leak adjacent renderer memory back to the GPU process or the capturing web page.
What the attacker needed
Compromised GPU/viz process; active capture session
The fix
The renderer should validate all custom strides against the actual span sizes before wrapping them into a VideoFrame, and the compositor should use spans or dimension checks before copying.
How it was found
- From a compromised GPU process, start an active screen, tab, or window capture session.
- Send a captured frame through the Mojo interface with a very large V-plane stride and a shared memory buffer sized only for the Y and U planes.
- In the renderer, trigger a frame copy event, such as pausing the self-preview or backgrounding the tab.
- Observe the copy operation reading out of bounds and copying adjacent heap data into the destination frame.
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 video frame is stored in memory with rows of pixels, and a 'stride' is the number of bytes between the start of one row and the next. The renderer trusted a stride value from another process without checking that the memory buffer was big enough, so it could read past the end of the buffer and expose nearby memory.
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.