CVE-2025-21861
kernel: mm/migrate_device: don't add folio to be freed to LRU in migrate_device_finalize()
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · March 12, 2025
Updated · October 30, 2026
Description
A vulnerability was found in the Linux kernel's memory migration system in the migrate_device_finalize() function, where a folio that should be freed is erroneously added back into the Least Recently Used (LRU) list. This issue can lead to memory corruption caused by a use-after-free issue when a previously freed folio is reaccessed, leading to system instability or potential denial of service.
Statement
This vulnerability is rated as Moderate because exploitation requires local system access and specific workflows involving heterogeneous memory management to trigger the flaw, limiting the blast radius primarily to a kernel crash or denial of service rather than code execution. In typical Red Hat Enterprise Linux deployments, device-specific memory migration is exercised only when utilizing specialized hardware drivers that support private device folios. Consequently, standard workloads remain unaffected unless a local user can invoke device memory migration paths to trigger internal memory accounting inconsistencies.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
No mitigation is specified in collected source.
CVSS / CWE
CVSS 3.1 · 5.5CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
CWE not specified