CVE-2025-21860 | mm/zswap: fix inconsistency when zswap_store_page() fails

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. [[email protected]: refactor zswap_store_page()]

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

Conclusion & alert: CVE-2025-21860 is rated Low Risk (17.4/100): CVSS Low severity, with low exploitation likelihood (EPSS 0.04%). Mandatory action: Low composite risk—no urgent action required; patch on your normal maintenance cycle and revisit priority if CVSS or EPSS increases.

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-21860

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 2025-03-13 0.04%

Full EPSS history (1 record total)

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

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
3.3 3.1 LOW
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L 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:L)
Might cause slowdowns, glitches, or partial disruption—not a full brick.
1.8 1.4 [email protected]

Weakness enumeration for CVE-2025-21860

OS Trackers for CVE-2025-21860

vendor priority summary link
debian unimportant CVE-2025-21860 unimportant priority: Debian including 1 source packages (linux), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 5. https://security-tracker.debian.org/tracker/CVE-2025-21860
redhat low https://access.redhat.com/security/cve/CVE-2025-21860
suse medium CVE-2025-21860 severity moderate: SUSE including 26 source package names (cluster-md-kmp-default, dlm-kmp-default, …), 194 product×package rows across 38 product lines (SLES-LTSS-TERADATA 15 SP2, SUSE Linux Enterprise High Performance Computing 15 SP3-LTSS, … (38 product lines)): Known Not Affected 194. https://www.suse.com/security/cve/CVE-2025-21860/
ubuntu medium CVE-2025-21860 medium priority: Ubuntu including 128 source packages (linux, linux-allwinner-5.19, …), 1024 status rows across 8 suites (bionic, focal, jammy, noble, oracular, trusty, upstream, xenial): DNE 702, ignored 146, not-affected 115, released 61. https://ubuntu.com/security/CVE-2025-21860

Affected software / configurations for CVE-2025-21860

Vendor Product Version Raw CPE
linux linux_kernel >= 6.13, < 6.13.5 cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
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:*:*:*:*:*:*

References for CVE-2025-21860

cvelogic Threat Intelligence