Linux Kernel up to 6.1.131/6.6.84/6.12.20/6.13.8 __folio_migrate_mapping null pointer dereference

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
5.5$0-$5k0.00

Summaryinfo

A vulnerability was found in Linux Kernel up to 6.1.131/6.6.84/6.12.20/6.13.8. It has been declared as critical. This affects the function __folio_migrate_mapping. Executing a manipulation can lead to null pointer dereference. This vulnerability appears as CVE-2025-22015. There is no available exploit. It is recommended to upgrade the affected component.

Detailsinfo

A vulnerability classified as critical was found in Linux Kernel up to 6.1.131/6.6.84/6.12.20/6.13.8. This vulnerability affects the function __folio_migrate_mapping. The manipulation with an unknown input leads to a null pointer dereference vulnerability. The CWE definition for the vulnerability is CWE-476. A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. As an impact it is known to affect availability. CVE summarizes:

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.

The advisory is available at git.kernel.org. This vulnerability was named CVE-2025-22015 since 12/29/2024. Technical details are known, but there is no available exploit.

The vulnerability scanner Nessus provides a plugin with the ID 234309 (Debian dsa-5900 : affs-modules-6.1.0-28-4kc-malta-di - security update), which helps to determine the existence of the flaw in a target environment.

Upgrading to version 6.1.132, 6.6.85, 6.12.21 or 6.13.9 eliminates this vulnerability. Applying the patch 49100c0b070e900f87c8fac3be9b9ef8a30fa673/29124ae980e2860f0eec7355949d3d3292ee81da/c057ee03f751d6cecf7ee64f52f6545d94082aaa/75cfb92eb63298d717b6b0118f91ba12c4fcfeb5/60cf233b585cdf1f3c5e52d1225606b86acd08b0 is able to eliminate this problem. The bugfix is ready for download at git.kernel.org. The best possible mitigation is suggested to be upgrading to the latest version.

The vulnerability is also documented in the databases at Tenable (234309) and CERT Bund (WID-SEC-2025-0732). If you want to get best quality of vulnerability data, you may have to visit VulDB.

Affected

  • Debian Linux
  • Ubuntu Linux
  • SUSE Linux
  • Oracle Linux
  • Open Source Linux Kernel
  • SolarWinds Security Event Manager

Productinfo

Type

Vendor

Name

Version

License

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 5.6
VulDB Meta Temp Score: 5.5

VulDB Base Score: 5.7
VulDB Temp Score: 5.5
VulDB Vector: 🔍
VulDB Reliability: 🔍

NVD Base Score: 5.5
NVD Vector: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍

Exploitinginfo

Class: Null pointer dereference
CWE: CWE-476 / CWE-404
CAPEC: 🔍
ATT&CK: 🔍

Physical: Partially
Local: Yes
Remote: Partially

Availability: 🔍
Status: Not defined

EPSS Score: 🔍
EPSS Percentile: 🔍

Price Prediction: 🔍
Current Price Estimation: 🔍

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Nessus ID: 234309
Nessus Name: Debian dsa-5900 : affs-modules-6.1.0-28-4kc-malta-di - security update

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

0-Day Time: 🔍

Upgrade: Kernel 6.1.132/6.6.85/6.12.21/6.13.9
Patch: 49100c0b070e900f87c8fac3be9b9ef8a30fa673/29124ae980e2860f0eec7355949d3d3292ee81da/c057ee03f751d6cecf7ee64f52f6545d94082aaa/75cfb92eb63298d717b6b0118f91ba12c4fcfeb5/60cf233b585cdf1f3c5e52d1225606b86acd08b0

Timelineinfo

12/29/2024 🔍
04/08/2025 +99 days 🔍
04/08/2025 +0 days 🔍
10/28/2025 +203 days 🔍

Sourcesinfo

Vendor: kernel.org

Advisory: git.kernel.org
Status: Confirmed

CVE: CVE-2025-22015 (🔍)
GCVE (CVE): GCVE-0-2025-22015
GCVE (VulDB): GCVE-100-303778
CERT Bund: WID-SEC-2025-0732 - Linux Kernel: Mehrere Schwachstellen

Entryinfo

Created: 04/08/2025 12:35
Updated: 10/28/2025 21:20
Changes: 04/08/2025 12:35 (58), 04/14/2025 20:39 (2), 07/19/2025 23:04 (7), 10/28/2025 21:20 (11)
Complete: 🔍
Cache ID: 216::103

If you want to get best quality of vulnerability data, you may have to visit VulDB.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Do you need the next level of professionalism?

Upgrade your account now!