summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2025-06-16 19:08:41 +0300
committerAlex Deucher <alexander.deucher@amd.com>2025-06-24 17:05:44 +0300
commit648d3f4d209725d51900d6a3ed46b7b600140cdf (patch)
tree698acdbd5a2ab2eaa59045d9571bda6875120e54 /drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c
parent1b92cb40b4a080dd84aad4ebd06528d69f7a705e (diff)
downloadlinux-648d3f4d209725d51900d6a3ed46b7b600140cdf.tar.xz
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: 48edb2a4256e ("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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c')
0 files changed, 0 insertions, 0 deletions