summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorHarry Wentland <harry.wentland@amd.com>2026-05-07 16:26:31 -0400
committerAlex Deucher <alexander.deucher@amd.com>2026-05-19 11:45:41 -0400
commitba4caa9fecdf7a38f98c878ad05a8a64148b6881 (patch)
tree91f99907dfccd9ab00eb62a6b2df1df16b1a55bb /include/linux
parent775054e27e2e033b7544896eb526af7d196f1587 (diff)
drm/amd/display: Validate payload length and link_index in dc_process_dmub_aux_transfer_async
[Why&How] dc_process_dmub_aux_transfer_async() copies payload->length bytes into a 16-byte stack buffer (dpaux.data[16]) guarded only by an ASSERT(), which is a no-op in release builds. If a caller ever passes length > 16 this results in a stack buffer overflow via memcpy. Additionally, link_index is used to dereference dc->links[] without bounds checking against dc->link_count, risking an out-of-bounds access. Replace the ASSERT with a hard runtime check that returns false when payload->length exceeds the destination buffer size, and add a bounds check for link_index before it is used. Assisted-by: GitHub Copilot:Claude claude-4-opus Reviewed-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Ivan Lipski <ivan.lipski@amd.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions