# CVE-2023-52792: cxl/region: Do not try to cleanup after cxl\_region\_setup\_targets() fails

> 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.30% (percentile 16, 2026-11-28)
- **CWE:** CWE-908
- **Published:** 2024-05-21T15:31:07.633Z
- **Modified:** 2026-06-17T06:43:35.570Z

## Who should check

- Anyone running Linux \>= 5e42bcbc3fef6e759dfb4d3f4cfb394c382b4249, \< 90db4c1d5ebaf574d3c3065c055977982c378a83; \>= 5e42bcbc3fef6e759dfb4d3f4cfb394c382b4249, \< 9090c5537c93cd0811ab7bfbd925b57addfffb60; \>= 5e42bcbc3fef6e759dfb4d3f4cfb394c382b4249, \< 07ffcd8ec79cf7383e1e45815f4842fd357991c2; \>= 5e42bcbc3fef6e759dfb4d3f4cfb394c382b4249, \< 0718588c7aaa7a1510b4de972370535b61dddd0d
- Anyone running Linux 6.0

## Description

In the Linux kernel, the following vulnerability has been resolved:

cxl/region: Do not try to cleanup after cxl\_region\_setup\_targets() fails

Commit 5e42bcbc3fef ("cxl/region: decrement -\>nr\_targets on error in
cxl\_region\_attach()") tried to avoid 'eiw' initialization errors when
-\>nr\_targets exceeded 16, by just decrementing -\>nr\_targets when
cxl\_region\_setup\_targets() failed.

Commit 86987c766276 ("cxl/region: Cleanup target list on attach error")
extended that cleanup to also clear cxled-\>pos and p-\>targets\[pos\]. The
initialization error was incidentally fixed separately by:
Commit 8d4285425714 ("cxl/region: Fix port setup uninitialized variable
warnings") which was merged a few days after 5e42bcbc3fef.

But now the original cleanup when cxl\_region\_setup\_targets() fails
prevents endpoint and switch decoder resources from being reused:

1) the cleanup does not set the decoder's region to NULL, which results
   in future dpa\_size\_store() calls returning -EBUSY
2) the decoder is not properly freed, which results in future commit
   errors associated with the upstream switch

Now that the initialization errors were fixed separately, the proper
cleanup for this case is to just return immediately. Then the resources
associated with this target get cleanup up as normal when the failed
region is deleted.

The -\>nr\_targets decrement in the error case also helped prevent
a p-\>targets\[\] array overflow, so add a new check to prevent against
that overflow.

Tested by trying to create an invalid region for a 2 switch \* 2 endpoint
topology, and then following up with creating a valid region.

## Affected and fixed versions

- Linux: \>= 5e42bcbc3fef6e759dfb4d3f4cfb394c382b4249, \< 90db4c1d5ebaf574d3c3065c055977982c378a83; \>= 5e42bcbc3fef6e759dfb4d3f4cfb394c382b4249, \< 9090c5537c93cd0811ab7bfbd925b57addfffb60; \>= 5e42bcbc3fef6e759dfb4d3f4cfb394c382b4249, \< 07ffcd8ec79cf7383e1e45815f4842fd357991c2; \>= 5e42bcbc3fef6e759dfb4d3f4cfb394c382b4249, \< 0718588c7aaa7a1510b4de972370535b61dddd0d (cvelist)
- Linux: 6.0 (cvelist)

## Mitigation

- Upgrade Linux to 0718588c7aaa7a1510b4de972370535b61dddd0d or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2023-52792.md
Affected: Linux >= 5e42bcbc3fef6e759dfb4d3f4cfb394c382b4249, < 90db4c1d5ebaf574d3c3065c055977982c378a83; >= 5e42bcbc3fef6e759dfb4d3f4cfb394c382b4249, < 9090c5537c93cd0811ab7bfbd925b57addfffb60; >= 5e42bcbc3fef6e759dfb4d3f4cfb394c382b4249, < 07ffcd8ec79cf7383e1e45815f4842fd357991c2; >= 5e42bcbc3fef6e759dfb4d3…
Fixed in: Linux 90db4c1d5ebaf574d3c3065c055977982c378a83, Linux 9090c5537c93cd0811ab7bfbd925b57addfffb60, Linux 07ffcd8ec79cf7383e1e45815f4842fd357991c2, Linux 0718588c7aaa7a1510b4de972370535b61dddd0d

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-2023-52792 being exploited?

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

### How serious is CVE-2023-52792?

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

### Which versions are affected by CVE-2023-52792?

Linux \>= 5e42bcbc3fef6e759dfb4d3f4cfb394c382b4249, \< 90db4c1d5ebaf574d3c3065c055977982c378a83; \>= 5e42bcbc3fef6e759dfb4d3f4cfb394c382b4249, \< 9090c5537c93cd0811ab7bfbd925b57addfffb60; \>= 5e42bcbc3fef6e759dfb4d3f4cfb394c382b4249, \< 07ffcd8ec79cf7383e1e45815f4842fd357991c2; \>= 5e42bcbc3fef6e759dfb4d3f4cfb394c382b4249, \< 0718588c7aaa7a1510b4de972370535b61dddd0d; Linux 6.0.

### Is there a fix for CVE-2023-52792?

Yes. Fixed in Linux 90db4c1d5ebaf574d3c3065c055977982c378a83, Linux 9090c5537c93cd0811ab7bfbd925b57addfffb60, Linux 07ffcd8ec79cf7383e1e45815f4842fd357991c2, Linux 0718588c7aaa7a1510b4de972370535b61dddd0d. Upgrade Linux to 0718588c7aaa7a1510b4de972370535b61dddd0d or later.

### How do I check if I'm affected by CVE-2023-52792?

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/90db4c1d5ebaf574d3c3065c055977982c378a83>
- patch: <https://git.kernel.org/stable/c/9090c5537c93cd0811ab7bfbd925b57addfffb60>
- patch: <https://git.kernel.org/stable/c/07ffcd8ec79cf7383e1e45815f4842fd357991c2>
- patch: <https://git.kernel.org/stable/c/0718588c7aaa7a1510b4de972370535b61dddd0d>

## 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-2023-52792>

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