cxl/acpi: Fix a use-after-free in cxl_parse_cfmws()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.1.436.4.86.5In the Linux kernel, the following vulnerability has been resolved:
cxl/acpi: Fix a use-after-free in cxl_parse_cfmws()
KASAN and KFENCE detected an user-after-free in the CXL driver. This happens in the cxl_decoder_add() fail path. KASAN prints the following error:
BUG: KASAN: slab-use-after-free in cxl_parse_cfmws (drivers/cxl/acpi.c:299)
This happens in cxl_parse_cfmws(), where put_device() is called, releasing cxld, which is accessed later.
Use the local variables in the dev_err() instead of pointing to the released memory. Since the dev_err() is printing a resource, change the open coded print format to use the %pr format specifier.
From the CVE record · Linux
The Linux kernel CXL driver has a use-after-free in cxl_parse_cfmws() when cxl_decoder_add() fails. The input does not establish what an attacker could do or whether exploitation requires local access, authentication, or user interaction.
Engineers running Linux kernels with the CXL driver should check their versions against the vendor advisory; affected versions are not specified.