CVE-2026-98226: mm, swap: fix SWAP_USAGE_OFFLIST_BIT collision with real usage count

Published Oct 6, 2026
·
Updated

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

mm, swap: fix SWAPUSAGEOFFLISTBIT collision with real usage count

SWAPUSAGEOFFLISTBIT is embedded in the si->inusepages usage counter, and is meant to sit above any value that counter can reach. However, it is defined from BITSPERTYPE(atomict), 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.

swapusageinpages() 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 trytounuse() takes its "if (!swapusageinpages(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 swapusagesub() see the flag where there is only count, and call addtoavaillist(). It clears the bit with fetchand(~SWAPUSAGEOFFLISTBIT), leaving the stored count 4 TiB below the real one, and calls plistadd() on a device that is already listed, tripping the WARNON(!plistnodeempty(node)) in plistadd() and linking the node a second time.

Change the definition of SWAPUSAGEOFFLISTBIT to be based on atomiclongt instead. Note that the usage counter field itself is of this same type, so it is still a valid bit.

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    Change the definition of SWAP_USAGE_OFFLIST_BIT to be based on BITS_PER_TYPE(atomic_long_t) instead of BITS_PER_TYPE(atomic_t), keeping the flag above the si->inuse_pages usage counter.

    Linux kernel swap management SWAP_USAGE_OFFLIST_BIT = BITS_PER_TYPE(atomic_long_t)

Event History

Oct 6, 2026
CVE Published
via MITRE·08:45 AM
Data Sourced
via MITRE·08:45 AM
Description
Data Sourced
via NVD·09:18 AM
Description

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203