{"id":33295,"date":"2026-10-06T20:31:42","date_gmt":"2026-10-06T12:31:42","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-98226"},"modified":"2026-10-06T20:31:42","modified_gmt":"2026-10-06T12:31:42","slug":"cve-2026-98226","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-98226","title":{"rendered":"CVE-2026-98226 &#8211; In the Linux kernel, the following vulnerability has been resolved:\n\nmm, swap: fix SWAP_US"},"content":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>mm, swap: fix SWAP_USAGE_OFFLIST_BIT collision with real usage count<\/p>\n<p>SWAP_USAGE_OFFLIST_BIT is embedded in the si-&gt;inuse_pages usage counter,<br \/>\nand is meant to sit above any value that counter can reach.  However, it<br \/>\nis defined from BITS_PER_TYPE(atomic_t), so it is bit 30.  On a system<br \/>\nwith 4 KiB pages the flag collides with the usage count once that count<br \/>\nreaches 4 TiB.<\/p>\n<p>swap_usage_in_pages() masks bit 30 out, so whenever the real count has<br \/>\nthat bit set, every caller of it reads 4 TiB low:<\/p>\n<p>* \/proc\/swaps understates Used by 4 TiB.<\/p>\n<p>* A raw count of exactly 2^30 masks to zero, so try_to_unuse() takes its<br \/>\n  &#8220;if (!swap_usage_in_pages(si)) goto success;&#8221; early exit and swapoff<br \/>\n  tears the device down while pages are still swapped out. Nothing in<br \/>\n  the rest of swapoff aborts the teardown, so those pages are lost.<\/p>\n<p>Independently of swapoff, the collision also corrupts the counter and the<br \/>\nplist.  On a device in normal use, a free that leaves bit 30 set in the<br \/>\ncount makes swap_usage_sub() see the flag where there is only count, and<br \/>\ncall add_to_avail_list().  It clears the bit with<br \/>\nfetch_and(~SWAP_USAGE_OFFLIST_BIT), leaving the stored count 4 TiB below<br \/>\nthe real one, and calls plist_add() on a device that is already listed,<br \/>\ntripping the WARN_ON(!plist_node_empty(node)) in plist_add() and linking<br \/>\nthe node a second time.<\/p>\n<p>Change the definition of SWAP_USAGE_OFFLIST_BIT to be based on<br \/>\natomic_long_t instead.  Note that the usage counter field itself is of<br \/>\nthis same type, so it is still a valid bit.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>mm, swap: fix SWAP_USAGE_OFFLIST_BIT collision with real usage count<\/p>\n<p>SWAP_USAGE_OFFLIST_BIT is embedded in the si-&gt;inuse_pages usa<\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-33295","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/33295","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln"}],"about":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/types\/vuln"}],"wp:attachment":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=33295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=33295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=33295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}