CVE-2026-98139: ntfs: only count successfully cleared runs when freeing clusters
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
ntfs: only count successfully cleared runs when freeing clusters
ntfs_cluster_free_from_rl_nolock() adds a run's length to nr_freed whenever the error bookkeeping condition is false, which includes cases where ntfs_bitmap_clear_run() actually failed - e.g. a second run failing with the same errno as an earlier one, or any failure after a non-ENOMEM error was already recorded. Since a failed ntfs_bitmap_clear_run() rolls back its partial modifications, no bits were cleared for that run, yet its length still inflates vol->free_clusters, corrupting statfs output and the allocator's free space gate.
Only count runs whose bitmap clear succeeded.
The Linux kernel CVE team has assigned CVE-2026-98139 to this issue.
Affected and fixed versions
===========================
Issue introduced in 7.1 with commit 11ccc9107dc460de28af90fac1f42404d9802735 and fixed in 7.2.7 with commit 7eb97d8828e7758b9c81277f7802e740a800f78a Issue introduced in 7.1 with commit 11ccc9107dc460de28af90fac1f42404d9802735 and fixed in 7.3-rc2 with commit be9e89ccb8e52a3e4b67feeb03ebd8133091dc7e
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-98139
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
fs/ntfs/lcnalloc.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/7eb97d8828e7758b9c81277f7802e740a800f78a https://git.kernel.org/stable/c/be9e89ccb8e52a3e4b67feeb03ebd8133091dc7e