# CVE-2022-50481: cxl: fix possible null-ptr-deref in cxl\_guest\_init\_afu\|adapter()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.22% (percentile 8, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2025-10-04T15:16:40.374Z
- **Modified:** 2026-11-05T21:17:01.257Z

## Who should check

- Anyone running Linux \>= 14baf4d9c739e6e69150512d2eb23c71fffcc192, \< 96fba6fb95bdede80583c262ac185da09661f264; \>= 14baf4d9c739e6e69150512d2eb23c71fffcc192, \< 1ae581696b7a799afa39a664c4b721569643f58a; \>= 14baf4d9c739e6e69150512d2eb23c71fffcc192, \< d775a1da5a52b4f4bb02f2707ba420d1bec48dbb; \>= 14baf4d9c739e6e69150512d2eb23c71fffcc192, \< 60b2ed21a65f3f5318666ccd765c3507991370cf; \>= 14baf4d9c739e6e69150512d2eb23c71fffcc192, \< 170e8c2d2b61e15e7f7cfeded81bc1e959a15ed8; \>= 14baf4d9c739e6e69150512d2eb23c71fffcc192, \< e5021bbf11b024cc65ea1e84c377df484183be4b; \>= 14baf4d9c739e6e69150512d2eb23c71fffcc192, \< b32559ee4e6667c5c3daf4ec5454c277d1f255d2; \>= 14baf4d9c739e6e69150512d2eb23c71fffcc192, \< ab44c182353be101c3be9465e1d15d42130c53c4; \>= 14baf4d9c739e6e69150512d2eb23c71fffcc192, \< 61c80d1c3833e196256fb060382db94f24d3d9a7
- Anyone running Linux 4.6

## 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 and fixed versions

- Linux: \>= 14baf4d9c739e6e69150512d2eb23c71fffcc192, \< 96fba6fb95bdede80583c262ac185da09661f264; \>= 14baf4d9c739e6e69150512d2eb23c71fffcc192, \< 1ae581696b7a799afa39a664c4b721569643f58a; \>= 14baf4d9c739e6e69150512d2eb23c71fffcc192, \< d775a1da5a52b4f4bb02f2707ba420d1bec48dbb; \>= 14baf4d9c739e6e69150512d2eb23c71fffcc192, \< 60b2ed21a65f3f5318666ccd765c3507991370cf; \>= 14baf4d9c739e6e69150512d2eb23c71fffcc192, \< 170e8c2d2b61e15e7f7cfeded81bc1e959a15ed8; \>= 14baf4d9c739e6e69150512d2eb23c71fffcc192, \< e5021bbf11b024cc65ea1e84c377df484183be4b; \>= 14baf4d9c739e6e69150512d2eb23c71fffcc192, \< b32559ee4e6667c5c3daf4ec5454c277d1f255d2; \>= 14baf4d9c739e6e69150512d2eb23c71fffcc192, \< ab44c182353be101c3be9465e1d15d42130c53c4; \>= 14baf4d9c739e6e69150512d2eb23c71fffcc192, \< 61c80d1c3833e196256fb060382db94f24d3d9a7 (cvelist)
- Linux: 4.6 (cvelist)

## Mitigation

- Upgrade Linux to 61c80d1c3833e196256fb060382db94f24d3d9a7 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-50481. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-50481.md
Affected: Linux >= 14baf4d9c739e6e69150512d2eb23c71fffcc192, < 96fba6fb95bdede80583c262ac185da09661f264; >= 14baf4d9c739e6e69150512d2eb23c71fffcc192, < 1ae581696b7a799afa39a664c4b721569643f58a; >= 14baf4d9c739e6e69150512d2eb23c71fffcc192, < d775a1da5a52b4f4bb02f2707ba420d1bec48dbb; >= 14baf4d9c739e6e69150512…
Fixed in: Linux 96fba6fb95bdede80583c262ac185da09661f264, Linux 1ae581696b7a799afa39a664c4b721569643f58a, Linux 60b2ed21a65f3f5318666ccd765c3507991370cf, Linux 170e8c2d2b61e15e7f7cfeded81bc1e959a15ed8, Linux 61c80d1c3833e196256fb060382db94f24d3d9a7

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-50481 being exploited?

There is no confirmed exploitation: CVE-2022-50481 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.22% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-50481?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2022-50481?

Linux \>= 14baf4d9c739e6e69150512d2eb23c71fffcc192, \< 96fba6fb95bdede80583c262ac185da09661f264; \>= 14baf4d9c739e6e69150512d2eb23c71fffcc192, \< 1ae581696b7a799afa39a664c4b721569643f58a; \>= 14baf4d9c739e6e69150512d2eb23c71fffcc192, \< d775a1da5a52b4f4bb02f2707ba420d1bec48dbb; \>= 14baf4d9c739e6e69150512d2eb23c71fffcc192, \< 60b2ed21a65f3f5318666ccd765c3507991370cf; \>= 14baf4d9c739e6e69150512d2eb23c71fffcc192, \< 170e8c2d2b61e15e7f7cfeded81bc1e959a15ed8; \>= 14baf4d9c739e6e69150512d2eb23c71fffcc192, \< e5021bbf11b024cc65ea1e84c377df484183be4b; \>= 14baf4d9c739e6e69150512d2eb23c71fffcc192, \< b32559ee4e6667c5c3daf4ec5454c277d1f255d2; \>= 14baf4d9c739e6e69150512d2eb23c71fffcc192, \< ab44c182353be101c3be9465e1d15d42130c53c4; \>= 14baf4d9c739e6e69150512d2eb23c71fffcc192, \< 61c80d1c3833e196256fb060382db94f24d3d9a7; Linux 4.6.

### Is there a fix for CVE-2022-50481?

Yes. Fixed in Linux 96fba6fb95bdede80583c262ac185da09661f264, Linux 1ae581696b7a799afa39a664c4b721569643f58a, Linux 60b2ed21a65f3f5318666ccd765c3507991370cf, Linux 170e8c2d2b61e15e7f7cfeded81bc1e959a15ed8, Linux 61c80d1c3833e196256fb060382db94f24d3d9a7. Upgrade Linux to 61c80d1c3833e196256fb060382db94f24d3d9a7 or later.

### How do I check if I'm affected by CVE-2022-50481?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/96fba6fb95bdede80583c262ac185da09661f264>
- patch: <https://git.kernel.org/stable/c/1ae581696b7a799afa39a664c4b721569643f58a>
- patch: <https://git.kernel.org/stable/c/d775a1da5a52b4f4bb02f2707ba420d1bec48dbb>
- patch: <https://git.kernel.org/stable/c/60b2ed21a65f3f5318666ccd765c3507991370cf>
- patch: <https://git.kernel.org/stable/c/170e8c2d2b61e15e7f7cfeded81bc1e959a15ed8>
- patch: <https://git.kernel.org/stable/c/e5021bbf11b024cc65ea1e84c377df484183be4b>
- patch: <https://git.kernel.org/stable/c/b32559ee4e6667c5c3daf4ec5454c277d1f255d2>
- patch: <https://git.kernel.org/stable/c/ab44c182353be101c3be9465e1d15d42130c53c4>
- patch: <https://git.kernel.org/stable/c/61c80d1c3833e196256fb060382db94f24d3d9a7>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-50481>

HTML: <https://flawdb.com/CVE-2022-50481> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-50481>
