# CVE-2022-49895: cxl/region: Fix decoder allocation crash

- Severity: Medium 5.5 (CVSS:3.1, scored by CISA-ADP) `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 7% of CVEs (2026-12-01)
- Published: 2025-05-01T14:10:37.707Z
- Modified: 2026-06-17T05:19:26.900Z
- 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/region: Fix decoder allocation crash

When an intermediate port's decoders have been exhausted by existing
regions, and creating a new region with the port in question in it's
hierarchical path is attempted, cxl_port_attach_region() fails to find a
port decoder (as would be expected), and drops into the failure / cleanup
path.

However, during cleanup of the region reference, a sanity check attempts
to dereference the decoder, which in the above case didn't exist. This
causes a NULL pointer dereference BUG.

To fix this, refactor the decoder allocation and de-allocation into
helper routines, and in this 'free' routine, check that the decoder,
@cxld, is valid before attempting any operations on it.

(As written by CVE List.)

## Affected

- Linux Linux: from 384e624bb211b406db40edc900bb51af8bb267d0 before c6813b5610ac53af73edd87a660d23a0511faa47; from 384e624bb211b406db40edc900bb51af8bb267d0 before 71ee71d7adcba648077997a29a91158d20c40b09; 6.0 (not affected: before 6.0; from 6.0.8 up to 6.0.*; from 6.1 up to *)
- linux linux_kernel: from 6.0 before 6.0.8; 6.1

## Every score

- CISA-ADP: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/c6813b5610ac53af73edd87a660d23a0511faa47> (patch)
- <https://git.kernel.org/stable/c/71ee71d7adcba648077997a29a91158d20c40b09> (patch)

## Sources

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

---

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