diff options
| author | Alexander Richards <[email protected]> | 2024-01-11 15:04:48 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2024-01-15 23:35:37 +0000 |
| commit | 4630d5031cd87438cc14a4619b8d4148eef1405e (patch) | |
| tree | b38dcfdb2613a215e81b60833525f21e187ba5eb /drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | |
| parent | drm/amd/display: Add Replay IPS register for DMUB command table (diff) | |
| download | kernel-4630d5031cd87438cc14a4619b8d4148eef1405e.tar.gz kernel-4630d5031cd87438cc14a4619b8d4148eef1405e.zip | |
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 <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c index fb2681dd6b33..6857c586ded7 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c @@ -941,5 +941,6 @@ int amdgpu_atomfirmware_asic_init(struct amdgpu_device *adev, bool fb_reset) return -EINVAL; } - return amdgpu_atom_execute_table(ctx, ATOM_CMD_INIT, (uint32_t *)&asic_init_ps_v2_1); + return amdgpu_atom_execute_table(ctx, ATOM_CMD_INIT, (uint32_t *)&asic_init_ps_v2_1, + sizeof(asic_init_ps_v2_1)); } |
