summaryrefslogtreecommitdiff
path: root/rust/kernel
diff options
context:
space:
mode:
authorZack Rusin <zack.rusin@broadcom.com>2026-11-11 13:41:45 -0500
committerZack Rusin <zack.rusin@broadcom.com>2026-11-16 15:09:29 -0500
commit06069d6d650dbef746eb933e2f4fbfc686b6d330 (patch)
tree0816484ff320c58eb17fc83eb2332136b93aff44 /rust/kernel
parent43ec31efbc92b2ffa2f707b04acc6d7a6173c728 (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')
0 files changed, 0 insertions, 0 deletions