drm/radeon: possible buffer overflow
[ Upstream commitdd05484f99] Buffer 'afmt_status' of size 6 could overflow, since index 'afmt_idx' is checked after access. Fixes:5cc4e5fc29("drm/radeon: Cleanup HDMI audio interrupt handling for evergreen") Co-developed-by: Ivanov Mikhail <ivanov.mikhail1@huawei-partners.com> Signed-off-by: Konstantin Meskhidze <konstantin.meskhidze@huawei.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a6d6769e2d
commit
7b063c93be
@@ -4819,14 +4819,15 @@ restart_ih:
|
||||
break;
|
||||
case 44: /* hdmi */
|
||||
afmt_idx = src_data;
|
||||
if (!(afmt_status[afmt_idx] & AFMT_AZ_FORMAT_WTRIG))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
if (afmt_idx > 5) {
|
||||
DRM_ERROR("Unhandled interrupt: %d %d\n",
|
||||
src_id, src_data);
|
||||
break;
|
||||
}
|
||||
|
||||
if (!(afmt_status[afmt_idx] & AFMT_AZ_FORMAT_WTRIG))
|
||||
DRM_DEBUG("IH: IH event w/o asserted irq bit?\n");
|
||||
|
||||
afmt_status[afmt_idx] &= ~AFMT_AZ_FORMAT_WTRIG;
|
||||
queue_hdmi = true;
|
||||
DRM_DEBUG("IH: HDMI%d\n", afmt_idx + 1);
|
||||
|
||||
Reference in New Issue
Block a user