CVE-2022-49549

Source
https://nvd.nist.gov/vuln/detail/CVE-2022-49549
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-49549.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-49549
Downstream
Related
Published
2025-02-26T07:01:30Z
Modified
2025-08-09T20:01:26Z
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
[none]
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. ]

References

Affected packages