CVE-2026-80700: drm/vmwgfx: validate external BO copy bounds for both stride paths
In the Linux kernel, the following vulnerability has been resolved:
drm/vmwgfx: validate external BO copy bounds for both stride paths
vmwexternalbocopy() trusts caller-supplied offsets, strides, and heights and operates on imported dma-buf vmaps:
- The equal-stride memcpy() bound was clamped after subtracting the offsets from dstsize and srcsize; an offset larger than the BO size wraps the unsigned subtraction to a huge value and the resulting memcpy() runs off the end of the vmap. dststride height is also a u32 multiplication that can overflow. - The non-equal-stride row-by-row path had no bound at all. The loop touches bytes through offset + (height - 1) stride + widthinbytes, with only a WARNON(dststride < widthinbytes), and could likewise step past the end of either mapping.
The offsets and strides are derived from STDU/SOU plane state, so a configured CRTC submitting a crafted atomic commit on an imported framebuffer can reach this path.
Validate the exact row-copy endpoint against each BO's size up front using checkmuloverflow() and checkaddoverflow(). Use the bulk memcpy() path only when widthinbytes covers the whole stride; otherwise copy one row at a time so partial-row updates near the bottom of a framebuffer remain valid. Also reject zero strides and stride < widthinbytes, both of which the row-by-row path cannot represent safely.
Affected Software
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Exposure requires the vmwgfx driver path to be used with a configured CRTC and an imported framebuffer. The vulnerable copy operation is reached through STDU/SOU plane state during an atomic commit.
What does an attacker need to control to trigger the out-of-bounds access?
An attacker needs to submit a crafted atomic commit using an imported framebuffer. The relevant offsets, strides, and heights are derived from the STDU/SOU plane state and can cause copying beyond either mapped buffer.