CVE-2022-50244

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

MEDIUM
5.5
CVSS Score
Published: September 15, 2025 at 02:02 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_pci_init_afu|adapter() If device_register() fails in cxl_pci_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.

3.18 ≤ v < 4.14.3033.18 ≤ v < 4.19.2703.18 ≤ v < 4.9.3373.18 ≤ v < 5.10.1633.18 ≤ v < 5.15.863.18 ≤ v < 5.4.2293.18 ≤ v < 6.0.163.18 ≤ v < 6.1.23.18 ≤ v < 6.24.10 ≤ v < 4.14.3034.15 ≤ v < 4.19.2704.20 ≤ v < 5.4.2295.11 ≤ v < 5.15.865.16 ≤ v < 6.0.165.5 ≤ v < 5.10.1636.1 ≤ v < 6.1.23.18f204e0b8cedd7da1dfcfd05ed6b7692737e24029
Vendor states this is fixed in 02cd3032b154fa02fdf90e7467abaeed889330b2 (fixed)
Vendor states this is fixed in 0f63c0ddc2ea20d783d29243f4dbe0f9e95dfdec (fixed)
Vendor states this is fixed in 139abd4c626a6f7ce02789ed5f73aa2256e0542b (fixed)
Vendor states this is fixed in 22511eefa61db26e12c97dd7ada3071dbdfcb004 (fixed)
Vendor states this is fixed in 2f5fd31b2f24b9b8a80ab566fd8c4e1e94cb4339 (fixed)
Vendor states this is fixed in 361412dae1690d4b5df6f92fc943cdc773c95cbc (fixed)
Vendor states this is fixed in 82e5481428faf11c79b9c094dd24a1849bbf64ac (fixed)
Vendor states this is fixed in 82e68432668ae75b4c814d160f6987ecb0681273 (fixed)
Vendor states this is fixed in c4b2e35df919d99bbbed033c2fa0b607f9f463b5 (fixed)
Vendor states this is fixed in 3.18 (unaffected)
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.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)

References (9)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/02cd3032b154fa02fdf90e7467abaeed889330b2
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/0f63c0ddc2ea20d783d29243f4dbe0f9e95dfdec
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/139abd4c626a6f7ce02789ed5f73aa2256e0542b
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/22511eefa61db26e12c97dd7ada3071dbdfcb004
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/2f5fd31b2f24b9b8a80ab566fd8c4e1e94cb4339
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/361412dae1690d4b5df6f92fc943cdc773c95cbc
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/82e5481428faf11c79b9c094dd24a1849bbf64ac
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/82e68432668ae75b4c814d160f6987ecb0681273

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