В ядре Linux устранена следующая уязвимость: cxl/pci: пропустить обработку ошибок RAS, если устройство CXL.mem отключено. Модель PCI AER плохо подходит для обработки ошибок CXL. В то время как ожидается, что устройство PCI может перейти к сбросу канала для восстановления. из события AER тот же сброс на CXL представляет собой неожиданное воспоминание горячее подключение огромных объемов памяти.
В настоящее время обработчик ошибок CXL пытается выдать некоторую оптимистичную ошибку.
обработка отвязки устройства от драйвера cxl_mem после получения некоторых
Значения регистров RAS. Это приводит к «обнадеживающей» попытке отключить
памяти, но нет никакой гарантии, что получится. Последующее уведомление AER после события отмены привязки memdev не может быть
дольше предполагать, что регистры сопоставлены.
Перед этим проверьте привязку memdev.
получение значений регистра состояния, чтобы избежать сбоев формы:
ОШИБКА: невозможно обработать ошибку страницы для адреса: ffa00000195e9100.
#PF: доступ супервизора на чтение в режиме ядра
#PF: код_ошибки(0x0000) — страница отсутствует
[...]
RIP: 0010:__cxl_handle_ras+0x30/0x110 [cxl_core]
[...]
Отслеживание вызова:
<ЗАДАЧА>
? __die+0x24/0x70
? page_fault_oops+0x82/0x160
? kernelmode_fixup_or_oops+0x84/0x110
? exc_page_fault+0x113/0x170
? asm_exc_page_fault+0x26/0x30
? __pfx_dpc_reset_link+0x10/0x10
? __cxl_handle_ras+0x30/0x110 [cxl_core]
? find_cxl_port+0x59/0x80 [cxl_core]
cxl_handle_rp_ras+0xbc/0xd0 [cxl_core]
cxl_error_detected+0x6c/0xf0 [cxl_core]
report_error_detected+0xc7/0x1c0
pci_walk_bus+0x73/0x90
pcie_do_recovery+0x23f/0x330
В долгосрочной перспективе поведение отмены привязки и PCI_ERS_RESULT_DISCONNECT может
необходимо заменить новым PCI_ERS_RESULT_PANIC.
Показать оригинальное описание (EN)
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: <TASK> ? __die+0x24/0x70 ? page_fault_oops+0x82/0x160 ? kernelmode_fixup_or_oops+0x84/0x110 ? exc_page_fault+0x113/0x170 ? asm_exc_page_fault+0x26/0x30 ? __pfx_dpc_reset_link+0x10/0x10 ? __cxl_handle_ras+0x30/0x110 [cxl_core] ? find_cxl_port+0x59/0x80 [cxl_core] cxl_handle_rp_ras+0xbc/0xd0 [cxl_core] cxl_error_detected+0x6c/0xf0 [cxl_core] report_error_detected+0xc7/0x1c0 pci_walk_bus+0x73/0x90 pcie_do_recovery+0x23f/0x330 Longer term, the unbind and PCI_ERS_RESULT_DISCONNECT behavior might need to be replaced with a new PCI_ERS_RESULT_PANIC.
Характеристики атаки
Последствия
Строка CVSS v3.1
Уязвимые продукты 6
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.7
|
6.7.7
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.8:rc1:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.8:rc2:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.8:rc3:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.8:rc4:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.8:rc5:*:*:*:*:*:*
|
— | — |