kernel_samsung_a53x/drivers/gpu/drm/amd/display/modules/hdcp
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
..
hdcp.c drm/amd/display: revert Exit idle optimizations before HDCP execution 2024-11-19 14:19:10 +01:00
hdcp.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hdcp1_execution.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hdcp1_transition.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hdcp2_execution.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hdcp2_transition.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hdcp_ddc.c drm/amd/display: Check index msg_id before read or write 2024-11-19 14:19:40 +01:00
hdcp_log.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hdcp_log.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hdcp_psp.c drm/amd/display: Return the correct HDCP error code 2024-11-19 09:22:37 +01:00
hdcp_psp.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00