drm/amd/powerplay: fix VoltageObjectInfo zero-stride loop and OOB read

Reject voltage objects whose usSize is smaller than the header or would
advance the cursor past the table end, preventing an infinite loop or
heap OOB read when the VBIOS supplies a malformed VoltageObjectInfo table.

Fixes: c82baa2818 ("drm/amd/powerplay: add Tonga dpm support (v3)")
Fixes: 0d2c7569e1 ("drm/amdgpu: add new atomfirmware based helpers for powerplay")
Signed-off-by: Asad Kamal <asad.kamal@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Asad Kamal 2026-06-23 00:25:04 +08:00 • committed by Alex Deucher
commit 5d3cc8e388
2 changed files with 16 additions and 5 deletions