LiveActive security incident?Get immediate response
CVE Record

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. [42.hyeyoo@gmail.com: refactor zswap_store_page()]

UnknownCVSS not scoredNot KEV-listedUpdated
Glexia's TakeAutomated analysisunknown

Security readout for executives and security teams

Plain-English summary

This Linux kernel issue can corrupt zswap accounting after a failed compressed-swap operation. The public record describes warning conditions and inconsistent counters, not data theft or remote compromise. Business risk appears tied to system reliability on kernels using the affected zswap code, but severity is not scored in the supplied sources.

Executive priority

Treat as a reliability-focused kernel maintenance item. Prioritize patching for high-memory, high-availability Linux systems using zswap, but do not classify as emergency without vendor severity or exploitation evidence.

Technical view

The bug is in mm/zswap after large-folio support. If some base pages are zswapped and the full folio operation later fails, rollback frees entries that were never charged, causing memcg/page-counter underflow warnings and inconsistent zswap_stored_pages. The fix charges entries and increments counters when zswap_store_page() succeeds.

Likely exposure

Exposure is most likely on Linux systems running affected 6.13-era kernels with zswap enabled, especially memory-pressure workloads. Downstream distribution impact cannot be confirmed from the bundle alone.

Exploitation context

The sources do not indicate active exploitation, and KEV is false. The described reproduction uses memory pressure to trigger warnings and inconsistent accounting; no public source here supports remote exploitation or weaponized use.

Researcher notes

Evidence is limited to the CVE description and kernel stable commits. No CVSS, CWE, exploit status, or downstream package matrix is provided. Validate affected ranges through the exact kernel tree or distribution backport metadata.

Mitigation direction

  • Check your Linux distributor's advisory for CVE-2025-21860 coverage.
  • Update to a kernel containing the referenced stable fixes.
  • Prioritize systems using zswap or exposed to heavy memory pressure.
  • Monitor kernel logs for zswap, memcontrol, or page_counter warnings.

Validation and detection

  • Inventory kernel versions against vendor CVE advisories.
  • Confirm whether zswap is enabled on production Linux hosts.
  • Review kernel logs for obj_cgroup_release or page_counter underflow warnings.
  • Verify the relevant stable patch is included in deployed kernels.
Prepared
Confidence
medium
Sources
4

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cve · low confidence lookup

CVE-2025-21860 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Unknown
CVSS
Not scored
Known Exploited
No
Published
Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

0CVSS vectors
3Timeline events
0ADP providers
3Source links

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. CVE publishedCVE Program

    The CVE record was published.

  3. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
LinuxLinuxb7c0ccdfbafdec98699ddb6f164beebf16f0bc45, b7c0ccdfbafdec98699ddb6f164beebf16f0bc45unaffected
LinuxLinux6.13, 0, 6.13.5, 6.14affected
Weakness

CWE details

No CWE listed

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.