CVE-2025-22015 | mm/migrate: fix shmem xarray update during migration

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/[email protected]/ 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.

Published: 2025-04-08 Last update: 2025-11-03 Assigner: 416baaa9-dc9f-4396-8d5f-8c081fb06d67 Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Conclusion & alert: CVE-2025-22015 is rated Low Risk (25/100): CVSS Medium severity, with low exploitation likelihood (EPSS 0.03%). Mandatory action: Monitor for updates and reassess as exploit intelligence or EPSS changes.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2025-22015

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-05-17 0.08% 0.03% -0.05%
2 2026-02-02 0.02% 0.08% +0.07%
3 2025-04-08 0.02%

Full EPSS history (3 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2025-22015

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
5.5 3.1 MEDIUM
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:N)
Data isn’t meaningfully altered or forged.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
1.8 3.6 [email protected]

Weakness enumeration for CVE-2025-22015

OS Trackers for CVE-2025-22015

vendor priority summary link
debian unimportant CVE-2025-22015 unimportant priority: Debian including 2 source packages (linux, linux-6.1), 6 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 6. https://security-tracker.debian.org/tracker/CVE-2025-22015
redhat medium https://access.redhat.com/security/cve/CVE-2025-22015
suse medium https://www.suse.com/security/cve/CVE-2025-22015/
ubuntu medium CVE-2025-22015 medium priority: Ubuntu including 150 source packages (linux, linux-allwinner-5.19, …), 1487 status rows across 10 suites (bionic, focal, jammy, noble, oracular, plucky, questing, trusty, upstream, xenial): DNE 1097, ignored 150, released 130, not-affected 110. https://ubuntu.com/security/CVE-2025-22015

Affected software / configurations for CVE-2025-22015

Vendor Product Version Raw CPE
linux linux_kernel >= 6.1.71, < 6.1.132 cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
linux linux_kernel >= 6.6.10, < 6.6.85 cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
linux linux_kernel >= 6.7.1, < 6.12.21 cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
linux linux_kernel >= 6.13, < 6.13.9 cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
linux linux_kernel 6.7 cpe:2.3:o:linux:linux_kernel:6.7:-:*:*:*:*:*:*
linux linux_kernel 6.7 cpe:2.3:o:linux:linux_kernel:6.7:rc8:*:*:*:*:*:*
linux linux_kernel 6.14 cpe:2.3:o:linux:linux_kernel:6.14:rc1:*:*:*:*:*:*
linux linux_kernel 6.14 cpe:2.3:o:linux:linux_kernel:6.14:rc2:*:*:*:*:*:*
linux linux_kernel 6.14 cpe:2.3:o:linux:linux_kernel:6.14:rc3:*:*:*:*:*:*
linux linux_kernel 6.14 cpe:2.3:o:linux:linux_kernel:6.14:rc4:*:*:*:*:*:*
linux linux_kernel 6.14 cpe:2.3:o:linux:linux_kernel:6.14:rc5:*:*:*:*:*:*
linux linux_kernel 6.14 cpe:2.3:o:linux:linux_kernel:6.14:rc6:*:*:*:*:*:*
linux linux_kernel 6.14 cpe:2.3:o:linux:linux_kernel:6.14:rc7:*:*:*:*:*:*

References for CVE-2025-22015

cvelogic Threat Intelligence