{"id":"CVE-2026-98226","title":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm, swap: fix SWAP_USAGE_OFFLIST_BIT collision with real usage count\n\nSWAP_USAGE_OFFLIST_BIT is embedded in the si->inuse_pages usage counter,\nand is meant to sit above…","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm, swap: fix SWAP_USAGE_OFFLIST_BIT collision with real usage count\n\nSWAP_USAGE_OFFLIST_BIT is embedded in the si->inuse_pages usage counter,\nand is meant to sit above…","severity":"none","vendor":"Linux","product":"Linux","affected":["Linux >= b228386cf237e659cdf5d8037a19db0b0a06f6b5 < 0a41a46859df0d2bd7ed127197aac7c7389c00ed","Linux >= b228386cf237e659cdf5d8037a19db0b0a06f6b5 < 7c0d0d6de46076b43a2acaf1026b6648f8434c39","Linux >= b228386cf237e659cdf5d8037a19db0b0a06f6b5 < 12e9ac7bc5b254048f886bf421e3a15491106c1f","Linux 6.14"],"published":"2026-10-06","updated":"2026-10-06","sourceUpdated":"2026-10-06T09:18:09.820","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-98226","references":[{"url":"https://git.kernel.org/stable/c/0a41a46859df0d2bd7ed127197aac7c7389c00ed","label":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/12e9ac7bc5b254048f886bf421e3a15491106c1f","label":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/7c0d0d6de46076b43a2acaf1026b6648f8434c39","label":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"}],"tags":["nvd","cve.org"],"ingestedAt":"2026-10-06T08:50:17.438Z","slug":"CVE-2026-98226","body":"## Overview\n\nIn the Linux kernel, the following vulnerability has been resolved:\n\nmm, swap: fix SWAP_USAGE_OFFLIST_BIT collision with real usage count\n\nSWAP_USAGE_OFFLIST_BIT is embedded in the si->inuse_pages usage counter,\nand is meant to sit above any value that counter can reach.  However, it\nis defined from BITS_PER_TYPE(atomic_t), so it is bit 30.  On a system\nwith 4 KiB pages the flag collides with the usage count once that count\nreaches 4 TiB.\n\nswap_usage_in_pages() masks bit 30 out, so whenever the real count has\nthat bit set, every caller of it reads 4 TiB low:\n\n* /proc/swaps understates Used by 4 TiB.\n\n* A raw count of exactly 2^30 masks to zero, so try_to_unuse() takes its\n  \"if (!swap_usage_in_pages(si)) goto success;\" early exit and swapoff\n  tears the device down while pages are still swapped out. Nothing in\n  the rest of swapoff aborts the teardown, so those pages are lost.\n\nIndependently of swapoff, the collision also corrupts the counter and the\nplist.  On a device in normal use, a free that leaves bit 30 set in the\ncount makes swap_usage_sub() see the flag where there is only count, and\ncall add_to_avail_list().  It clears the bit with\nfetch_and(~SWAP_USAGE_OFFLIST_BIT), leaving the stored count 4 TiB below\nthe real one, and calls plist_add() on a device that is already listed,\ntripping the WARN_ON(!plist_node_empty(node)) in plist_add() and linking\nthe node a second time.\n\nChange the definition of SWAP_USAGE_OFFLIST_BIT to be based on\natomic_long_t instead.  Note that the usage counter field itself is of\nthis same type, so it is still a valid bit.\n\n## Remediation\n\nRefer to the linked advisories for vendor-supplied fixes and affected version ranges.","depth":"sunlit","depthScore":3,"depthScoreParts":{"impact":2.8,"likelihood":0,"exploitation":0,"ransomware":0},"changes":[]}