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

mm, swap: fix SWAP_USAGE_OFFLIST_BIT collision with real usage count

SWAP_USAGE_OFFLIST_BIT is embedded in the si->inuse_pages usage counter,
and is meant to sit above any value that counter can reach. However, it
is defined from BITS_PER_TYPE(atomic_t), so it is bit 30. On a system
with 4 KiB pages the flag collides with the usage count once that count
reaches 4 TiB.

swap_usage_in_pages() masks bit 30 out, so whenever the real count has
that bit set, every caller of it reads 4 TiB low:

* /proc/swaps understates Used by 4 TiB.

* A raw count of exactly 2^30 masks to zero, so try_to_unuse() takes its
"if (!swap_usage_in_pages(si)) goto success;" early exit and swapoff
tears the device down while pages are still swapped out. Nothing in
the rest of swapoff aborts the teardown, so those pages are lost.

Independently of swapoff, the collision also corrupts the counter and the
plist. On a device in normal use, a free that leaves bit 30 set in the
count makes swap_usage_sub() see the flag where there is only count, and
call add_to_avail_list(). It clears the bit with
fetch_and(~SWAP_USAGE_OFFLIST_BIT), leaving the stored count 4 TiB below
the real one, and calls plist_add() on a device that is already listed,
tripping the WARN_ON(!plist_node_empty(node)) in plist_add() and linking
the node a second time.

Change the definition of SWAP_USAGE_OFFLIST_BIT to be based on
atomic_long_t instead. Note that the usage counter field itself is of
this same type, so it is still a valid bit.
Published: 2026-10-06
Score: 7.0 High
EPSS: < 1% Very Low
KEV: No
Impact: Denial of Service and Data Loss via Swap Teardown
Action: Apply Patch
AI Analysis

Impact

The Linux kernel’s swap subsystem uses a dedicated bit, SWAP_USAGE_OFFLIST_BIT, inside the swap usage counter. The bit was defined as bit 30 of an atomic_t type, which is valid for a counter only up to 4 TiB for 4 KiB pages. When the usage counter reaches 4 TiB, SWAP_USAGE_OFFLIST_BIT collides with the real counter value. This collision causes /proc/swaps to report 4 TiB fewer pages in use, and when the bit is set the kernel’s try_to_unuse() routine incorrectly concludes that the swap device can be torn down. The device is then deactivated while pages are still swapped out, leading to permanent loss of those pages. In addition, the collision corrupts the hardware‑free path and the plist of swap devices, generating WARN_ON conditions and inconsistent list entries. The result is data loss, potential crashes, and underrepresentation of swap usage in monitoring tools.

Affected Systems

Affected by this kernel bug in any Linux kernel that contains the original SWAP_USAGE_OFFLIST_BIT definition. The flaw is present before the patch referenced in the provided kernel commit links and applies to all Linux distributions that ship the unpatched code.

Risk and Exploitability

The CVE description does not disclose which access level is required for exploitation. The vulnerability could be triggered by any process executing swapoff when the counter has a high value, which could lead to pages being lost. The likelihood of exploitation appears low, with an EPSS score of less than 1% and no listing in the CISA KEV catalog. No public exploits are currently known.

Generated by OpenCVE AI on October 10, 2026 at 03:26 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the kernel patch that changes SWAP_USAGE_OFFLIST_BIT to be based on atomic_long_t; the patch is available in the commit logs linked in the references.
  • If a kernel update is not immediately possible, avoid executing swapoff while the system is using near‑maximum swap; place a monitoring loop or a systemd service that blocks swapoff until usage drops below a safe threshold.
  • Continuously monitor /proc/swaps for sudden resets in the used value; log any such events so that a mis‑behaving swapoff can be investigated early.

Generated by OpenCVE AI on October 10, 2026 at 03:26 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sat, 10 Oct 2026 02:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-665

Sat, 10 Oct 2026 00:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-190
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.0, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H'}

threat_severity

Moderate


Wed, 07 Oct 2026 05:00:00 +0000

Type Values Removed Values Added
Weaknesses CWE-665

Tue, 06 Oct 2026 21:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-189

Tue, 06 Oct 2026 15:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-189

Tue, 06 Oct 2026 09:00:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: mm, swap: fix SWAP_USAGE_OFFLIST_BIT collision with real usage count SWAP_USAGE_OFFLIST_BIT is embedded in the si->inuse_pages usage counter, and is meant to sit above any value that counter can reach. However, it is defined from BITS_PER_TYPE(atomic_t), so it is bit 30. On a system with 4 KiB pages the flag collides with the usage count once that count reaches 4 TiB. swap_usage_in_pages() masks bit 30 out, so whenever the real count has that bit set, every caller of it reads 4 TiB low: * /proc/swaps understates Used by 4 TiB. * A raw count of exactly 2^30 masks to zero, so try_to_unuse() takes its "if (!swap_usage_in_pages(si)) goto success;" early exit and swapoff tears the device down while pages are still swapped out. Nothing in the rest of swapoff aborts the teardown, so those pages are lost. Independently of swapoff, the collision also corrupts the counter and the plist. On a device in normal use, a free that leaves bit 30 set in the count makes swap_usage_sub() see the flag where there is only count, and call add_to_avail_list(). It clears the bit with fetch_and(~SWAP_USAGE_OFFLIST_BIT), leaving the stored count 4 TiB below the real one, and calls plist_add() on a device that is already listed, tripping the WARN_ON(!plist_node_empty(node)) in plist_add() and linking the node a second time. Change the definition of SWAP_USAGE_OFFLIST_BIT to be based on atomic_long_t instead. Note that the usage counter field itself is of this same type, so it is still a valid bit.
Title mm, swap: fix SWAP_USAGE_OFFLIST_BIT collision with real usage count
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-10-19T09:15:58.031Z

Reserved: 2026-09-25T10:25:14.328Z

Link: CVE-2026-98226

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-06T09:18:09.820

Modified: 2026-10-19T10:18:23.330

Link: CVE-2026-98226

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-10-06T00:00:00Z

Links: CVE-2026-98226 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-10-10T03:30:16Z

Weaknesses
  • CWE-190

    Integer Overflow or Wraparound