drm/gud: NUL-terminate TV mode names read from the device
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 40e1a70b4aedf2859a1829991b48ef0ebe650bf2 · < 6ea61f1d4cbaa0db937e31bffc041fb8afeacf52| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
drm/gud: NUL-terminate TV mode names read from the device
gud_connector_add_tv_mode() reads a buffer of fixed-size mode names from the USB device and passes pointers into it to drm_mode_create_tv_properties_legacy(), which calls strlen() on each one. Nothing guarantees the device NUL-terminates a name, so strlen() can run past the end of a slot and, for the last mode, past the end of the allocation.
Terminate each name at the end of its slot before use.
From the CVE record · Linux
The Linux kernel's drm/gud driver reads fixed-size TV mode names from a USB device without ensuring they are NUL-terminated. A connected device that supplies an unterminated name can cause strlen() to read beyond a name slot or the allocated buffer. This requires a USB device supplying the mode names; no authentication or user interaction is described.
Teams running Linux kernels with the drm/gud driver should check their kernel vendor's advisory for affected versions.