CVE-2025-21860
mm/zswap: fix inconsistency when zswap_store_page() fails
Mitigation
- Upgrade Linux to 63895d20d63b446f5049a963983489319c2ea3e2 or later.
Who should check
- Anyone running Linux >= b7c0ccdfbafdec98699ddb6f164beebf16f0bc45, < a3652f5552b20903315612da487a7be2b95394d5; >= b7c0ccdfbafdec98699ddb6f164beebf16f0bc45, < 63895d20d63b446f5049a963983489319c2ea3e2
- Anyone running Linux 6.13
Vulnerability facts
- Affected
- Linux >= b7c0ccdfbafdec98699ddb6f164beebf16f0bc45, < a3652f5552b20903315612da487a7be2b95394d5; >= b7c0ccdfbafdec98699ddb6f164beebf16f0bc45, < 63895d20d63b446f5049a963983489319c2ea3e2; Linux 6.13
- Fixed in
- Linux 63895d20d63b446f5049a963983489319c2ea3e2
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 3.3 (v3.1, NVD)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:LOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: None
- Integrity impact: None
- Availability impact: Low
- EPSS
- 0.25% chance of exploitation in 30 days (percentile 10, 2026-11-26)
- Modified
Description
In the Linux kernel, the following vulnerability has been resolved: mm/zswap: fix inconsistency when zswap_store_page() fails Commit b7c0ccdfbafd ("mm: zswap: support large folios in zswap_store()") skips charging any zswap entries when it failed to zswap the entire folio. However, when some base pages are zswapped but it failed to zswap the entire folio, the zswap operation is rolled back. When freeing zswap entries for those pages, zswap_entry_free() uncharges the zswap entries that were not previously charged, causing zswap charging to become inconsistent. This inconsistency triggers two warnings with following steps: # On a machine with 64GiB of RAM and 36GiB of zswap $ stress-ng --bigheap 2 # wait until the OOM-killer kills stress-ng $ sudo reboot The two warnings are: in mm/memcontrol.c:163, function obj_cgroup_release(): WARN_ON_ONCE(nr_bytes & (PAGE_SIZE - 1)); in mm/page_counter.c:60, function page_counter_cancel(): if (WARN_ONCE(new < 0, "page_counter underflow: %ld nr_pages=%lu\n", new, nr_pages)) zswap_stored_pages also becomes inconsistent in the same way. As suggested by Kanchana, increment zswap_stored_pages and charge zswap entries within zswap_store_page() when it succeeds. This way, zswap_entry_free() will decrement the counter and uncharge the entries when it failed to zswap the entire folio. While this could potentially be optimized by batching objcg charging and incrementing the counter, let's focus on fixing the bug this time and leave the optimization for later after some evaluation. After resolving the inconsistency, the warnings disappear. [42.hyeyoo@gmail.com: refactor zswap_store_page()]
Affected and fixed versions
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2025-21860. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2025-21860.md Affected: Linux >= b7c0ccdfbafdec98699ddb6f164beebf16f0bc45, < a3652f5552b20903315612da487a7be2b95394d5; >= b7c0ccdfbafdec98699ddb6f164beebf16f0bc45, < 63895d20d63b446f5049a963983489319c2ea3e2; Linux 6.13 Fixed in: Linux 63895d20d63b446f5049a963983489319c2ea3e2 Steps: 1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
FAQ
Is CVE-2025-21860 being exploited?
There is no confirmed exploitation: CVE-2025-21860 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.25% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2025-21860?
Low: CVSS 3.3 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2025-21860?
Linux >= b7c0ccdfbafdec98699ddb6f164beebf16f0bc45, < a3652f5552b20903315612da487a7be2b95394d5; >= b7c0ccdfbafdec98699ddb6f164beebf16f0bc45, < 63895d20d63b446f5049a963983489319c2ea3e2; Linux 6.13.
Is there a fix for CVE-2025-21860?
Yes. Fixed in Linux 63895d20d63b446f5049a963983489319c2ea3e2. Upgrade Linux to 63895d20d63b446f5049a963983489319c2ea3e2 or later.
How do I check if I'm affected by CVE-2025-21860?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.