Linux hwe edge: In the Linux kernel, the following vulnerability has been resolved: mm, swap: fix potential UAF issue for VMA readahead Since commit 78524b05f1a3… (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.
AI Analysis
Technical Summary
The Linux kernel had a vulnerability in the memory management swap code where VMA readahead could cause a use-after-free (UAF) condition. This occurred because since commit 78524b05f1a3, the helper function __read_swap_cache_async stopped internally acquiring swap device references, assuming callers already held them. However, VMA readahead walks page tables and may encounter swap entries from multiple devices, calling __read_swap_cache_async on devices without holding references. This race condition between swapoff on one device and swapin on another could lead to UAF. The fix ensures VMA readahead obtains device references when accessing swap entries from devices different than the target entry's device.
Potential Impact
Successful exploitation could result in use-after-free conditions in kernel memory management, potentially leading to arbitrary code execution, kernel crashes, or data corruption. The CVSS vector indicates local attack vector with low complexity, requiring low privileges but no user interaction, and impacts confidentiality, integrity, and availability at a high level.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Since this is a Linux kernel vulnerability, monitor official Linux kernel repositories and vendor advisories for patches addressing CVE-2025-40270. Apply updates promptly once available to mitigate the risk. No specific temporary mitigations are indicated in the provided data.
Linux hwe edge: In the Linux kernel, the following vulnerability has been resolved: mm, swap: fix potential UAF issue for VMA readahead Since commit 78524b05f1a3… (CVE-2025-40270)
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.
CVSS v3.1
Score 7.8high
Affected software
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The Linux kernel had a vulnerability in the memory management swap code where VMA readahead could cause a use-after-free (UAF) condition. This occurred because since commit 78524b05f1a3, the helper function __read_swap_cache_async stopped internally acquiring swap device references, assuming callers already held them. However, VMA readahead walks page tables and may encounter swap entries from multiple devices, calling __read_swap_cache_async on devices without holding references. This race condition between swapoff on one device and swapin on another could lead to UAF. The fix ensures VMA readahead obtains device references when accessing swap entries from devices different than the target entry's device.
Potential Impact
Successful exploitation could result in use-after-free conditions in kernel memory management, potentially leading to arbitrary code execution, kernel crashes, or data corruption. The CVSS vector indicates local attack vector with low complexity, requiring low privileges but no user interaction, and impacts confidentiality, integrity, and availability at a high level.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Since this is a Linux kernel vulnerability, monitor official Linux kernel repositories and vendor advisories for patches addressing CVE-2025-40270. Apply updates promptly once available to mitigate the risk. No specific temporary mitigations are indicated in the provided data.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-hfc9-3847-7v4r
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2025-40270"]
- Database Specific Severity
- HIGH
- Cvss Version
- 3.1
Threat ID: 6a6b72d59c2644c7f847994a
Added to database: 07/30/2026, 15:50:45 UTC
Last enriched: 07/30/2026, 17:23:50 UTC
Last updated: 09/10/2026, 19:36:50 UTC
Views: 12
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.