4b8ffbb768
[ Upstream commit d81873f9e715b72d4f8d391c8eb243946f784dfc ] This commit addresses a potential index out of bounds issue in the `cm3_helper_translate_curve_to_hw_format` function in the DCN30 color management module. The issue could occur when the index 'i' exceeds the number of transfer function points (TRANSFER_FUNC_POINTS). The fix adds a check to ensure 'i' is within bounds before accessing the transfer function points. If 'i' is out of bounds, the function returns false to indicate an error. drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_cm_common.c:180 cm3_helper_translate_curve_to_hw_format() error: buffer overflow 'output_tf->tf_pts.red' 1025 <= s32max drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_cm_common.c:181 cm3_helper_translate_curve_to_hw_format() error: buffer overflow 'output_tf->tf_pts.green' 1025 <= s32max drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_cm_common.c:182 cm3_helper_translate_curve_to_hw_format() error: buffer overflow 'output_tf->tf_pts.blue' 1025 <= s32max Cc: Tom Chung <chiahsuan.chung@amd.com> Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Cc: Roman Li <roman.li@amd.com> Cc: Alex Hung <alex.hung@amd.com> Cc: Aurabindo Pillai <aurabindo.pillai@amd.com> Cc: Harry Wentland <harry.wentland@amd.com> Cc: Hamza Mahfooz <hamza.mahfooz@amd.com> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Reviewed-by: Tom Chung <chiahsuan.chung@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org> |
||
---|---|---|
.. | ||
dcn30_afmt.c | ||
dcn30_afmt.h | ||
dcn30_cm_common.c | ||
dcn30_cm_common.h | ||
dcn30_dccg.c | ||
dcn30_dccg.h | ||
dcn30_dio_link_encoder.c | ||
dcn30_dio_link_encoder.h | ||
dcn30_dio_stream_encoder.c | ||
dcn30_dio_stream_encoder.h | ||
dcn30_dpp.c | ||
dcn30_dpp.h | ||
dcn30_dpp_cm.c | ||
dcn30_dwb.c | ||
dcn30_dwb.h | ||
dcn30_dwb_cm.c | ||
dcn30_hubbub.c | ||
dcn30_hubbub.h | ||
dcn30_hubp.c | ||
dcn30_hubp.h | ||
dcn30_hwseq.c | ||
dcn30_hwseq.h | ||
dcn30_init.c | ||
dcn30_init.h | ||
dcn30_mmhubbub.c | ||
dcn30_mmhubbub.h | ||
dcn30_mpc.c | ||
dcn30_mpc.h | ||
dcn30_opp.h | ||
dcn30_optc.c | ||
dcn30_optc.h | ||
dcn30_resource.c | ||
dcn30_resource.h | ||
dcn30_vpg.c | ||
dcn30_vpg.h | ||
Makefile |