CVE-2022-49530

Updated on 26 Feb 2025

Severity

7.8 High severity

Details

CVSS score
7.8
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Overview

About vulnerability

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.

Details

Fixes

KernelCare state

Live-patch status from KernelCare for each operating system.

Operating system Status Covered kernels
Ubuntu 16.04 AWS HWE ESM Will Not Fix
Ubuntu 16.04 Azure ESM Will Not Fix
Ubuntu 16.04 GCP ESM Will Not Fix
Ubuntu 16.04 HWE ESM Will Not Fix
Ubuntu 18.04 Planned
Ubuntu 18.04 AWS Focal Planned
Ubuntu 20.04 Planned
Ubuntu 22.04 Planned
Ubuntu 22.04 AWS Planned