CVE-2024-41085
Severity CVSS v4.0:
Pending analysis
Type:
CWE-476
NULL Pointer Dereference
Publication date:
29/07/2024
Last modified:
22/08/2024
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
cxl/mem: Fix no cxl_nvd during pmem region auto-assembling<br />
<br />
When CXL subsystem is auto-assembling a pmem region during cxl<br />
endpoint port probing, always hit below calltrace.<br />
<br />
BUG: kernel NULL pointer dereference, address: 0000000000000078<br />
#PF: supervisor read access in kernel mode<br />
#PF: error_code(0x0000) - not-present page<br />
RIP: 0010:cxl_pmem_region_probe+0x22e/0x360 [cxl_pmem]<br />
Call Trace:<br />
<br />
? __die+0x24/0x70<br />
? page_fault_oops+0x82/0x160<br />
? do_user_addr_fault+0x65/0x6b0<br />
? exc_page_fault+0x7d/0x170<br />
? asm_exc_page_fault+0x26/0x30<br />
? cxl_pmem_region_probe+0x22e/0x360 [cxl_pmem]<br />
? cxl_pmem_region_probe+0x1ac/0x360 [cxl_pmem]<br />
cxl_bus_probe+0x1b/0x60 [cxl_core]<br />
really_probe+0x173/0x410<br />
? __pfx___device_attach_driver+0x10/0x10<br />
__driver_probe_device+0x80/0x170<br />
driver_probe_device+0x1e/0x90<br />
__device_attach_driver+0x90/0x120<br />
bus_for_each_drv+0x84/0xe0<br />
__device_attach+0xbc/0x1f0<br />
bus_probe_device+0x90/0xa0<br />
device_add+0x51c/0x710<br />
devm_cxl_add_pmem_region+0x1b5/0x380 [cxl_core]<br />
cxl_bus_probe+0x1b/0x60 [cxl_core]<br />
<br />
The cxl_nvd of the memdev needs to be available during the pmem region<br />
probe. Currently the cxl_nvd is registered after the endpoint port probe.<br />
The endpoint probe, in the case of autoassembly of regions, can cause a<br />
pmem region probe requiring the not yet available cxl_nvd. Adjust the<br />
sequence so this dependency is met.<br />
<br />
This requires adding a port parameter to cxl_find_nvdimm_bridge() that<br />
can be used to query the ancestor root port. The endpoint port is not<br />
yet available, but will share a common ancestor with its parent, so<br />
start the query from there instead.
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.2 (including) | 6.9.8 (excluding) |
To consult the complete list of CPE names with products and versions, see this page



