Vulnerability · Published Dec 6, 2025 · Assigned by Linux

CVE-2025-40270mm, swap: fix potential UAF issue for VMA readahead

High 7.8

In plain English

A high-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.1% (higher than 4% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.8High
Exploit odds (30 days)0.1%top 96.2% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known

Official description

In the Linux kernel, the following vulnerability has been resolved: mm, swap: fix potential UAF issue for VMA readahead Since commit 78524b05f1a3 ("mm, swap: avoid redundant swap device pinning"), the common helper for allocating and preparing a folio in the swap cache layer no longer tries to get a swap device reference internally, because all callers of __read_swap_cache_async are already holding a swap entry reference. The repeated swap device pinning isn't needed on the same swap device. Caller of VMA readahead is also holding a reference to the target entry's swap device, but VMA readahead walks the page table, so it might encounter swap entries from other devices, and call __read_swap_cache_async on another device without holding a reference to it. So it is possible to cause a UAF when swapoff of device A raced with swapin on device B, and VMA readahead tries to read swap entries from device A. It's not easy to trigger, but in theory, it could cause real issues. Make VMA readahead try to get the device reference first if the swap device is a different one from the target entry.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:14linux6.17.9-1DEBIAN-CVE-2025-40270
Ubuntu:25.10linux6.17.0-14.14UBUNTU-CVE-2025-40270
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2025-40270
Ubuntu:25.10linux-aws6.17.0-1007.7UBUNTU-CVE-2025-40270
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2025-40270
Ubuntu:24.04:LTSlinux-aws-6.176.17.0-1007.7~24.04.1UBUNTU-CVE-2025-40270
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2025-40270
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2025-40270
Ubuntu:25.10linux-azure6.17.0-1008.8UBUNTU-CVE-2025-40270
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2025-40270
Ubuntu:24.04:LTSlinux-azure-6.11no fix listedUBUNTU-CVE-2025-40270
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2025-40270
Ubuntu:22.04:LTSlinux-azure-6.5no fix listedUBUNTU-CVE-2025-40270
Ubuntu:25.10linux-azure-fdeno fix listedUBUNTU-CVE-2025-40270
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2025-40270
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2025-40270
Ubuntu:25.10linux-gcp6.17.0-1007.7UBUNTU-CVE-2025-40270
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2025-40270
Ubuntu:24.04:LTSlinux-gcp-6.11no fix listedUBUNTU-CVE-2025-40270
Ubuntu:24.04:LTSlinux-gcp-6.176.17.0-1008.8~24.04.1UBUNTU-CVE-2025-40270
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2025-40270
Ubuntu:22.04:LTSlinux-gcp-6.5no fix listedUBUNTU-CVE-2025-40270
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2025-40270
Ubuntu:24.04:LTSlinux-hwe-6.11no fix listedUBUNTU-CVE-2025-40270
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2025-40270
Ubuntu:22.04:LTSlinux-hwe-6.5no fix listedUBUNTU-CVE-2025-40270
Ubuntu:22.04:LTSlinux-intel-iot-realtimeno fix listedUBUNTU-CVE-2025-40270
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2025-40270
Ubuntu:24.04:LTSlinux-lowlatency-hwe-6.11no fix listedUBUNTU-CVE-2025-40270
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2025-40270
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.5no fix listedUBUNTU-CVE-2025-40270
Ubuntu:24.04:LTSlinux-nvidia-6.11no fix listedUBUNTU-CVE-2025-40270
Ubuntu:24.04:LTSlinux-nvidia-6.176.17.0-1008.8UBUNTU-CVE-2025-40270
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2025-40270
Ubuntu:22.04:LTSlinux-nvidia-6.5no fix listedUBUNTU-CVE-2025-40270
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2025-40270
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2025-40270
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2025-40270
Ubuntu:24.04:LTSlinux-oem-6.11no fix listedUBUNTU-CVE-2025-40270
Ubuntu:24.04:LTSlinux-oem-6.176.17.0-1011.11UBUNTU-CVE-2025-40270
Ubuntu:22.04:LTSlinux-oem-6.5no fix listedUBUNTU-CVE-2025-40270
Ubuntu:24.04:LTSlinux-oem-6.8no fix listedUBUNTU-CVE-2025-40270
Ubuntu:25.10linux-oracle6.17.0-1007.7UBUNTU-CVE-2025-40270
Ubuntu:24.04:LTSlinux-oracle-6.176.17.0-1007.7~24.04.1UBUNTU-CVE-2025-40270
Ubuntu:22.04:LTSlinux-oracle-6.5no fix listedUBUNTU-CVE-2025-40270
Ubuntu:25.10linux-raspi6.17.0-1008.8UBUNTU-CVE-2025-40270
Ubuntu:24.04:LTSlinux-raspi-realtimeno fix listedUBUNTU-CVE-2025-40270
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2025-40270
Ubuntu:24.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2025-40270
Ubuntu:25.10linux-realtime6.17.0-1006.7UBUNTU-CVE-2025-40270
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2025-40270
Ubuntu:24.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2025-40270
Ubuntu:25.10linux-riscv6.17.0-14.14.1UBUNTU-CVE-2025-40270
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2025-40270
Ubuntu:24.04:LTSlinux-riscv-6.14no fix listedUBUNTU-CVE-2025-40270
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2025-40270
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2025-40270
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2025-40270
Ubuntu:22.04:LTSlinux-starfive-6.5no fix listedUBUNTU-CVE-2025-40270

Affected products (as reported)

VendorProductVersions
Linux Linux 78524b05f1a3e16a5d00cc9c6259c41a9d6003ce – before a4145be7b56bfa87dce56415c3ad993071462b8a78524b05f1a3e16a5d00cc9c6259c41a9d6003ce – before 1c2a936edd71e133f2806e68324ec81a4eb07588
Linux Linux 6.15

References