{"api_version":"1","generated_at":"2026-11-08T09:42:01+00:00","cve":"CVE-2026-98226","urls":{"html":"https://cve.report/CVE-2026-98226","api":"https://cve.report/api/cve/CVE-2026-98226.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-98226","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-98226"},"summary":{"title":"mm, swap: fix SWAP_USAGE_OFFLIST_BIT collision with real usage count","description":"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 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.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-10-06 09:18:09","updated_at":"2026-10-19 10:18:23"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/0a41a46859df0d2bd7ed127197aac7c7389c00ed","name":"https://git.kernel.org/stable/c/0a41a46859df0d2bd7ed127197aac7c7389c00ed","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/7c0d0d6de46076b43a2acaf1026b6648f8434c39","name":"https://git.kernel.org/stable/c/7c0d0d6de46076b43a2acaf1026b6648f8434c39","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/12e9ac7bc5b254048f886bf421e3a15491106c1f","name":"https://git.kernel.org/stable/c/12e9ac7bc5b254048f886bf421e3a15491106c1f","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-98226","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-98226","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected b228386cf237e659cdf5d8037a19db0b0a06f6b5 0a41a46859df0d2bd7ed127197aac7c7389c00ed git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected b228386cf237e659cdf5d8037a19db0b0a06f6b5 7c0d0d6de46076b43a2acaf1026b6648f8434c39 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected b228386cf237e659cdf5d8037a19db0b0a06f6b5 12e9ac7bc5b254048f886bf421e3a15491106c1f git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.14","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.14 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.54 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.2.8 7.2.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":{"cve_year":"2026","cve_id":"98226","cve":"CVE-2026-98226","epss":"0.001730000","percentile":"0.061500000","score_date":"2026-10-06","updated_at":"2026-10-07 00:14:55"},"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["mm/swapfile.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"0a41a46859df0d2bd7ed127197aac7c7389c00ed","status":"affected","version":"b228386cf237e659cdf5d8037a19db0b0a06f6b5","versionType":"git"},{"lessThan":"7c0d0d6de46076b43a2acaf1026b6648f8434c39","status":"affected","version":"b228386cf237e659cdf5d8037a19db0b0a06f6b5","versionType":"git"},{"lessThan":"12e9ac7bc5b254048f886bf421e3a15491106c1f","status":"affected","version":"b228386cf237e659cdf5d8037a19db0b0a06f6b5","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["mm/swapfile.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"6.14"},{"lessThan":"6.14","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.54","versionType":"semver"},{"lessThanOrEqual":"7.2.*","status":"unaffected","version":"7.2.8","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.3","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.54","versionStartIncluding":"6.14","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.2.8","versionStartIncluding":"6.14","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3","versionStartIncluding":"6.14","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"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 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."}],"providerMetadata":{"dateUpdated":"2026-10-19T09:15:58.031Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/0a41a46859df0d2bd7ed127197aac7c7389c00ed"},{"url":"https://git.kernel.org/stable/c/7c0d0d6de46076b43a2acaf1026b6648f8434c39"},{"url":"https://git.kernel.org/stable/c/12e9ac7bc5b254048f886bf421e3a15491106c1f"}],"title":"mm, swap: fix SWAP_USAGE_OFFLIST_BIT collision with real usage count","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-98226","datePublished":"2026-10-06T08:45:01.370Z","dateReserved":"2026-09-25T10:25:14.328Z","dateUpdated":"2026-10-19T09:15:58.031Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-10-06 09:18:09","lastModifiedDate":"2026-10-19 10:18:23","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"98226","Ordinal":"1","Title":"mm, swap: fix SWAP_USAGE_OFFLIST_BIT collision with real usage c","CVE":"CVE-2026-98226","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"98226","Ordinal":"1","NoteData":"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 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.","Type":"Description","Title":"mm, swap: fix SWAP_USAGE_OFFLIST_BIT collision with real usage c"}]}}}