summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorAldo Ariel Panzardo <qwe.aldo@gmail.com>2026-10-07 18:20:49 -0300
committerZack Rusin <zack.rusin@broadcom.com>2026-11-16 20:39:49 -0500
commit30131b82b062180183a09a97183a944fadab72ee (patch)
tree8fb24e94e395316ec14afe4079eeaecd03c40971 /tools/perf/scripts/python/bin
parent3a2f97af36754b64083d463a4cee0af26826bec8 (diff)
drm/vmwgfx: close TOCTOU on guest_memory_bo in surface reference ioctl
vmw_gb_surface_reference_internal() checks srf->res.guest_memory_bo for NULL and reads its vma_node offset and base.size outside the cmdbuf_mutex scope that protects the backup pointer. A concurrent backup switch, e.g. from SVGA_3D_CMD_BIND_GB_SURFACE via vmw_resource_unreserve(), drops its reference to the old buffer and installs a new one under cmdbuf_mutex. The unlocked check in the surface reference ioctl can see a transient NULL. The reads after the unlock can return another buffer's offset and size; a further switch can drop that buffer's last reference and free it while the ioctl reads from it. Move the NULL check inside the mutex, and read buffer_map_handle and buffer_size while still holding it. Fixes: a97e21923b42 ("drm/vmwgfx: Hook up guest-backed surfaces") Cc: stable@vger.kernel.org Reported-by: Sashiko <sashiko-bot@kernel.org> Closes: https://lore.kernel.org/r/20260808233347.209DD1F000E9@smtp.kernel.org Signed-off-by: Aldo Ariel Panzardo <qwe.aldo@gmail.com> Reviewed-by: Zack Rusin <zack.rusin@broadcom.com> Signed-off-by: Zack Rusin <zack.rusin@broadcom.com> Link: https://patch.msgid.link/20261007212051.2574235-3-qwe.aldo@gmail.com
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions