CVE-2022-49530

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

State
Published
Severity
7.8 High
Published
Feb 26, 2025
Updated
Aug 5, 2026
Reserved
Feb 26, 2025

Read the record on cve.org

Description

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.

Scores

CVSSScoreVectorSource
3.17.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HLinux
3.17.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HCISA-ADP

Weaknesses

Affected Products

ProductVersions
LinuxLinux
  • 841686df9f7d2942cfd94d024b8591fa3f74ef7c to before 2615464854505188f909d0c07c37a6623693b5c7Affected
  • 841686df9f7d2942cfd94d024b8591fa3f74ef7c to before 6c5bdaa1325be7f04b79ea992ab216739192d342Affected
  • 841686df9f7d2942cfd94d024b8591fa3f74ef7c to before c0e811c4ccf3b42705976285e3a94cc82dea7300Affected
  • 841686df9f7d2942cfd94d024b8591fa3f74ef7c to before af832028af6f44c6c45645757079c4ed6884ade5Affected
  • 841686df9f7d2942cfd94d024b8591fa3f74ef7c to before ca1ce206894dd976275c78ee38dbc19873f22de9Affected
  • 841686df9f7d2942cfd94d024b8591fa3f74ef7c to before a5ce7051db044290b1a95045ff03c249005a3aa4Affected
  • 841686df9f7d2942cfd94d024b8591fa3f74ef7c to before fd2eff8b9dcbe469c3b7bbbc7083ab5ed94de07bAffected
  • 841686df9f7d2942cfd94d024b8591fa3f74ef7c to before 43eb9b667b95f2a31c63e8949b0d2161b9be59c3Affected
  • 841686df9f7d2942cfd94d024b8591fa3f74ef7c to before f3fa2becf2fc25b6ac7cf8d8b1a2e4a86b3b72bdAffected
LinuxLinux
  • 4.9Affected
  • before 4.9Not affected
  • 4.9.318 through 4.9.*Not affected
  • 4.14.283 through 4.14.*Not affected
  • 4.19.247 through 4.19.*Not affected
  • 5.4.198 through 5.4.*Not affected
  • 5.10.121 through 5.10.*Not affected
  • 5.15.46 through 5.15.*Not affected
  • 5.17.14 through 5.17.*Not affected
  • 5.18.3 through 5.18.*Not affected
  • 5.19 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.