kernel_samsung_a53x/drivers/gpu/drm/vmwgfx
Zack Rusin 43dff1a356 drm/vmwgfx: Fix invalid reads in fence signaled events
commit a37ef7613c00f2d72c8fc08bd83fb6cc76926c8c upstream.

Correctly set the length of the drm_event to the size of the structure
that's actually used.

The length of the drm_event was set to the parent structure instead of
to the drm_vmw_event_fence which is supposed to be read. drm_read
uses the length parameter to copy the event to the user space thus
resuling in oob reads.

Signed-off-by: Zack Rusin <zack.rusin@broadcom.com>
Fixes: 8b7de6aa8468 ("vmwgfx: Rework fence event action")
Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-23566
Cc: David Airlie <airlied@gmail.com>
CC: Daniel Vetter <daniel@ffwll.ch>
Cc: Zack Rusin <zack.rusin@broadcom.com>
Cc: Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Cc: <stable@vger.kernel.org> # v3.4+
Reviewed-by: Maaz Mombasawala <maaz.mombasawala@broadcom.com>
Reviewed-by: Martin Krastev <martin.krastev@broadcom.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240425192748.1761522-1-zack.rusin@broadcom.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-19 11:32:49 +01:00
..
device_include
Kconfig
Makefile
ttm_lock.c
ttm_lock.h
ttm_object.c
ttm_object.h
vmwgfx_binding.c drm/vmwgfx: Fix some static checker warnings 2024-11-19 09:22:15 +01:00
vmwgfx_binding.h
vmwgfx_blit.c drm/vmwgfx: switch over to the new pin interface v2 2024-11-19 09:22:14 +01:00
vmwgfx_bo.c drm/vmwgfx: switch over to the new pin interface v2 2024-11-19 09:22:14 +01:00
vmwgfx_cmdbuf.c drm/vmwgfx: Fix some static checker warnings 2024-11-19 09:22:15 +01:00
vmwgfx_cmdbuf_res.c drm/vmwgfx: Fix some static checker warnings 2024-11-19 09:22:15 +01:00
vmwgfx_context.c
vmwgfx_cotable.c drm/vmwgfx: switch over to the new pin interface v2 2024-11-19 09:22:14 +01:00
vmwgfx_drv.c drm/vmwgfx: switch over to the new pin interface v2 2024-11-19 09:22:14 +01:00
vmwgfx_drv.h drm/vmwgfx: switch over to the new pin interface v2 2024-11-19 09:22:14 +01:00
vmwgfx_execbuf.c drm/vmwgfx: Fix possible null pointer derefence with invalid contexts 2024-11-19 09:22:15 +01:00
vmwgfx_fb.c drm/vmwgfx: switch over to the new pin interface v2 2024-11-19 09:22:14 +01:00
vmwgfx_fence.c drm/vmwgfx: Fix invalid reads in fence signaled events 2024-11-19 11:32:49 +01:00
vmwgfx_fence.h
vmwgfx_fifo.c
vmwgfx_gmr.c
vmwgfx_gmrid_manager.c
vmwgfx_ioctl.c
vmwgfx_irq.c
vmwgfx_kms.c
vmwgfx_kms.h
vmwgfx_ldu.c
vmwgfx_marker.c
vmwgfx_mob.c drm/vmwgfx: Fix some static checker warnings 2024-11-19 09:22:15 +01:00
vmwgfx_msg.c drm/vmwgfx: Fix some static checker warnings 2024-11-19 09:22:15 +01:00
vmwgfx_msg.h
vmwgfx_overlay.c
vmwgfx_page_dirty.c
vmwgfx_prime.c
vmwgfx_reg.h
vmwgfx_resource.c drm/vmwgfx: Fix some static checker warnings 2024-11-19 09:22:15 +01:00
vmwgfx_resource_priv.h
vmwgfx_scrn.c drm/vmwgfx: switch over to the new pin interface v2 2024-11-19 09:22:14 +01:00
vmwgfx_shader.c drm/vmwgfx: switch over to the new pin interface v2 2024-11-19 09:22:14 +01:00
vmwgfx_simple_resource.c
vmwgfx_so.c drm/vmwgfx: Fix some static checker warnings 2024-11-19 09:22:15 +01:00
vmwgfx_so.h
vmwgfx_stdu.c
vmwgfx_streamoutput.c
vmwgfx_surface.c
vmwgfx_thp.c
vmwgfx_ttm_buffer.c drm/vmwgfx: switch over to the new pin interface v2 2024-11-19 09:22:14 +01:00
vmwgfx_ttm_glue.c
vmwgfx_va.c
vmwgfx_validation.c drm/vmwgfx: Fix some static checker warnings 2024-11-19 09:22:15 +01:00
vmwgfx_validation.h