Critical Memory Management Vulnerability in Linux Kernel - CVE-2025-22015
Summary
CVE-2025-22015: In the Linux kernel, the following vulnerability has been resolved: mm/migrate: fix shmem xarray update during migration A shmem folio can be either in page cache or in swap cache, but not at the same time. Affects linux versions < 6.1.133-1. Fixed in 6.1.133-1. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The Linux kernel is the core component of many operating systems, responsible for managing system resources and facilitating communication between hardware and software. It supports a wide range of functionalities, including process management, memory management, and device control. This vulnerability specifically affects the memory management subsystem, particularly in handling shared memory (shmem) folios, which can lead to data corruption and system instability.
Vulnerability Detail
CVE-2025-22015 is a vulnerability in the Linux kernel that arises from improper handling of shared memory folios during migration. When a shmem folio is in swap cache, it should not be in page cache simultaneously. The flaw occurs in the __folio_migrate_mapping() function, where the determination of xarray entries to update conflates the two states, leading to potential corruption of xarray multi-index entries. This can result in a sibling entry being incorrectly treated as a normal entry, causing data integrity issues. Additionally, there is a risk of NULL pointer dereferencing when splitting in-swap-cache shmem folios, although this is mitigated by early exit conditions in the calling function.
How To Fix
Minimum fixed version
6.1.133-1
This is the first release that contains the fix.
sudo apt-get install --only-upgrade linux
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
Currently, no specific workarounds are provided for this vulnerability. It is recommended to apply the patch as soon as it becomes available.
Conclusion
CVE-2025-22015 is a critical vulnerability in the Linux kernel that affects memory management, specifically in handling shared memory folios. Users are advised to update their systems to the patched version to prevent potential data corruption and system instability. Monitoring tools like Vulert can assist in identifying vulnerabilities in your applications.
See every vulnerability recorded for linux →
FAQ
CVE-2025-22015 is a vulnerability in the Linux kernel related to improper handling of shared memory folios during migration, which can lead to data corruption.
This vulnerability can lead to data integrity issues and potential system instability, especially in environments that rely heavily on shared memory.
Yes, a patch is available for Debian 13 in version 6.12.21-1. Users should update their kernel to this version to mitigate the vulnerability.
While no specific workarounds are provided, it is crucial to monitor for updates and apply the patch as soon as it is available.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. You can check your application against this vulnerability using the Vulert playground without any signup at Vulert Scanner.
Related vulnerabilities
Recent vulnerabilities recorded for linux.