diff options
| author | Zack Rusin <zack.rusin@broadcom.com> | 2026-11-11 13:41:45 -0500 |
|---|---|---|
| committer | Zack Rusin <zack.rusin@broadcom.com> | 2026-11-16 15:09:29 -0500 |
| commit | 06069d6d650dbef746eb933e2f4fbfc686b6d330 (patch) | |
| tree | 0816484ff320c58eb17fc83eb2332136b93aff44 /rust/kernel/alloc/kvec/errors.rs | |
| parent | 43ec31efbc92b2ffa2f707b04acc6d7a6173c728 (diff) | |
drm/vmwgfx: validate command body sizes before parsing
vmw_cmd_check verifies that a command's declared size fits in the
submitted buffer, but handlers can access fields beyond the declared
body. A truncated body can therefore cause relocations to target the
next command. Applying those relocations after validation can change
an already validated command ID and bypass command restrictions.
Legacy query conversion can also overwrite the next command, while
texture-state parsing can access fields beyond a truncated final record.
Check each handler's minimum body size before accessing command fields.
Use the common prefix for shared handlers to preserve shorter command
variants, and reject texture-state arrays containing incomplete records.
Fixes: fb1d9738ca05 ("drm/vmwgfx: Add DRM driver for VMware Virtual GPU")
Cc: stable@vger.kernel.org
Signed-off-by: Zack Rusin <zack.rusin@broadcom.com>
Reviewed-by: Maaz Mombasawala <maaz.mombasawala@broadcom.com>
Link: https://patch.msgid.link/20261111193836.3161904-1-zack.rusin@broadcom.com
Diffstat (limited to 'rust/kernel/alloc/kvec/errors.rs')
0 files changed, 0 insertions, 0 deletions
