linux/drivers/gpu/drm/v3d
Maíra Canal 2f8b8593c7
drm/v3d: Reject invalid indirect BO handle in indirect CSD setup
v3d_get_cpu_indirect_csd_params() looks up the indirect buffer object
from a userspace-supplied handle but never checks the result. A bogus
or stale handle makes drm_gem_object_lookup() return NULL, which is
then stored in info->indirect and only dereferenced later when the
indirect CSD job runs, turning a userspace mistake into a NULL pointer
dereference in the kernel.

Bail out with -ENOENT as soon as the lookup fails, so the bad handle is
rejected at submission time.

Fixes: 18b8413b25 ("drm/v3d: Create a CPU job extension for a indirect CSD job")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Link: https://patch.msgid.link/20260703-v3d-cpu-job-fixes-v3-2-bc51b1f3eeb5@igalia.com
2026-07-07 18:52:13 -03:00
..
Kconfig drm/v3d: Add support for bcm2711 2022-06-12 22:10:50 -01:00
Makefile drm/v3d: Introduce Runtime Power Management 2026-04-04 07:41:08 -03:00
v3d_bo.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
v3d_debugfs.c drm/v3d: Introduce Runtime Power Management 2026-04-04 07:41:08 -03:00
v3d_drv.c drm/v3d: Introduce Runtime Power Management 2026-04-04 07:41:08 -03:00
v3d_drv.h drm/v3d: Introduce Runtime Power Management 2026-04-04 07:41:08 -03:00
v3d_fence.c drm/v3d: Remove dedicated fence_lock 2026-03-13 18:02:32 -03:00
v3d_gem.c drm-next for 7.2-rc1 2026-06-17 10:21:00 +01:00
v3d_irq.c drm/v3d: Allocate all resources before enabling the clock 2026-04-04 07:41:08 -03:00
v3d_mmu.c drm/v3d: Flush MMU TLB and cache during runtime resume 2026-06-01 18:40:46 -03:00
v3d_perfmon.c drm-next for 7.2-rc1 2026-06-17 10:21:00 +01:00
v3d_performance_counters.h drm/v3d: Fix miscellaneous documentation errors 2024-12-11 10:06:14 -03:00
v3d_power.c drm/v3d: Clean caches before runtime suspend 2026-06-01 18:40:55 -03:00
v3d_regs.h drm/v3d: Use V3D_SMS registers for power on/off and reset on V3D 7.x 2025-03-23 11:06:15 -03:00
v3d_sched.c drm-next for 7.2-rc1 2026-06-17 10:21:00 +01:00
v3d_submit.c drm/v3d: Reject invalid indirect BO handle in indirect CSD setup 2026-07-07 18:52:13 -03:00
v3d_sysfs.c drm/v3d: Refcount v3d_stats 2026-03-13 18:02:32 -03:00
v3d_trace_points.c
v3d_trace.h drm/v3d: Create tracepoints to track the CPU job 2023-12-01 09:37:48 -03:00