CVE-2022-50244

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

State
Published
Severity
Not scored
Published
Sep 15, 2025
Updated
May 11, 2026
Reserved
Sep 15, 2025

Read the record on cve.org

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.

Scores

The record has no CVSS score.

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • f204e0b8cedd7da1dfcfd05ed6b7692737e24029 to before 82e68432668ae75b4c814d160f6987ecb0681273Affected
  • f204e0b8cedd7da1dfcfd05ed6b7692737e24029 to before 82e5481428faf11c79b9c094dd24a1849bbf64acAffected
  • f204e0b8cedd7da1dfcfd05ed6b7692737e24029 to before c4b2e35df919d99bbbed033c2fa0b607f9f463b5Affected
  • f204e0b8cedd7da1dfcfd05ed6b7692737e24029 to before 361412dae1690d4b5df6f92fc943cdc773c95cbcAffected
  • f204e0b8cedd7da1dfcfd05ed6b7692737e24029 to before 0f63c0ddc2ea20d783d29243f4dbe0f9e95dfdecAffected
  • f204e0b8cedd7da1dfcfd05ed6b7692737e24029 to before 22511eefa61db26e12c97dd7ada3071dbdfcb004Affected
  • f204e0b8cedd7da1dfcfd05ed6b7692737e24029 to before 139abd4c626a6f7ce02789ed5f73aa2256e0542bAffected
  • f204e0b8cedd7da1dfcfd05ed6b7692737e24029 to before 2f5fd31b2f24b9b8a80ab566fd8c4e1e94cb4339Affected
  • f204e0b8cedd7da1dfcfd05ed6b7692737e24029 to before 02cd3032b154fa02fdf90e7467abaeed889330b2Affected
LinuxLinux
  • 3.18Affected
  • before 3.18Not affected
  • 4.9.337 through 4.9.*Not affected
  • 4.14.303 through 4.14.*Not affected
  • 4.19.270 through 4.19.*Not affected
  • 5.4.229 through 5.4.*Not affected
  • 5.10.163 through 5.10.*Not affected
  • 5.15.86 through 5.15.*Not affected
  • 6.0.16 through 6.0.*Not affected
  • 6.1.2 through 6.1.*Not affected
  • 6.2 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.