Vulnerability · Published Apr 18, 2025 · Assigned by Linux

CVE-2025-39989x86/mce: use is_copy_from_user() to determine copy-from-user context

Medium 5.5

In plain English

A medium-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 16% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS NVD)5.5Medium
Exploit odds (30 days)0.2%top 84.0% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

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---

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12linuxno fix listedDEBIAN-CVE-2025-39989
Debian:13linux6.12.25-1DEBIAN-CVE-2025-39989
Debian:14linux6.12.25-1DEBIAN-CVE-2025-39989
Ubuntu:22.04:LTSlinuxno fix listedUBUNTU-CVE-2025-39989
Ubuntu:24.04:LTSlinux6.8.0-100.100UBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-awsno fix listedUBUNTU-CVE-2025-39989
Ubuntu:24.04:LTSlinux-aws6.8.0-1046.49UBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-aws-6.86.8.0-1046.49~22.04.1UBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-azureno fix listedUBUNTU-CVE-2025-39989
Ubuntu:24.04:LTSlinux-azure6.8.0-1046.52UBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2025-39989
Ubuntu:24.04:LTSlinux-azure-6.116.11.0-1018.18~24.04.1UBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-azure-6.5no fix listedUBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-azure-6.86.8.0-1051.57~22.04.1UBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-azure-fdeno fix listedUBUNTU-CVE-2025-39989
Ubuntu:24.04:LTSlinux-azure-fde6.8.0-1046.53UBUNTU-CVE-2025-39989
Ubuntu:25.10linux-azure-fdeno fix listedUBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-azure-fde-6.86.8.0-1046.53~22.04.1UBUNTU-CVE-2025-39989
Ubuntu:24.04:LTSlinux-azure-nvidiano fix listedUBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-gcpno fix listedUBUNTU-CVE-2025-39989
Ubuntu:24.04:LTSlinux-gcp6.8.0-1047.50UBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2025-39989
Ubuntu:24.04:LTSlinux-gcp-6.116.11.0-1016.16~24.04.1UBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-gcp-6.5no fix listedUBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-gcp-6.86.8.0-1047.50~22.04.2UBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-gkeno fix listedUBUNTU-CVE-2025-39989
Ubuntu:24.04:LTSlinux-gke6.8.0-1043.48UBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-gkeopno fix listedUBUNTU-CVE-2025-39989
Ubuntu:24.04:LTSlinux-gkeop6.8.0-1030.33UBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2025-39989
Ubuntu:24.04:LTSlinux-hwe-6.116.11.0-28.28~24.04.1UBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-hwe-6.5no fix listedUBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-hwe-6.86.8.0-100.100~22.04.1UBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-ibmno fix listedUBUNTU-CVE-2025-39989
Ubuntu:24.04:LTSlinux-ibm6.8.0-1044.44UBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-ibm-6.86.8.0-1044.44~22.04.1UBUNTU-CVE-2025-39989
Ubuntu:24.04:LTSlinux-intelno fix listedUBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-intel-iot-realtimeno fix listedUBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-intel-iotgno fix listedUBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-kvmno fix listedUBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-lowlatencyno fix listedUBUNTU-CVE-2025-39989
Ubuntu:24.04:LTSlinux-lowlatency6.8.0-100.100.1UBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2025-39989
Ubuntu:24.04:LTSlinux-lowlatency-hwe-6.116.11.0-1015.16~24.04.2UBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.5no fix listedUBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.86.8.0-100.100.1~22.04.1UBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-nvidiano fix listedUBUNTU-CVE-2025-39989
Ubuntu:24.04:LTSlinux-nvidia6.8.0-1046.49UBUNTU-CVE-2025-39989
Ubuntu:24.04:LTSlinux-nvidia-6.116.11.0-1012.12UBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-nvidia-6.5no fix listedUBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-nvidia-6.86.8.0-1046.49~22.04.1UBUNTU-CVE-2025-39989
Ubuntu:24.04:LTSlinux-nvidia-lowlatency6.8.0-1046.49.1UBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-nvidia-tegrano fix listedUBUNTU-CVE-2025-39989
Ubuntu:24.04:LTSlinux-nvidia-tegra6.8.0-1020.20UBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-nvidia-tegra-igxno fix listedUBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2025-39989
Ubuntu:24.04:LTSlinux-oem-6.116.11.0-1024.24UBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-oem-6.5no fix listedUBUNTU-CVE-2025-39989
Ubuntu:24.04:LTSlinux-oem-6.8no fix listedUBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-oracleno fix listedUBUNTU-CVE-2025-39989
Ubuntu:24.04:LTSlinux-oracle6.8.0-1043.44UBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-oracle-6.5no fix listedUBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-oracle-6.86.8.0-1043.44~22.04.1UBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-raspino fix listedUBUNTU-CVE-2025-39989
Ubuntu:24.04:LTSlinux-raspi6.8.0-1047.51UBUNTU-CVE-2025-39989
Ubuntu:24.04:LTSlinux-raspi-realtimeno fix listedUBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2025-39989
Ubuntu:24.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2025-39989
Ubuntu:24.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-riscv-6.86.8.0-100.100~22.04.1UBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-starfive-6.5no fix listedUBUNTU-CVE-2025-39989
Ubuntu:24.04:LTSlinux-xilinx6.8.0-1023.24UBUNTU-CVE-2025-39989
Ubuntu:22.04:LTSlinux-xilinx-zynqmpno fix listedUBUNTU-CVE-2025-39989

Affected products (as reported)

VendorProductVersions
Linux Linux 4c132d1d844a53fc4e4b5c34e36ef10d6124b783 – before 7a1168257e81954fa1b5b1ce86f47d2567e734ab4c132d1d844a53fc4e4b5c34e36ef10d6124b783 – before 5724654a084f701dc64b08d34a0e800f22f0e6e44c132d1d844a53fc4e4b5c34e36ef10d6124b783 – before 3e3d8169c0950a0b3cd5105f6403a78350dcac804c132d1d844a53fc4e4b5c34e36ef10d6124b783 – before 449413da90a337f343cc5a73070cbd68e92e8a544c132d1d844a53fc4e4b5c34e36ef10d6124b783 – before 0b8388e97ba6a8c033f9a8b5565af41af07f93454c132d1d844a53fc4e4b5c34e36ef10d6124b783 – before 1a15bb8303b6b104e78028b6c68f76a0d456213488eded8104d2ca0429703755dd250f8cbecc14475.15.58 – before 5.16
Linux Linux 5.17

References