# CVE-2022-50244: cxl: fix possible null-ptr-deref in cxl_pci_init_afu|adapter()

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.17%, higher than 6% of CVEs (2026-12-01)
- Published: 2025-09-15T14:02:01.364Z
- Modified: 2026-11-05T20:17:28.910Z
- Weaknesses: CWE-476
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from f204e0b8cedd7da1dfcfd05ed6b7692737e24029 before 82e68432668ae75b4c814d160f6987ecb0681273; from f204e0b8cedd7da1dfcfd05ed6b7692737e24029 before 82e5481428faf11c79b9c094dd24a1849bbf64ac; from f204e0b8cedd7da1dfcfd05ed6b7692737e24029 before c4b2e35df919d99bbbed033c2fa0b607f9f463b5; from f204e0b8cedd7da1dfcfd05ed6b7692737e24029 before 361412dae1690d4b5df6f92fc943cdc773c95cbc; from f204e0b8cedd7da1dfcfd05ed6b7692737e24029 before 0f63c0ddc2ea20d783d29243f4dbe0f9e95dfdec; from f204e0b8cedd7da1dfcfd05ed6b7692737e24029 before 22511eefa61db26e12c97dd7ada3071dbdfcb004; from f204e0b8cedd7da1dfcfd05ed6b7692737e24029 before 139abd4c626a6f7ce02789ed5f73aa2256e0542b; from f204e0b8cedd7da1dfcfd05ed6b7692737e24029 before 2f5fd31b2f24b9b8a80ab566fd8c4e1e94cb4339; from f204e0b8cedd7da1dfcfd05ed6b7692737e24029 before 02cd3032b154fa02fdf90e7467abaeed889330b2; 3.18 (not affected: before 3.18; from 4.9.337 up to 4.9.*; from 4.14.303 up to 4.14.*; from 4.19.270 up to 4.19.*; from 5.4.229 up to 5.4.*; from 5.10.163 up to 5.10.*; from 5.15.86 up to 5.15.*; from 6.0.16 up to 6.0.*; from 6.1.2 up to 6.1.*; from 6.2 up to *)
- linux linux_kernel: from 3.18 before 4.9.337; from 4.10 before 4.14.303; from 4.15 before 4.19.270; from 4.20 before 5.4.229; from 5.5 before 5.10.163; from 5.11 before 5.15.86; from 5.16 before 6.0.16; from 6.1 before 6.1.2

## References

- <https://git.kernel.org/stable/c/82e68432668ae75b4c814d160f6987ecb0681273> (patch)
- <https://git.kernel.org/stable/c/82e5481428faf11c79b9c094dd24a1849bbf64ac> (patch)
- <https://git.kernel.org/stable/c/c4b2e35df919d99bbbed033c2fa0b607f9f463b5> (patch)
- <https://git.kernel.org/stable/c/361412dae1690d4b5df6f92fc943cdc773c95cbc> (patch)
- <https://git.kernel.org/stable/c/0f63c0ddc2ea20d783d29243f4dbe0f9e95dfdec> (patch)
- <https://git.kernel.org/stable/c/22511eefa61db26e12c97dd7ada3071dbdfcb004> (patch)
- <https://git.kernel.org/stable/c/139abd4c626a6f7ce02789ed5f73aa2256e0542b> (patch)
- <https://git.kernel.org/stable/c/2f5fd31b2f24b9b8a80ab566fd8c4e1e94cb4339> (patch)
- <https://git.kernel.org/stable/c/02cd3032b154fa02fdf90e7467abaeed889330b2> (patch)

## Sources

- CVE List: [CVE-2022-50244](https://www.cve.org/CVERecord?id=CVE-2022-50244), CVE Terms of Use, modified 2026-11-05
- NVD: [CVE-2022-50244](https://nvd.nist.gov/vuln/detail/CVE-2022-50244), Public domain, modified 2026-11-05

---

Page: https://cve.day/CVE-2022-50244 · Whole record: https://cve.day/CVE-2022-50244.json · Rebuilt by cve.day 2026-11-25T22:58:21.126Z
