mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-27 03:49:57 -04:00
drm/amdgpu: check PS, WS index
Theoretically, it would be possible for a buggy or malicious VBIOS to overwrite past the bounds of the passed parameters (or its own workspace); add bounds checking to prevent this from happening. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3093 Signed-off-by: Alexander Richards <electrodeyt@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
a25dea474a
commit
4630d5031c
@@ -37,7 +37,7 @@
|
||||
#define EXEC_BIOS_CMD_TABLE(command, params)\
|
||||
(amdgpu_atom_execute_table(((struct amdgpu_device *)bp->base.ctx->driver_context)->mode_info.atom_context, \
|
||||
GetIndexIntoMasterTable(COMMAND, command), \
|
||||
(uint32_t *)¶ms) == 0)
|
||||
(uint32_t *)¶ms, sizeof(params)) == 0)
|
||||
|
||||
#define BIOS_CMD_TABLE_REVISION(command, frev, crev)\
|
||||
amdgpu_atom_parse_cmd_header(((struct amdgpu_device *)bp->base.ctx->driver_context)->mode_info.atom_context, \
|
||||
|
||||
Reference in New Issue
Block a user