CVE-2022-49549

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

MEDIUM
5.5
CVSS Score
Published: February 26, 2025 at 02:14 AM UTC
Updated: June 17, 2026 at 05:18 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.3%
SSVC
No known exploit

Description

In the Linux kernel, the following vulnerability has been resolved: x86/MCE/AMD: Fix memory leak when threshold_create_bank() fails In mce_threshold_create_device(), if threshold_create_bank() fails, the previously allocated threshold banks array @bp will be leaked because the call to mce_threshold_remove_device() will not free it. This happens because mce_threshold_remove_device() fetches the pointer through the threshold_banks per-CPU variable but bp is written there only after the bank creation is successful, and not before, when threshold_create_bank() 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. ]

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

5.11 ≤ v < 5.15.465.16 ≤ v < 5.17.145.18 ≤ v < 5.18.35.8 ≤ v < 5.10.1215.8 ≤ v < 5.15.465.8 ≤ v < 5.17.145.8 ≤ v < 5.18.35.8 ≤ v < 5.195.86458de97fc15530b54477c4e2b70af653e8ac3d9
Vendor states this is fixed in 396b8e7ab2a99ddac57d3522b3da5e58cb608d37 (fixed)
Vendor states this is fixed in 9708f1956eeb70c86943e0bc62fa3b0101b59616 (fixed)
Vendor states this is fixed in b4acb8e7f1594607bc9017ef0aacb40b24a003d6 (fixed)
Vendor states this is fixed in cc0dd4456f9573bf8af9b4d8754433918e809e1e (fixed)
Vendor states this is fixed in e5f28623ceb103e13fc3d7bd45edf9818b227fd0 (fixed)
Vendor states this is fixed in 5.10.121 (unaffected)
Vendor states this is fixed in 5.15.46 (unaffected)
Vendor states this is fixed in 5.17.14 (unaffected)
Vendor states this is fixed in 5.18.3 (unaffected)
Vendor states this is fixed in 5.19 (unaffected)
Vendor states this is fixed in 5.8 (unaffected)

References (5)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/396b8e7ab2a99ddac57d3522b3da5e58cb608d37
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/9708f1956eeb70c86943e0bc62fa3b0101b59616
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/b4acb8e7f1594607bc9017ef0aacb40b24a003d6
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/cc0dd4456f9573bf8af9b4d8754433918e809e1e
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/e5f28623ceb103e13fc3d7bd45edf9818b227fd0

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

5.5MEDIUMCISA-ADP
Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-401

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card