CVE-2023-52792
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
21/05/2024
Last modified:
23/09/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
cxl/region: Do not try to cleanup after cxl_region_setup_targets() fails<br />
<br />
Commit 5e42bcbc3fef ("cxl/region: decrement ->nr_targets on error in<br />
cxl_region_attach()") tried to avoid &#39;eiw&#39; initialization errors when<br />
->nr_targets exceeded 16, by just decrementing ->nr_targets when<br />
cxl_region_setup_targets() failed.<br />
<br />
Commit 86987c766276 ("cxl/region: Cleanup target list on attach error")<br />
extended that cleanup to also clear cxled->pos and p->targets[pos]. The<br />
initialization error was incidentally fixed separately by:<br />
Commit 8d4285425714 ("cxl/region: Fix port setup uninitialized variable<br />
warnings") which was merged a few days after 5e42bcbc3fef.<br />
<br />
But now the original cleanup when cxl_region_setup_targets() fails<br />
prevents endpoint and switch decoder resources from being reused:<br />
<br />
1) the cleanup does not set the decoder&#39;s region to NULL, which results<br />
in future dpa_size_store() calls returning -EBUSY<br />
2) the decoder is not properly freed, which results in future commit<br />
errors associated with the upstream switch<br />
<br />
Now that the initialization errors were fixed separately, the proper<br />
cleanup for this case is to just return immediately. Then the resources<br />
associated with this target get cleanup up as normal when the failed<br />
region is deleted.<br />
<br />
The ->nr_targets decrement in the error case also helped prevent<br />
a p->targets[] array overflow, so add a new check to prevent against<br />
that overflow.<br />
<br />
Tested by trying to create an invalid region for a 2 switch * 2 endpoint<br />
topology, and then following up with creating a valid region.
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.0 (including) | 6.1.64 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.2 (including) | 6.5.13 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.6 (including) | 6.6.3 (excluding) |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/0718588c7aaa7a1510b4de972370535b61dddd0d
- https://git.kernel.org/stable/c/07ffcd8ec79cf7383e1e45815f4842fd357991c2
- https://git.kernel.org/stable/c/9090c5537c93cd0811ab7bfbd925b57addfffb60
- https://git.kernel.org/stable/c/90db4c1d5ebaf574d3c3065c055977982c378a83
- https://git.kernel.org/stable/c/0718588c7aaa7a1510b4de972370535b61dddd0d
- https://git.kernel.org/stable/c/07ffcd8ec79cf7383e1e45815f4842fd357991c2
- https://git.kernel.org/stable/c/9090c5537c93cd0811ab7bfbd925b57addfffb60
- https://git.kernel.org/stable/c/90db4c1d5ebaf574d3c3065c055977982c378a83



