CVE-2022-50481

cxl: fix possible null-ptr-deref in cxl_guest_init_afu|adapter()

MEDIUM
5.5
CVSS Score
Published: October 4, 2025 at 03:16 PM UTC
Updated: June 17, 2026 at 05:23 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.2%

Description

In the Linux kernel, the following vulnerability has been resolved: cxl: fix possible null-ptr-deref in cxl_guest_init_afu|adapter() If device_register() fails in cxl_register_afu|adapter(), the device is not added, device_unregister() can not be called in the error path, otherwise it will cause a null-ptr-deref because of removing not added device. As comment of device_register() says, it should use put_device() to give up the reference in the error path. So split device_unregister() into device_del() and put_device(), then goes to put dev when register fails.

Affected

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

4.10 ≤ v < 4.14.3034.15 ≤ v < 4.19.2704.20 ≤ v < 5.4.2294.6 ≤ v < 4.14.3034.6 ≤ v < 4.19.2704.6 ≤ v < 4.9.3374.6 ≤ v < 5.10.1634.6 ≤ v < 5.15.864.6 ≤ v < 5.4.2294.6 ≤ v < 6.0.164.6 ≤ v < 6.1.24.6 ≤ v < 6.25.11 ≤ v < 5.15.865.16 ≤ v < 6.0.165.5 ≤ v < 5.10.1636.1 ≤ v < 6.1.214baf4d9c739e6e69150512d2eb23c71fffcc1924.6
Vendor states this is fixed in 170e8c2d2b61e15e7f7cfeded81bc1e959a15ed8 (fixed)
Vendor states this is fixed in 1ae581696b7a799afa39a664c4b721569643f58a (fixed)
Vendor states this is fixed in 60b2ed21a65f3f5318666ccd765c3507991370cf (fixed)
Vendor states this is fixed in 61c80d1c3833e196256fb060382db94f24d3d9a7 (fixed)
Vendor states this is fixed in 96fba6fb95bdede80583c262ac185da09661f264 (fixed)
Vendor states this is fixed in ab44c182353be101c3be9465e1d15d42130c53c4 (fixed)
Vendor states this is fixed in b32559ee4e6667c5c3daf4ec5454c277d1f255d2 (fixed)
Vendor states this is fixed in d775a1da5a52b4f4bb02f2707ba420d1bec48dbb (fixed)
Vendor states this is fixed in e5021bbf11b024cc65ea1e84c377df484183be4b (fixed)
Vendor states this is fixed in 4.14.303 (unaffected)
Vendor states this is fixed in 4.19.270 (unaffected)
Vendor states this is fixed in 4.6 (unaffected)
Vendor states this is fixed in 4.9.337 (unaffected)
Vendor states this is fixed in 5.10.163 (unaffected)
Vendor states this is fixed in 5.15.86 (unaffected)
Vendor states this is fixed in 5.4.229 (unaffected)
Vendor states this is fixed in 6.0.16 (unaffected)
Vendor states this is fixed in 6.1.2 (unaffected)
Vendor states this is fixed in 6.2 (unaffected)

CVSS

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

Quick Info

StatusANALYZED
CWE
CWE-476

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