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


