linux/drivers/gpu
Tao Yu da1ea35fea
drm/gud: validate TV mode names before creating enum property
The GUD protocol returns TV mode names as fixed-size
GUD_CONNECTOR_TV_MODE_NAME_LEN entries and requires each name to be
NUL-terminated.

gud_connector_add_tv_mode() currently passes each fixed-size entry
directly to drm_mode_create_tv_properties_legacy(), which eventually
reaches drm_property_add_enum() and strlen(). If a device returns an
entry without a terminating NUL byte, strlen() reads past the end of
the slot and can run beyond the allocated buffer, triggering an
out-of-bounds read.

Validate that each returned TV mode name contains a NUL terminator
within its fixed-size slot before passing it to the DRM property code.
If a malformed entry is found, reject the device response with -EIO.

This fixes the out-of-bounds read without changing the handling of
valid devices, and avoids silently truncating malformed protocol data.

Reported-by: syzbot+9ae8e7884e451eaed5b4@syzkaller.appspotmail.com
Fixes: 40e1a70b4a ("drm: Add GUD USB Display driver")
Signed-off-by: Tao Yu <tao1.yu@intel.com>
Reviewed-by: Ruben Wauters <rubenru09@aol.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Ruben Wauters <rubenru09@aol.com>
Link: https://patch.msgid.link/20260819072835.4074130-1-tao1.yu@intel.com
2026-08-23 17:20:00 +01:00
..
drm drm/gud: validate TV mode names before creating enum property 2026-08-23 17:20:00 +01:00
host1x gpu: host1x: Fix use-after-free in host1x_bo_clear_cached_mappings 2026-07-16 20:26:28 +02:00
ipu-v3
nova-core drm-next for 7.2-rc1 2026-06-17 10:21:00 +01:00
tests gpu/tests/gpu_buddy: Add gpu_test_buddy_alloc_range for exact-range allocation 2026-03-09 13:58:12 +05:30
trace
vga fbdev: Wrap fbcon updates from vga-switcheroo in helper 2026-06-09 16:00:11 +02:00
buddy.c gpu/buddy: bail out of try_harder when alignment cannot be honoured 2026-07-09 18:49:49 +05:30
Kconfig
Makefile