CVE-2022-49549

Source
https://cve.org/CVERecord?id=CVE-2022-49549
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49549.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2022-49549
Downstream
Related
Published
2025-02-26T02:14:00.256Z
Modified
2026-04-02T08:27:42.032325Z
Severity
  • 5.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
x86/MCE/AMD: Fix memory leak when threshold_create_bank() fails
Details

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

x86/MCE/AMD: Fix memory leak when thresholdcreatebank() fails

In mcethresholdcreatedevice(), if thresholdcreatebank() fails, the previously allocated threshold banks array @bp will be leaked because the call to mcethresholdremovedevice() will not free it.

This happens because mcethresholdremovedevice() fetches the pointer through the thresholdbanks per-CPU variable but bp is written there only after the bank creation is successful, and not before, when thresholdcreatebank() fails.

Add a helper which unwinds all the bank creation work previously done and pass into it the previously allocated threshold banks array for freeing.

[ bp: Massage. ]

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49549.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
6458de97fc15530b54477c4e2b70af653e8ac3d9
Fixed
b4acb8e7f1594607bc9017ef0aacb40b24a003d6
Fixed
cc0dd4456f9573bf8af9b4d8754433918e809e1e
Fixed
9708f1956eeb70c86943e0bc62fa3b0101b59616
Fixed
396b8e7ab2a99ddac57d3522b3da5e58cb608d37
Fixed
e5f28623ceb103e13fc3d7bd45edf9818b227fd0

Database specific

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