CVE-2026-90199: fs/ntfs3: reject out-of-range evcn in mi_enum_attr()
In the Linux kernel, the following vulnerability has been resolved:
fs/ntfs3: reject out-of-range evcn in mienumattr()
In mienumattr(), the start/end VCN validation for non-resident attributes is:
if (svcn > evcn + 1) goto out;
When evcn is U64MAX the "evcn + 1" expression wraps to 0 and any svcn passes the check. For evcn values close to U64MAX (but not equal to it) the right-hand side is still a meaningless near-wrap upper bound, so a malformed on-disk attribute with svcn == 0 and evcn near U64MAX can pass mienumattr() unrejected.
VCN (virtual cluster number) is a cluster index, so any valid evcn is bounded by the volume's total cluster count, which ntfs3 holds in sbi->used.bitmap.nbits (set up in ntfsinitfromboot() before any caller of mienumattr() runs). Reject evcn values that fall outside this range.
However, an empty non-resident attribute (no allocated clusters) is legitimately encoded with svcn == 0 and evcn == -1 (U64MAX), e.g. via attr->nres.evcn = cputole64((u64)vcn - 1) with vcn == 0. That sentinel must keep passing, so exclude evcn == U64MAX from the range check. The existing "svcn > evcn + 1" test still tolerates the sentinel ("0 > 0" is false) and continues to require svcn == 0 for it, while the range check rejects every other out-of-range evcn and thereby also defuses the "evcn + 1" wraparound.
svcn does not need its own bound: once evcn < nbits, "svcn > evcn + 1" implies svcn <= nbits.
[almaz.alexandrovich@paragon-software.com: fixed evcn check]
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.12.115-2Fixed in 7.2.12-1Fixed in 7.2.15-1 - Upgrade
Upgrade
debian/linux-6.12to a version that resolves this vulnerability.Fixed in 6.12.113-1~deb12u1 - Upgrade
Upgrade
ubuntu/linux-hwe-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42~24.04.1 - Upgrade
Upgrade
ubuntu/linux-riscv-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1~24.04.1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 7.0.0-42.42 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 7.0.0-1016.17 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 7.0.0-1016.18 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oem-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 7.0.0-1015.16 - Upgrade
Upgrade
ubuntu/linux-riscvto a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1 - Compensating control
In ntfs3 mi_enum_attr(), reject non-resident attributes whose evcn is outside the volume's valid cluster range (evcn < sbi->used.bitmap.nbits), while exempting evcn == U64_MAX as the legitimate empty-attribute sentinel and retaining the svcn > evcn + 1 validation.
Event History
Frequently Asked Questions
What inputs are required to reach the vulnerable validation path?
The issue is triggered by a malformed on-disk NTFS non-resident attribute whose ending virtual cluster number (evcn) is near U64_MAX and whose starting VCN (svcn) can pass the wrapped or near-wrap validation check.
Are all U64_MAX ending VCN values invalid?
No. An empty non-resident attribute legitimately uses svcn == 0 and evcn == U64_MAX as a sentinel for no allocated clusters. The corrected validation must continue to allow that encoding while rejecting other out-of-range evcn values.
What distinguishes an invalid ending VCN from a valid one?
A valid evcn is bounded by the NTFS volume's total cluster count, held in sbi->used.bitmap.nbits. Values outside that range should be rejected, except for the U64_MAX empty-attribute sentinel.