CVE-2024-26762 Information
Description
In the Linux kernel the following vulnerability has been resolved:
cxl/pci: Skip to handle RAS errors if CXL.mem device is detached
The PCI AER model is an awkward fit for CXL error handling. While the expectation is that a PCI device can escalate to link reset to recover from an AER event the same reset on CXL amounts to a surprise memory hotplug of massive amounts of memory.
At present the CXL error handler attempts some optimistic error handling to unbind the device from the cxl_mem driver after reaping some RAS register values. This results in a \hopeful\ attempt to unplug the memory but there is no guarantee that will succeed.
A subsequent AER notification after the memdev unbind event can no longer assume the registers are mapped. Check for memdev bind before reaping status register values to avoid crashes of the form:
BUG: unable to handle page fault for address: ffa00000195e9100
PF: supervisor read access in kernel mode
PF: error_code(0x0000) - not-present page
[…]
RIP: 0010:__cxl_handle_ras+0x30/0x110 [cxl_core]
[…]
Call Trace:
Longer term the unbind and PCI_ERS_RESULT_DISCONNECT behavior might need to be replaced with a new PCI_ERS_RESULT_PANIC.
Reference
https://git.kernel.org/stable/c/21e5e84f3f63fdf44e49642a6e45cd895e921a84 https://git.kernel.org/stable/c/eef5c7b28dbecd6b141987a96db6c54e49828102
Share on: