linux/drivers/gpu/drm/amd
Takashi Iwai 6847b3b6e8 drm/amd/display: Add sanity checks for drm_edid_raw()
When EDID is retrieved via drm_edid_raw(), it doesn't guarantee to
return proper EDID bytes the caller wants: it may be either NULL (that
leads to an Oops) or with too long bytes over the fixed size raw_edid
array (that may lead to memory corruption).  The latter was reported
actually when connected with a bad adapter.

Add sanity checks for drm_edid_raw() to address the above corner
cases, and return EDID_BAD_INPUT accordingly.

Fixes: 48edb2a425 ("drm/amd/display: switch amdgpu_dm_connector to use struct drm_edid")
Link: https://bugzilla.suse.com/show_bug.cgi?id=1236415
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 648d3f4d20)
Cc: stable@vger.kernel.org
2025-06-24 10:39:24 -04:00
..
acp drivers/gpu: Fix misalignment in comment block 2024-05-29 14:48:30 -04:00
amdgpu drm/amdgpu/sdma7: add ucode version checks for userq support 2025-06-24 10:38:05 -04:00
amdkfd drm/amdkfd: Fix race in GWS queue scheduling 2025-06-18 13:17:32 -04:00
amdxcp drm/amd/amdxcp: Fix warnings 2024-05-08 15:17:05 -04:00
display drm/amd/display: Add sanity checks for drm_edid_raw() 2025-06-24 10:39:24 -04:00
include drm/amdgpu: Add userq fence support to SDMAv7.0 2025-06-03 15:32:50 -04:00
pm drm/amdgpu: add kicker fws loading for gfx11/smu13/psp13 2025-06-18 13:09:41 -04:00