CVE-2025-40270
Last modified
CVE-2025-40270 is a high-severity vulnerability rated 7.8/10 on the CVSS scale. 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. EPSS estimates a 0.16% chance of exploitation in the next 30 days.
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.
Metrics
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Affected Software
Source: CNA advisory (CVE.org). NVD analysis pending.
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | >= 78524b05f1a3e16a5d00cc9c6259c41a9d6003ce, < a4145be7b56bfa87dce56415c3ad993071462b8a; >= 78524b05f1a3e16a5d00cc9c6259c41a9d6003ce, < 1c2a936edd71e133f2806e68324ec81a4eb07588 |
| Linux | Linux | 6.15 |
References
Timeline
- Published
- Last Modified
- Status
- Deferred
Frequently Asked Questions
What is CVE-2025-40270?
How severe is CVE-2025-40270?
How do I fix CVE-2025-40270?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2025
- CVE-2025-40265In the Linux kernel, the following vulnerability has been re…
- CVE-2025-40266In the Linux kernel, the following vulnerability has been re…8.2
- CVE-2025-40267In the Linux kernel, the following vulnerability has been re…
- CVE-2025-40268In the Linux kernel, the following vulnerability has been re…
- CVE-2025-40269In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2025-4027A vulnerability, which was classified as critical, was found…9.8
- CVE-2025-40271In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2025-40272In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2025-40273In the Linux kernel, the following vulnerability has been re…8.8
- CVE-2025-40274In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2025-40275In the Linux kernel, the following vulnerability has been re…
- CVE-2025-40276In the Linux kernel, the following vulnerability has been re…7.3
Are you affected by CVE-2025-40270?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
