CVE-2025-40270

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.

Package Linux Kernel
Published 2025-12-06
Last modified 2026-04-15
Patch available
Yes

Affected versions

Linux kernel versions 6.15 and later are affected. Fixed in 6.17.9, 6.18 and their respective stable series.

Affected from
≥ 6.15
Fixed in
✓ 6.17.9 6.17.x ✓ 6.18

References

The following references provide additional information about CVE-2025-40270 including vendor advisories, patch commits, exploit details, and third-party analysis. Links are sourced from the NIST NVD database.

Frequently asked questions

  • What is CVE-2025-40270?

    CVE-2025-40270 is a unscored severity Linux kernel vulnerability . It affects Linux kernel versions from 6.15 onward and has been patched in 6.17.9 and 6.18. CVE-2025-40270 has not been confirmed as actively exploited and is not listed in the CISA KEV catalog.

  • Is there a patch available for CVE-2025-40270?

    Yes — CVE-2025-40270 has been patched. Fixed versions include 6.17.9 and 6.18. If you are running Linux kernel 6.15 or later up to the fix versions, apply the relevant patch for your kernel branch.

  • Is CVE-2025-40270 actively exploited?

    No — CVE-2025-40270 has not been confirmed as actively exploited. It is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.