kernel_samsung_a53x/drivers/gpu/drm/amd
Alex Hung eb5556c208 drm/amd/display: Check index msg_id before read or write
[ Upstream commit 59d99deb330af206a4541db0c4da8f73880fba03 ]

[WHAT]
msg_id is used as an array index and it cannot be a negative value, and
therefore cannot be equal to MOD_HDCP_MESSAGE_ID_INVALID (-1).

[HOW]
Check whether msg_id is valid before reading and setting.

This fixes 4 OVERRUN issues reported by Coverity.

Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Acked-by: Wayne Lin <wayne.lin@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 14:19:40 +01:00
..
acp Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
amdgpu drm/amdgpu: Initialize timestamp for some legacy SOCs 2024-11-19 14:19:40 +01:00
amdkfd drm/amdkfd: Flush the process wq before creating a kfd_process 2024-11-19 12:26:52 +01:00
display drm/amd/display: Check index msg_id before read or write 2024-11-19 14:19:40 +01:00
include drm/amd: Fix UBSAN array-index-out-of-bounds for SMU7 2024-11-18 11:43:13 +01:00
pm drm/amdgpu: fix UBSAN warning in kv_dpm.c 2024-11-19 14:19:31 +01:00