{"id":"CVE-2022-49530","summary":"drm/amd/pm: fix double free in si_parse_power_table()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amd/pm: fix double free in si_parse_power_table()\n\nIn function si_parse_power_table(), array adev-\u003epm.dpm.ps and its member\nis allocated. If the allocation of each member fails, the array itself\nis freed and returned with an error code. However, the array is later\nfreed again in si_dpm_fini() function which is called when the function\nreturns an error.\n\nThis leads to potential double free of the array adev-\u003epm.dpm.ps, as\nwell as leak of its array members, since the members are not freed in\nthe allocation function and the array is not nulled when freed.\nIn addition adev-\u003epm.dpm.num_ps, which keeps track of the allocated\narray member, is not updated until the member allocation is\nsuccessfully finished, this could also lead to either use after free,\nor uninitialized variable access in si_dpm_fini().\n\nFix this by postponing the free of the array until si_dpm_fini() and\nincrement adev-\u003epm.dpm.num_ps everytime the array member is allocated.","modified":"2026-03-20T12:24:38.184231Z","published":"2025-02-26T02:13:51.057Z","related":["SUSE-SU-2025:1176-1","SUSE-SU-2025:1241-1","SUSE-SU-2025:1293-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49530.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/2615464854505188f909d0c07c37a6623693b5c7"},{"type":"WEB","url":"https://git.kernel.org/stable/c/43eb9b667b95f2a31c63e8949b0d2161b9be59c3"},{"type":"WEB","url":"https://git.kernel.org/stable/c/6c5bdaa1325be7f04b79ea992ab216739192d342"},{"type":"WEB","url":"https://git.kernel.org/stable/c/a5ce7051db044290b1a95045ff03c249005a3aa4"},{"type":"WEB","url":"https://git.kernel.org/stable/c/af832028af6f44c6c45645757079c4ed6884ade5"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c0e811c4ccf3b42705976285e3a94cc82dea7300"},{"type":"WEB","url":"https://git.kernel.org/stable/c/ca1ce206894dd976275c78ee38dbc19873f22de9"},{"type":"WEB","url":"https://git.kernel.org/stable/c/f3fa2becf2fc25b6ac7cf8d8b1a2e4a86b3b72bd"},{"type":"WEB","url":"https://git.kernel.org/stable/c/fd2eff8b9dcbe469c3b7bbbc7083ab5ed94de07b"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49530.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-49530"},{"type":"PACKAGE","url":"https://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/osv-test-cve-osv-conversion/osv-output/CVE-2022-49530.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"}]}