Cloudanix VulnDB

CVE-2025-22015

None

CVSS

—

EPSS

0.2%

Published

Apr 8, 2025

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A flaw in the Linux kernel's handling of certain memory pages can let an attacker on the same machine corrupt internal structures, potentially crashing the system or taking full control.

Exploitation
Local Privilege
Attacker needs
Local User
Complexity
Moderate
Impact
Data Tampering
Component
OS kernel
Class
Memory Corruption
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Incorrect xarray entry count calculation in __folio_migrate_mapping() for shmem folios in swap cache corrupts multi-index entries by converting sibling entries to normal entries during xas_store(); a related path in __split_huge_page() can dereference NULL when a swap-cached shmem folio is split.

Why it matters to the business

Kernel memory corruption on Linux systems can cause crashes, data loss, or escalation to full system compromise; widespread kernel deployment and downstream package prevalence increase operational risk and patching urgency across servers and containers.

How an attack unfolds

An attacker with local access crafts workloads that place shmem folios into the swap cache then forces migration or huge-page splitting, triggering the flawed xarray update path to corrupt kernel structures and potentially chain into privilege-escalation primitives seen in related kernel CVEs.

How to fix it

Upgrade the Linux kernel to 6.1.132 or later; for Red Hat Enterprise Linux 9.0 EUS apply the 5.14.0-70.49.1.el9_0 package set (kernel, kernel-core, kernel-modules, bpftool, and related debuginfo/devel packages) and reboot.

How to confirm the fix worked

Verify running kernel version matches or exceeds the fixed releases; inspect /proc/version and package manager output for the listed fixed versions; confirm absence of the buggy __folio_migrate_mapping logic via source or symbol checks.

Typical attack path

  1. Obtain local execution on a Linux host
  2. Create shmem mappings and force the folio into swap cache
  3. Trigger folio migration or split_huge_page_to_list_to_order()
  4. Exploit resulting xarray corruption for memory write primitives
  5. Escalate to kernel code execution or denial of service

How to detect it

Search kernel logs for oops/panic messages referencing __folio_migrate_mapping, xas_store, shmem, swapcache or folio migration; inspect auditd and syslog for unusual shmem or swap activity preceding crashes; correlate with process creation of local workloads that heavily use tmpfs or swap.

What your security team should do

  • Immediately schedule kernel upgrades to the fixed versions on all affected systems
  • Prioritize internet-facing and multi-tenant hosts given ecosystem prevalence
  • Enable kernel crash-dump collection and monitor for xarray or migration-related oops
  • Review compensating controls such as seccomp and namespace restrictions until patched

The record

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. Namely, once it is in swap cache, folio->mapping should be NULL, and the folio is no longer in a shmem mapping. In __folio_migrate_mapping(), to determine the number of xarray entries to update, folio_test_swapbacked() is used, but that conflates shmem in page cache case and shmem in swap cache case. It leads to xarray multi-index entry corruption, since it turns a sibling entry to a normal entry during xas_store() (see [1] for a userspace reproduction). Fix it by only using folio_test_swapcache() to determine whether xarray is storing swap cache entries or not to choose the right number of xarray entries to update. [1] https://lore.kernel.org/linux-mm/Z8idPCkaJW1IChjT@casper.infradead.org/ Note: In __split_huge_page(), folio_test_anon() && folio_test_swapcache() is used to get swap_cache address space, but that ignores the shmem folio in swap cache case. It could lead to NULL pointer dereferencing when a in-swap-cache shmem folio is split at __xa_store(), since !folio_test_anon() is true and folio->mapping is NULL. But fortunately, its caller split_huge_page_to_list_to_order() bails out early with EBUSY when folio->mapping is NULL. So no need to take care of it here.

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 linux-6.1 0 6.1.137-1~deb11u1
Debian:12 linux 0 6.1.133-1
Debian:13 linux 0 6.12.21-1
Linux Kernel 0 6.1.132
Mageia:9 kernel 0 6.6.88-3.mga9
Mageia:9 kernel-linus 0 6.6.88-1.mga9
Mageia:9 kmod-virtualbox 0 7.0.24-70.mga9
Mageia:9 kmod-xtables-addons 0 3.24-78.mga9
SUSE:Linux Enterprise High Availability Extension 15 SP6 kernel-default 0 6.4.0-150600.23.50.1
SUSE:Linux Enterprise High Availability Extension 15 SP7 kernel-default 0 6.4.0-150700.53.3.1
SUSE:Linux Enterprise Live Patching 15 SP6 kernel-default 0 6.4.0-150600.23.50.1
SUSE:Linux Enterprise Live Patching 15 SP6 kernel-livepatch-SLE15-SP6-RT_Update_11 0 1-150600.1.3.2
SUSE:Linux Enterprise Live Patching 15 SP6 kernel-livepatch-SLE15-SP6_Update_11 0 1-150600.13.3.1
SUSE:Linux Enterprise Live Patching 15 SP7 kernel-default 0 6.4.0-150700.53.3.1
SUSE:Linux Enterprise Live Patching 15 SP7 kernel-livepatch-SLE15-SP7_Update_1 0 1-150700.15.3.1
SUSE:Linux Enterprise Module for Basesystem 15 SP6 kernel-64kb 0 6.4.0-150600.23.50.1
SUSE:Linux Enterprise Module for Basesystem 15 SP6 kernel-default 0 6.4.0-150600.23.50.1
SUSE:Linux Enterprise Module for Basesystem 15 SP6 kernel-default-base 0 6.4.0-150600.23.50.1.150600.12.22.1
SUSE:Linux Enterprise Module for Basesystem 15 SP6 kernel-source 0 6.4.0-150600.23.50.1
SUSE:Linux Enterprise Module for Basesystem 15 SP6 kernel-zfcpdump 0 6.4.0-150600.23.50.1
SUSE:Linux Enterprise Module for Basesystem 15 SP7 kernel-64kb 0 6.4.0-150700.53.3.1
SUSE:Linux Enterprise Module for Basesystem 15 SP7 kernel-default 0 6.4.0-150700.53.3.1
SUSE:Linux Enterprise Module for Basesystem 15 SP7 kernel-default-base 0 6.4.0-150700.53.3.1.150700.17.2.1
SUSE:Linux Enterprise Module for Basesystem 15 SP7 kernel-source 0 6.4.0-150700.53.3.1
SUSE:Linux Enterprise Module for Basesystem 15 SP7 kernel-zfcpdump 0 6.4.0-150700.53.3.1
SUSE:Linux Enterprise Module for Confidential Computing Technical Preview 15 SP6 kernel-coco 0 6.4.0-15061.21.coco15sp6.1
SUSE:Linux Enterprise Module for Confidential Computing Technical Preview 15 SP6 kernel-coco_debug 0 6.4.0-15061.21.coco15sp6.1
SUSE:Linux Enterprise Module for Confidential Computing Technical Preview 15 SP6 kernel-source-coco 0 6.4.0-15061.21.coco15sp6.1
SUSE:Linux Enterprise Module for Confidential Computing Technical Preview 15 SP6 kernel-syms-coco 0 6.4.0-15061.21.coco15sp6.1
SUSE:Linux Enterprise Module for Development Tools 15 SP6 kernel-docs 0 6.4.0-150600.23.50.1
SUSE:Linux Enterprise Module for Development Tools 15 SP6 kernel-obs-build 0 6.4.0-150600.23.50.1
SUSE:Linux Enterprise Module for Development Tools 15 SP6 kernel-source 0 6.4.0-150600.23.50.1
SUSE:Linux Enterprise Module for Development Tools 15 SP6 kernel-syms 0 6.4.0-150600.23.50.1
SUSE:Linux Enterprise Module for Development Tools 15 SP7 kernel-docs 0 6.4.0-150700.53.3.1
SUSE:Linux Enterprise Module for Development Tools 15 SP7 kernel-obs-build 0 6.4.0-150700.53.3.1
SUSE:Linux Enterprise Module for Development Tools 15 SP7 kernel-source 0 6.4.0-150700.53.3.1
SUSE:Linux Enterprise Module for Development Tools 15 SP7 kernel-syms 0 6.4.0-150700.53.3.1
SUSE:Linux Enterprise Module for Legacy 15 SP6 kernel-default 0 6.4.0-150600.23.50.1
SUSE:Linux Enterprise Module for Legacy 15 SP7 kernel-default 0 6.4.0-150700.53.3.1
SUSE:Linux Enterprise Module for Public Cloud 15 SP6 kernel-azure 0 6.4.0-150600.8.37.1
SUSE:Linux Enterprise Module for Public Cloud 15 SP6 kernel-source-azure 0 6.4.0-150600.8.37.1
SUSE:Linux Enterprise Module for Public Cloud 15 SP6 kernel-syms-azure 0 6.4.0-150600.8.37.1
SUSE:Linux Enterprise Module for Public Cloud 15 SP7 kernel-azure 0 6.4.0-150700.20.3.1
SUSE:Linux Enterprise Module for Public Cloud 15 SP7 kernel-source-azure 0 6.4.0-150700.20.3.1
SUSE:Linux Enterprise Module for Public Cloud 15 SP7 kernel-syms-azure 0 6.4.0-150700.20.3.1
SUSE:Linux Enterprise Workstation Extension 15 SP6 kernel-default 0 6.4.0-150600.23.50.1
SUSE:Linux Enterprise Workstation Extension 15 SP7 kernel-default 0 6.4.0-150700.53.3.1
SUSE:Real Time Module 15 SP6 kernel-rt 0 6.4.0-150600.10.39.1
SUSE:Real Time Module 15 SP6 kernel-rt_debug 0 6.4.0-150600.10.39.1
SUSE:Real Time Module 15 SP6 kernel-source-rt 0 6.4.0-150600.10.39.1
SUSE:Real Time Module 15 SP6 kernel-syms-rt 0 6.4.0-150600.10.39.1
openSUSE:Leap 15.6 dtb-aarch64 0 6.4.0-150600.23.50.1
openSUSE:Leap 15.6 kernel-64kb 0 6.4.0-150600.23.50.1
openSUSE:Leap 15.6 kernel-azure 0 6.4.0-150600.8.37.1
openSUSE:Leap 15.6 kernel-debug 0 6.4.0-150600.23.50.1
openSUSE:Leap 15.6 kernel-default 0 6.4.0-150600.23.50.1
openSUSE:Leap 15.6 kernel-default-base 0 6.4.0-150600.23.50.1.150600.12.22.1
openSUSE:Leap 15.6 kernel-docs 0 6.4.0-150600.23.50.1
openSUSE:Leap 15.6 kernel-kvmsmall 0 6.4.0-150600.23.50.1
openSUSE:Leap 15.6 kernel-obs-build 0 6.4.0-150600.23.50.1
openSUSE:Leap 15.6 kernel-obs-qa 0 6.4.0-150600.23.50.1
openSUSE:Leap 15.6 kernel-rt 0 6.4.0-150600.10.39.1
openSUSE:Leap 15.6 kernel-rt_debug 0 6.4.0-150600.10.39.1
openSUSE:Leap 15.6 kernel-source 0 6.4.0-150600.23.50.1
openSUSE:Leap 15.6 kernel-source-azure 0 6.4.0-150600.8.37.1
openSUSE:Leap 15.6 kernel-source-rt 0 6.4.0-150600.10.39.1
openSUSE:Leap 15.6 kernel-syms 0 6.4.0-150600.23.50.1
openSUSE:Leap 15.6 kernel-syms-azure 0 6.4.0-150600.8.37.1
openSUSE:Leap 15.6 kernel-syms-rt 0 6.4.0-150600.10.39.1
openSUSE:Leap 15.6 kernel-zfcpdump 0 6.4.0-150600.23.50.1

Related vulnerabilities