OpenCloudOS-Kernel/drivers/gpu
Zhipeng Lu adc0a5378d drm/amd/pm: fix a double-free in si_dpm_init
[ Upstream commit ac16667237a82e2597e329eb9bc520d1cf9dff30 ]

[tapd]
https://tapd.woa.com/TS4Q/prong/stories/view/1020422414118043047

This fixes CVE-2023-52691

When the allocation of
adev->pm.dpm.dyn_state.vddc_dependency_on_dispclk.entries fails,
amdgpu_free_extended_power_table is called to free some fields of adev.
However, when the control flow returns to si_dpm_sw_init, it goes to
label dpm_failed and calls si_dpm_fini, which calls
amdgpu_free_extended_power_table again and free those fields again. Thus
a double-free is triggered.

Fixes: 841686df9f ("drm/amdgpu: add SI DPM support (v4)")
Signed-off-by: Zhipeng Lu <alexious@zju.edu.cn>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: yilingjin <yilingjin@tencent.com>
Reviewed-by: Hui Li <caelli@tencent.com>
Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
2024-11-28 15:02:09 +08:00
..
drm drm/amd/pm: fix a double-free in si_dpm_init 2024-11-28 15:02:09 +08:00
host1x tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
ipu-v3 tkernel: sync code to the same with tk4 pub/lts/0017-kabi 2024-06-12 13:13:20 +08:00
vga topic/remove-fbcon-notifiers: 2019-06-26 12:26:34 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00