drm/amd/display: Fix NULL deref and buffer over-read in SDP debugfs
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ c7ba3653e9773256b2b08508a2ed2ca28ea7566b · < bb6f705b73b5f191f14ad004e2c8c4b615806187| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
drm/amd/display: Fix NULL deref and buffer over-read in SDP debugfs
[Why & How] dp_sdp_message_debugfs_write() dereferences connector->base.state->crtc without checking for NULL. A connector can be connected but not bound to any CRTC (e.g. after hot-plug before the next atomic commit), causing a kernel crash when writing to the sdp_message debugfs node.
The function also ignores the user-provided size argument and always passes 36 bytes to copy_from_user(), reading past the user buffer when size < 36.
Fix both issues by: - Returning -ENODEV when connector->base.state or state->crtc is NULL - Clamping write_size to min(size, sizeof(data))
(cherry picked from commit 6ab4c36a522842ff70474a1c0af2e40e50fc8300)
From the CVE record · Linux
The Linux kernel’s AMD display SDP debugfs write handler can dereference a NULL pointer when a connected display connector is not bound to a CRTC, causing a kernel crash. It can also read past a user buffer when a write to the sdp_message debugfs node supplies fewer than 36 bytes. Triggering these issues requires writing to that node; the input does not specify authentication requirements.
Engineers running Linux kernels with AMD display SDP debugfs should check whether their kernel includes the fix; affected versions were not specified.