Ad

CVE-2025-39989

MEDIUM CVSS 3.1: 5,5 EPSS 0.29%
Обновлено 30 октября 2026
Linux
Параметр Значение
CVSS 5,5 (MEDIUM)
Уязвимые версии 5.15.58 — 6.6.89
Устранено в версии 5.16
Тип уязвимости CWE-401 (Утечка памяти)
Поставщик Linux
Публичный эксплойт Нет

In the Linux kernel, the following vulnerability has been resolved: x86/mce: use is_copy_from_user() to determine copy-from-user context Patch series "mm/hwpoison: Fix regressions in memory failure handling", v4. ## 1. Что я пытаюсь сделать: Этот патчет устраняет две критические регрессии, связанные с обработкой сбоя памяти, которые появились в восходящем ядре начиная с версии 5.17, по сравнению с 5.10 LTS. - copyin case: яд найден на странице пользователя при копировании ядра из пользовательского пространства - instr case: яд найден во время извлечения инструкции в пользовательском пространстве 2. Каков ожидаемый результат и почему - Для случая copyin: Kernel может восстановиться от яда, найденного там, где ядро делает get_user() или copy_from_user(), если эти места получают возврат ошибки и ядро возвращает -EFAULT в процесс вместо сбоя.

Более конкретно, обработчик MCE проверяет тип обработчика фиксации, чтобы решить, можно ли восстановить MC в ядре. Когда EX_TYPE_UACCESS найден, PC переходит к коду восстановления, указанному в _ASM_EXTABLE_FAULT(), и возвращает -EFAULT в пользовательское пространство. - Для instr case: If яд, найденный во время извлечения инструкции в пользовательском пространстве, возможно полное восстановление. Пользовательский процесс занимает PF, Linux выделяет новую страницу и заполняет, читая из хранилища. 3.

Что на самом деле происходит и почему - Для случая copyin: паника ядра, так как v5.17 Commit 4c132d1d844a («x86/futex: использование Remove .fixup») представил новый тип исправления extable, EX_TYPE_EFAULT_REG, а более поздние патчи обновили тип исправления extable для операций copy-from-user, изменив его с EX_TYPE_UACCESS на EX_TYPE_EFAULT_REG. It breaks previous EX_TYPE_UACCESS handling when posion found in get_user() or copy_from_user(). - For instr case: user process is killed by a SIGBUS signal due to #CMCI and #MCE race When an uncorrected memory error is consumed there is a race between the CMCI from the memory controller reporting an uncorrected error with a UCNA signature, and the core reporting and SRAR signature machine check when the data is about to be consumed. ### Background: why *UN*corrected errors tied to *C*MCI in Intel platform [1] Prior to Icelake memory controllers reported patrol scrub events that detected a previously unseen uncorrected error in memory by signaling a broadcast machine check with an SRAO (Software Recoverable Action Optional) signature in the machine check bank. Это было излишним, потому что это не срочная проблема, что ни одно ядро не находится на грани потребления этих плохих данных.

Также установлено, что multi SRAO UCE может вызывать вложенные прерывания MCE и, наконец, стать IERR. Следовательно, Intel понижает банковскую подпись машины с SRAO до UCNA (Uncorrected, No Action требуется), и сигнал изменился на CMCI. Чтобы добавить путаницу, Linux предпринимает действие (в uc_decode_notifier()), чтобы попытаться отключить страницу, несмотря на название подписи UC*NA*.

Background: почему CMCI и MCE гонки, когда яд потребляет в платформе Intel [1] Having решил, что CMCI / UCNA является лучшим действием для ошибок патрулирования, контроллер памяти использует его для чтения. Но контроллер памяти выполняется асинхронно от ядра и не может отличить чтение «real» от спекулятивного чтения. Таким образом, он будет делать CMCI / UCNA, если ошибка будет найдена в любом чтении.

Таким образом: 1) Core умный и думает, что адрес A нужен в ближайшее время, выпускает спекулятивное чтение. 2) Core обнаруживает, что он собирается использовать адрес A вскоре после отправки запроса на чтение 3) The CMCI от контроллера памяти участвует в гонке с MCE от ядра, которое вскоре попытается удалить нагрузку с адреса A. Довольно часто (поскольку спекуляции стали лучше) CMCI с контроллера памяти доставляется до того, как ядро будет привязано к адресу чтения инструкции A, поэтому прерывание принимается, и Linux отключает страницу (обозначая ее как яд). Why пользовательский процесс убит для instr case Commit 046545a661af («mm/hwpoison: fix error page recover buted buted, noted»).

Показать оригинальное описание (EN)

In the Linux kernel, the following vulnerability has been resolved: x86/mce: use is_copy_from_user() to determine copy-from-user context Patch series "mm/hwpoison: Fix regressions in memory failure handling", v4. ## 1. What am I trying to do: This patchset resolves two critical regressions related to memory failure handling that have appeared in the upstream kernel since version 5.17, as compared to 5.10 LTS. - copyin case: poison found in user page while kernel copying from user space - instr case: poison found while instruction fetching in user space ## 2. What is the expected outcome and why - For copyin case: Kernel can recover from poison found where kernel is doing get_user() or copy_from_user() if those places get an error return and the kernel return -EFAULT to the process instead of crashing. More specifily, MCE handler checks the fixup handler type to decide whether an in kernel #MC can be recovered. When EX_TYPE_UACCESS is found, the PC jumps to recovery code specified in _ASM_EXTABLE_FAULT() and return a -EFAULT to user space. - For instr case: If a poison found while instruction fetching in user space, full recovery is possible. User process takes #PF, Linux allocates a new page and fills by reading from storage. ## 3. What actually happens and why - For copyin case: kernel panic since v5.17 Commit 4c132d1d844a ("x86/futex: Remove .fixup usage") introduced a new extable fixup type, EX_TYPE_EFAULT_REG, and later patches updated the extable fixup type for copy-from-user operations, changing it from EX_TYPE_UACCESS to EX_TYPE_EFAULT_REG. It breaks previous EX_TYPE_UACCESS handling when posion found in get_user() or copy_from_user(). - For instr case: user process is killed by a SIGBUS signal due to #CMCI and #MCE race When an uncorrected memory error is consumed there is a race between the CMCI from the memory controller reporting an uncorrected error with a UCNA signature, and the core reporting and SRAR signature machine check when the data is about to be consumed. ### Background: why *UN*corrected errors tied to *C*MCI in Intel platform [1] Prior to Icelake memory controllers reported patrol scrub events that detected a previously unseen uncorrected error in memory by signaling a broadcast machine check with an SRAO (Software Recoverable Action Optional) signature in the machine check bank. This was overkill because it's not an urgent problem that no core is on the verge of consuming that bad data. It's also found that multi SRAO UCE may cause nested MCE interrupts and finally become an IERR. Hence, Intel downgrades the machine check bank signature of patrol scrub from SRAO to UCNA (Uncorrected, No Action required), and signal changed to #CMCI. Just to add to the confusion, Linux does take an action (in uc_decode_notifier()) to try to offline the page despite the UC*NA* signature name. ### Background: why #CMCI and #MCE race when poison is consuming in Intel platform [1] Having decided that CMCI/UCNA is the best action for patrol scrub errors, the memory controller uses it for reads too. But the memory controller is executing asynchronously from the core, and can't tell the difference between a "real" read and a speculative read. So it will do CMCI/UCNA if an error is found in any read. Thus: 1) Core is clever and thinks address A is needed soon, issues a speculative read. 2) Core finds it is going to use address A soon after sending the read request 3) The CMCI from the memory controller is in a race with MCE from the core that will soon try to retire the load from address A. Quite often (because speculation has got better) the CMCI from the memory controller is delivered before the core is committed to the instruction reading address A, so the interrupt is taken, and Linux offlines the page (marking it as poison). ## Why user process is killed for instr case Commit 046545a661af ("mm/hwpoison: fix error page recovered but reported "not ---truncated---

Характеристики атаки

Способ атаки
Локальный
Нужен локальный доступ
Сложность
Низкая
Легко эксплуатировать
Нужны права
Низкие
Нужны базовые права
Участие пользователя
Не требуется
Не нужно действие пользователя

Последствия

Конфиденциальность
Нет
Нет утечки данных
Целостность
Нет
Нет модификации данных
Доступность
Высокое
Полный отказ в обслуживании

Строка CVSS v3.1

Тип уязвимости (CWE)

Уязвимые продукты 5

Конфигурация От (включительно) До (исключительно)
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
5.15.58 5.16
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
5.17 6.6.89
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
6.7 6.12.23
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
6.13 6.13.11
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
6.14 6.14.2