CVE-2022-49530

drm/amd/pm: fix double free in si_parse_power_table()

High · published February 26, 2025

CVSS v3.1
7.8
EPSS
0%
Percentile
19.8
In the wild
Unconfirmed
What it is

In the Linux kernel, the following vulnerability has been resolved:

drm/amd/pm: fix double free in si_parse_power_table()

In function si_parse_power_table(), array adev->pm.dpm.ps and its member

is allocated. If the allocation of each member fails, the array itself

is freed and returned with an error code. However, the array is later

freed again in si_dpm_fini() function which is called when the function

returns an error.

This leads to potential double free of the array adev->pm.dpm.ps, as

well as leak of its array members, since the members are not freed in

the allocation function and the array is not nulled when freed.

In addition adev->pm.dpm.num_ps, which keeps track of the allocated

array member, is not updated until the member allocation is

successfully finished, this could also lead to either use after free,

or uninitialized variable access in si_dpm_fini().

Fix this by postponing the free of the array until si_dpm_fini() and

increment adev->pm.dpm.num_ps everytime the array member is allocated.

The record
Technical detail
CVSS v3.1
7.8 · HIGH
Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00284 · 19.8th percentile
Published
2025-02-26T02:13Z
EPSS history
Timeline
  • 26 FEB 02:13Z
    drm/amd/pm: fix double free in si_parse_power_table()
    cvelistv5