# CVE-2025-40270: linux: In the Linux kernel, the following vulnerability has been resolved:  mm, swap: fix potential UAF issue for VMA readah...

CVE-2025-40270 is fixed in linux on 1 platform by DEBIAN-CVE-2025-40270 (version 6.17.9-1), released December 6, 2025. It is not reported as exploited. Patch Radar priority: High.

- Web page: https://patchblox.com/security/cve/CVE-2025-40270
- Priority: High
- CVSS: 7.8 (high)
- EPSS: 0.0015
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Dec 6, 2025

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

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | linux Debian 14 | 6.17.9-1 | [DEBIAN-CVE-2025-40270](https://patchblox.com/security/data/fix/linux/debian-cve-2025-40270.md) | Dec 6, 2025 |

---

Data as of 2026-11-09T01:18:40Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
