CVE-2025-21861

MEDIUMNVD 5.55.5
EchelonGraph scoreMEDIUM confidence

Score 5.5 from GitHub Security Advisory published 2025-03-12. NVD baseline CVSS 5.5; sources differ by 0.0.

Triggered by: GitHub Security Advisory CVSS
Sources: epss, ghsa, nvd
5.5
EchelonGraph verdictMonitorLow exploitation likelihood right now — keep watching.
  • Lower severity and no public exploit yet
CISA-KEV: Not listedEPSS: 0%CVSS: 5.5Exploit: NoneExposed: 0

A fix is available — apply it.

In the Linux kernel, the following vulnerability has been resolved:

mm/migrate_device: don't add folio to be freed to LRU in migrate_device_finalize()

If migration succeeded, we called folio_migrate_flags()->mem_cgroup_migrate() to migrate the memcg from the old to the new folio. This will set memcg_data of the old folio to 0.

Similarly, if migration failed, memcg_data of the dst folio is left unset.

If we call folio_putback_lru() on such folios (memcg_data == 0), we will add the folio to be freed to the LRU, making memcg code unhappy. Running the hmm selftests:

# ./hmm-tests ... # RUN hmm.hmm_device_private.migrate ... [ 102.078007][T14893] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x7ff27d200 pfn:0x13cc00 [ 102.079974][T14893] anon flags: 0x17ff00000020018(uptodate|dirty|swapbacked|node=0|zone=2|lastcpupid=0x7ff) [ 102.082037][T14893] raw: 017ff00000020018 dead000000000100 dead000000000122 ffff8881353896c9 [ 102.083687][T14893] raw: 00000007ff27d200 0000000000000000 00000001ffffffff 0000000000000000 [ 102.085331][T14893] page dumped because: VM_WARN_ON_ONCE_FOLIO(!memcg && !mem_cgroup_disabled()) [ 102.087230][T14893] ------------[ cut here ]------------ [ 102.088279][T14893] WARNING: CPU: 0 PID: 14893 at ./include/linux/memcontrol.h:726 folio_lruvec_lock_irqsave+0x10e/0x170 [ 102.090478][T14893] Modules linked in: [ 102.091244][T14893] CPU: 0 UID: 0 PID: 14893 Comm: hmm-tests Not tainted 6.13.0-09623-g6c216bc522fd #151 [ 102.093089][T14893] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-2.fc40 04/01/2014 [ 102.094848][T14893] RIP: 0010:folio_lruvec_lock_irqsave+0x10e/0x170 [ 102.096104][T14893] Code: ... [ 102.099908][T14893] RSP: 0018:ffffc900236c37b0 EFLAGS: 00010293 [ 102.101152][T14893] RAX: 0000000000000000 RBX: ffffea0004f30000 RCX: ffffffff8183f426 [ 102.102684][T14893] RDX: ffff8881063cb880 RSI: ffffffff81b8117f RDI: ffff8881063cb880 [ 102.104227][T14893] RBP: 0000000000000000 R08: 0000000000000005 R09: 0000000000000000 [ 102.105757][T14893] R10: 0000000000000001 R11: 0000000000000002 R12: ffffc900236c37d8 [ 102.107296][T14893] R13: ffff888277a2bcb0 R14: 000000000000001f R15: 0000000000000000 [ 102.108830][T14893] FS: 00007ff27dbdd740(0000) GS:ffff888277a00000(0000) knlGS:0000000000000000 [ 102.110643][T14893] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 102.111924][T14893] CR2: 00007ff27d400000 CR3: 000000010866e000 CR4: 0000000000750ef0 [ 102.113478][T14893] PKRU: 55555554 [ 102.114172][T14893] Call Trace: [ 102.114805][T14893] [ 102.115397][T14893] ? folio_lruvec_lock_irqsave+0x10e/0x170 [ 102.116547][T14893] ? __warn.cold+0x110/0x210 [ 102.117461][T14893] ? folio_lruvec_lock_irqsave+0x10e/0x170 [ 102.118667][T14893] ? report_bug+0x1b9/0x320 [ 102.119571][T14893] ? handle_bug+0x54/0x90 [ 102.120494][T14893] ? exc_invalid_op+0x17/0x50 [ 102.121433][T14893] ? asm_exc_invalid_op+0x1a/0x20 [ 102.122435][T14893] ? __wake_up_klogd.part.0+0x76/0xd0 [ 102.123506][T14893] ? dump_page+0x4f/0x60 [ 102.124352][T14893] ? folio_lruvec_lock_irqsave+0x10e/0x170 [ 102.125500][T14893] folio_batch_move_lru+0xd4/0x200 [ 102.126577][T14893] ? __pfx_lru_add+0x10/0x10 [ 102.127505][T14893] __folio_batch_add_and_move+0x391/0x720 [ 102.128633][T14893] ? __pfx_lru_add+0x10/0x10 [ 102.129550][T14893] folio_putback_lru+0x16/0x80 [ 102.130564][T14893] migrate_device_finalize+0x9b/0x530 [ 102.131640][T14893] dmirror_migrate_to_device.constprop.0+0x7c5/0xad0 [ 102.133047][T14893] dmirror_fops_unlocked_ioctl+0x89b/0xc80

Likely, nothing else goes wrong: putting the last folio reference will remove the folio from the LRU again. So besides memcg complaining, adding the folio to be freed to the LRU is just an unnecessary step.

The new flow resembles what we have in migrate_folio_move(): add the dst to the lru, rem ---truncated---

CVSS v3
5.5
EG Score
5.5(medium)
EG Risk
EPSS
11.7%
KEV
Not listed

Published

March 12, 2025

Last Modified

July 14, 2026

Advisory Details (9)

Auto-updated Jul 17, 2026
No patch confirmed yet.
generic

mm/migrate_device: don't add folio to be freed to LRU in migrate_device_finalize() - kernel/git/stable/linux.git - Linux kernel stable tree

https://git.kernel.org/stable/c/78f579cb7d825134e071a1714d8d0c4fd0ffe459
generic

mm/migrate_device: don't add folio to be freed to LRU in migrate_device_finalize() - kernel/git/stable/linux.git - Linux kernel stable tree

https://git.kernel.org/stable/c/64397b0cb7c09e3ef3f9f5c7c17299c4eebd3875
generic

mm/migrate_device: don't add folio to be freed to LRU in migrate_device_finalize() - kernel/git/stable/linux.git - Linux kernel stable tree

https://git.kernel.org/stable/c/61fa824e304ed162fe965f64999068e6fcff2059
generic

mm/migrate_device: don't add folio to be freed to LRU in migrate_device_finalize() - kernel/git/stable/linux.git - Linux kernel stable tree

https://git.kernel.org/stable/c/4f52f7c50f5b6f5eeb06823e21fe546d90f9c595
generic

mm/migrate_device: don't add folio to be freed to LRU in migrate_device_finalize() - kernel/git/stable/linux.git - Linux kernel stable tree

https://git.kernel.org/stable/c/41cddf83d8b00f29fd105e7a0777366edc69a5cf
generic

mm/migrate_device: don't add folio to be freed to LRU in migrate_device_finalize() - kernel/git/stable/linux.git - Linux kernel stable tree

https://git.kernel.org/stable/c/3f9240d59e9a95d19f06120bfd1d0e681c6c0ac7
generic

mm/migrate_device: don't add folio to be freed to LRU in migrate_device_finalize() - kernel/git/stable/linux.git - Linux kernel stable tree

https://git.kernel.org/stable/c/20fb6fc51863fbff7868de8b5f6d249d2094df1f
generic

mm/migrate_device: don't add folio to be freed to LRU in migrate_device_finalize() - kernel/git/stable/linux.git - Linux kernel stable tree

https://git.kernel.org/stable/c/069dd21ea8262204f94737878389c2815a054a9e

Patch Availability(22)

Vendor / EcosystemFixed in / PatchReleasedSource
ubuntulinux-virtual-6.8 (6.8.0-78.78) @ noble2026-05-30ubuntu
ubuntulinux-tools-ibm-lts-24.04 (6.8.0-1033.33) @ noble2026-05-30ubuntu
ubuntulinux-tools-oracle-lts-24.04 (6.8.0-1032.33) @ noble2026-05-30ubuntu
ubuntulinux-tools-raspi-6.8 (6.8.0-1035.39) @ noble2026-05-30ubuntu
ubuntulinux-tools-raspi-realtime-6.8 (6.8.0-2028.29) @ noble2026-05-30ubuntu
ubuntulinux-tools-azure-edge (6.8.0-1034.39~22.04.1) @ jammy2026-05-30ubuntu
ubuntulinux-tools-realtime-5.15 (5.15.0.1099.103) @ jammy2026-05-30ubuntu
ubuntulinux-tools-gcp-fips-5.15 (5.15.0.1100.90) @ jammy2026-05-30ubuntu
ubuntulinux-virtual-hwe-20.04-edge (5.15.0.170.159) @ jammy2026-05-30ubuntu
ubuntulinux-tools-nvidia-tegra-rt-5.15 (5.15.0.1052.52) @ jammy2026-05-30ubuntu
ubuntulinux-tools-intel-iotg-5.15 (5.15.0.1095.95) @ jammy2026-05-30ubuntu
ubuntulinux-tools-nvidia-lowlatency-5.15 (5.15.0.1095.95) @ jammy2026-05-30ubuntu
ubuntulinux-tools-oracle-lts-22.04 (5.15.0.1097.93) @ jammy2026-05-30ubuntu
ubuntulinux-xilinx-zynqmp-tools-5.15.0-1064 (5.15.0-1064.68) @ jammy2026-05-30ubuntu
ubuntulinux-tools-aws-edge (5.15.0.1100.107~20.04.1) @ focal2026-05-30ubuntu
ubuntulinux-tools-nvidia-tegra-igx-rt-5.15 (5.15.0.1041.43) @ jammy2026-05-30ubuntu
ubuntulinux-tools-raspi-nolpae (5.15.0.1097.95) @ jammy2026-05-30ubuntu
ubuntulinux-tools-azure-edge (5.15.0.1110.119~20.04.1) @ focal2026-05-30ubuntu
ubuntulinux-tools-azure-lts-22.04 (5.15.0.1109.107) @ jammy2026-05-30ubuntu
ubuntulinux-tools-azure-fips-5.15 (5.15.0.1109.94) @ jammy2026-05-30ubuntu
redhatkernel-0:6.12.0-124.8.1.el10_12025-11-11redhat
redhatkernel-0:5.14.0-611.5.1.el9_72025-11-11redhat

Patches are aggregated from vendor advisories (Red Hat, Microsoft, Cisco, GitHub) and package ecosystems (OSV, GHSA). Multiple rows for the same upstream release have been deduplicated.

Weakness Classification(1)

MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.

Additional Vendor Advisories

(20)

Data Freshness Timeline

(refreshed 10× in last 7d / 46× in last 30d)

Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.

  1. 2026-07-22 14:07 UTCEPSS rescore
  2. 2026-07-22 14:07 UTCEPSS rescore
  3. 2026-07-21 15:24 UTCEPSS rescore
  4. 2026-07-20 17:07 UTCEPSS rescore
  5. 2026-07-19 14:30 UTCEPSS rescore
  6. 2026-07-19 14:30 UTCEPSS rescore
  7. 2026-07-19 02:28 UTCEPSS rescore
  8. 2026-07-19 02:28 UTCEPSS rescore
  9. 2026-07-18 10:03 UTCEPSS rescore
  10. 2026-07-16 17:02 UTCEPSS rescore
  11. 2026-07-15 16:57 UTCEPSS rescore
  12. 2026-07-15 16:57 UTCEPSS rescore
  13. 2026-07-15 01:59 UTCEPSS rescore
  14. 2026-07-13 22:29 UTCEPSS rescore
  15. 2026-07-13 22:29 UTCEPSS rescore
  16. 2026-07-13 06:12 UTCEPSS rescore
  17. 2026-07-13 06:12 UTCEPSS rescore
  18. 2026-07-12 05:46 UTCEPSS rescore
  19. 2026-07-12 05:46 UTCEPSS rescore
  20. 2026-07-11 08:27 UTCEPSS rescore
  21. 2026-07-11 08:26 UTCEPSS rescore
  22. 2026-07-09 19:09 UTCEPSS rescore
  23. 2026-07-08 15:14 UTCEPSS rescore
  24. 2026-07-07 13:45 UTCEPSS rescore
  25. 2026-07-07 07:51 UTCOSV refresh
Show 65 more
  1. 2026-07-06 16:26 UTCEPSS rescore
  2. 2026-07-06 02:22 UTCEPSS rescore
  3. 2026-07-06 02:22 UTCEPSS rescore
  4. 2026-07-05 02:30 UTCEPSS rescore
  5. 2026-07-04 06:30 UTCEPSS rescore
  6. 2026-07-01 15:06 UTCEPSS rescore
  7. 2026-06-30 23:21 UTCEPSS rescore
  8. 2026-06-30 23:21 UTCEPSS rescore
  9. 2026-06-29 14:06 UTCEPSS rescore
  10. 2026-06-28 14:07 UTCEPSS rescore
  11. 2026-06-28 14:07 UTCEPSS rescore
  12. 2026-06-28 04:55 UTCEPSS rescore
  13. 2026-06-28 04:55 UTCEPSS rescore
  14. 2026-06-27 03:08 UTCEPSS rescore
  15. 2026-06-27 03:08 UTCEPSS rescore
  16. 2026-06-25 13:49 UTCEPSS rescore
  17. 2026-06-25 13:49 UTCEPSS rescore
  18. 2026-06-24 14:04 UTCEPSS rescore
  19. 2026-06-24 14:04 UTCEPSS rescore
  20. 2026-06-23 21:32 UTCEPSS rescore
  21. 2026-06-23 21:32 UTCEPSS rescore
  22. 2026-06-22 14:25 UTCEPSS rescore
  23. 2026-06-22 14:25 UTCEPSS rescore
  24. 2026-06-21 14:56 UTCEPSS rescore
  25. 2026-06-21 14:56 UTCEPSS rescore
  26. 2026-06-21 01:59 UTCEPSS rescore
  27. 2026-06-21 01:59 UTCEPSS rescore
  28. 2026-06-19 19:25 UTCEPSS rescore
  29. 2026-06-19 19:25 UTCEPSS rescore
  30. 2026-06-18 18:44 UTCOSV refresh
  31. 2026-06-18 17:52 UTCEPSS rescore
  32. 2026-06-18 17:52 UTCEPSS rescore
  33. 2026-06-17 17:52 UTCEPSS rescore
  34. 2026-06-16 17:52 UTCEPSS rescore
  35. 2026-06-16 17:52 UTCEPSS rescore
  36. 2026-06-15 17:48 UTCEPSS rescore
  37. 2026-06-14 23:17 UTCEPSS rescore
  38. 2026-06-13 22:59 UTCEPSS rescore
  39. 2026-06-12 23:11 UTCEPSS rescore
  40. 2026-06-11 13:59 UTCEPSS rescore
  41. 2026-06-10 22:18 UTCEPSS rescore
  42. 2026-06-10 13:22 UTCEPSS rescore
  43. 2026-06-08 14:16 UTCEPSS rescore
  44. 2026-06-08 14:16 UTCEPSS rescore
  45. 2026-06-07 15:24 UTCEPSS rescore
  46. 2026-06-07 15:24 UTCEPSS rescore
  47. 2026-06-06 13:47 UTCEPSS rescore
  48. 2026-06-06 13:47 UTCEPSS rescore
  49. 2026-06-05 22:46 UTCEPSS rescore
  50. 2026-06-05 22:46 UTCEPSS rescore
  51. 2026-06-04 13:11 UTCEPSS rescore
  52. 2026-06-04 13:11 UTCEPSS rescore
  53. 2026-06-02 20:12 UTCEPSS rescore
  54. 2026-06-02 20:12 UTCEPSS rescore
  55. 2026-06-01 13:51 UTCEPSS rescore
  56. 2026-06-01 13:51 UTCEPSS rescore
  57. 2026-05-31 22:30 UTCEPSS rescore
  58. 2026-05-31 22:30 UTCEPSS rescore
  59. 2026-05-31 00:16 UTCEPSS rescore
  60. 2026-05-31 00:16 UTCEPSS rescore
  61. 2026-05-30 09:40 UTCEG score recompute
  62. 2026-05-30 09:40 UTCVendor advisory
  63. 2026-05-30 09:39 UTCGHSA enrichment
  64. 2026-05-29 17:20 UTCOSV refresh
  65. 2026-05-29 13:44 UTCEPSS rescore

Frequently asked(5)

What is CVE-2025-21861?
CVE-2025-21861 is a medium vulnerability published on March 12, 2025. In the Linux kernel, the following vulnerability has been resolved: mm/migratedevice: don't add folio to be freed to LRU in migratedevice_finalize() If migration succeeded, we called foliomigrateflags()->memcgroupmigrate() to migrate the memcg from the old to the new folio. This will set memcg_data…
When was CVE-2025-21861 disclosed?
CVE-2025-21861 was first published in the National Vulnerability Database on March 12, 2025, with the most recent update on July 14, 2026. EchelonGraph re-ingests CVE updates from NVD on a 2-hour cycle, so this page reflects the latest published state.
Is CVE-2025-21861 actively exploited?
CVE-2025-21861 is not currently on CISA's Known Exploited Vulnerabilities catalog. FIRST EPSS estimates a 11.7% percentile likelihood of exploitation in the next 30 days — higher percentiles indicate greater predicted risk.
What is the CVSS score of CVE-2025-21861?
CVE-2025-21861 has a CVSS v3 base score of 5.5 (NVD).
How do I remediate CVE-2025-21861?
Patch to the fixed version published by the affected vendor. Where vendor advisories exist for CVE-2025-21861, EchelonGraph cross-links them in the Vendor Advisories panel below — those typically contain the canonical remediation steps, fixed version numbers, and any vendor-specific mitigations.

Dependency Blast Radius

Explore the affected products and dependency analysis for CVE-2025-21861

Explore →

Is Your Infrastructure Affected by CVE-2025-21861?

EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.