drm/gud: validate TV mode names before creating enum property
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 40e1a70b4aedf2859a1829991b48ef0ebe650bf2 · < eab46d9629807db1b5647d17227e16110a18227f| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
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.
From the CVE record · Linux
The Linux kernel’s drm/gud driver does not validate that TV mode names returned by a device are NUL-terminated within their fixed-size slots. A device that returns a malformed name can cause an out-of-bounds read when the kernel creates a DRM property.
Engineers running Linux kernels with the drm/gud driver should check whether their kernel includes the fix; affected versions were not specified.