drm/vmwgfx: bound DMA command body size against suffix pointer
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 4e4ddd47774313accc86b233d6ca2c6a9037a671 · < 7e40e6120fb232a10b543ffd994e5c6d8f3a2cc6| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
drm/vmwgfx: bound DMA command body size against suffix pointer
vmw_cmd_dma() locates the DMA suffix at
(unsigned long) &cmd->body + header->size - sizeof(*suffix)
without checking that header->size is large enough to contain both cmd->body and the suffix. An undersized header makes the suffix pointer underflow back into the previous command in the bounce buffer. The verifier later writes suffix->maximumOffset, clobbering verified fields of an already-relocated earlier command -- a TOCTOU on the device-visible command stream that lets one command rewrite another's GMR id, surface id, or other authenticated fields.
Reject the command if the body is too small for the suffix to fit.
From the CVE record · Linux
The Linux kernel’s drm/vmwgfx DMA command verifier does not check that a command body is large enough to hold its suffix. An undersized command can cause the verifier to overwrite authenticated fields in an earlier command, including a GMR or surface ID. The input does not specify access requirements or whether user interaction is needed.
Engineers running Linux kernels with drm/vmwgfx should check their kernel version; affected versions are not specified.