CVE-2022-49530

Source
https://cve.org/CVERecord?id=CVE-2022-49530
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49530.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2022-49530
Downstream
Related
Published
2025-02-26T02:13:51.057Z
Modified
2026-04-02T08:27:40.757753Z
Severity
  • 7.8 (High) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
drm/amd/pm: fix double free in si_parse_power_table()
Details

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

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

In function siparsepowertable(), 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 sidpm_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.numps, 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 sidpm_fini().

Fix this by postponing the free of the array until sidpmfini() and increment adev->pm.dpm.num_ps everytime the array member is allocated.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49530.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
841686df9f7d2942cfd94d024b8591fa3f74ef7c
Fixed
2615464854505188f909d0c07c37a6623693b5c7
Fixed
6c5bdaa1325be7f04b79ea992ab216739192d342
Fixed
c0e811c4ccf3b42705976285e3a94cc82dea7300
Fixed
af832028af6f44c6c45645757079c4ed6884ade5
Fixed
ca1ce206894dd976275c78ee38dbc19873f22de9
Fixed
a5ce7051db044290b1a95045ff03c249005a3aa4
Fixed
fd2eff8b9dcbe469c3b7bbbc7083ab5ed94de07b
Fixed
43eb9b667b95f2a31c63e8949b0d2161b9be59c3
Fixed
f3fa2becf2fc25b6ac7cf8d8b1a2e4a86b3b72bd

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49530.json"