CVE-2026-100008: ntfs: sync the volume dirty bit with the recorded error state
In the Linux kernel, the following vulnerability has been resolved:
ntfs: sync the volume dirty bit with the recorded error state
The runtime metadata-corruption paths in fs/ntfs only record the in-memory NVolErrors() flag; whether VOLUMEISDIRTY ever reaches disk depends on ntfssetvolumeflags() being called by some other path, which for most error sites never happens. A volume can therefore unmount with a clean on-disk flag despite recorded corruption, and chkdsk will not run on the next mount.
Persisting the dirty bit from the error paths themselves does not work: they run under a wide variety of ntfs locks, and the dirty-bit write takes the $Volume mreclock and maps the $Volume mft record, which on an $MFT page-cache miss takes the $MFT runlist lock for writing. That is enough to self-deadlock or form ABBA cycles from several of them: the $MFT extend undo paths hold the $MFT runlist lock and then take vol->lcnbmplock inside ntfsclusterfree(); the cluster allocation and free rollback paths hold vol->lcnbmplock; and the whole mft record allocation tree is reachable from ntfswritevolumelabel()'s attribute-list maintenance while it holds the $Volume mreclock itself.
Instead, make the persistence a property of the sync paths, which run without ntfs locks held. The new ntfssyncvolumedirtystate() sets VOLUMEISDIRTY when NVolErrors() is recorded and clears it otherwise, evaluating the error flag under the $Volume mreclock. It is called from ntfssyncfs(), from the remount-to-read-only path of ntfsreconfigure(), and from ntfsputsuper(), which previously evaluated NVolErrors() outside the lock before clearing the dirty bit unconditionally, and which now also persists the dirty bit for volumes with recorded errors so they unmount with chkdsk scheduled. The ntfsclearvolumeflags() wrapper, whose last callers this patch replaces, has no users left and is removed.
The guarantee this provides is eventual, not instantaneous: the error paths record NVolErrors() with a lock-free setbit(), so a persistence point that evaluates the flag just before an error is recorded can still leave the on-disk bit clean until the next one. This is sound because NVolErrors() is sticky for the lifetime of the mount and every persistence point re-derives the on-disk bit from it; the last one, ntfsputsuper(), runs after evictinodes() on a quiesced filesystem, so a volume that is read-write at unmount time cannot unmount clean. A volume that is already read-only when the error is recorded (errors=remount-ro flips the superblock on the first error, as does an earlier remount-ro) has no persistence point left and keeps whatever on-disk bit it had; that behaviour is unchanged. The residual window is a crash between the error and the next persistence point.
The persistence paths never write a hibernated volume: resuming Windows from a modified image corrupts it. Record the mount-time hibernation verdict in the new NVHibernated volume flag and make ntfssyncvolumedirtystate() a no-op while it is set, so the dirty bit is left exactly as it is on disk and only the in-memory error state is kept. Without this, an rw mount of a hibernated volume with the default errors=continue would gain a filesystem-internal write on the first sync, remount or unmount. Other writes to such a mount, like the mount-time logfile emptying, are pre-existing and unchanged.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.4 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.4-1
Event History
Frequently Asked Questions
Which systems are affected by this condition?
Linux systems using the fs/ntfs driver are affected when runtime metadata-corruption paths record an in-memory volume error. The issue concerns NTFS volumes whose on-disk dirty flag is not synchronized with that recorded error state.
What is the operational impact after an error is recorded?
The volume can unmount with a clean on-disk flag even though corruption was recorded in memory. As a result, chkdsk will not run automatically on the next mount.
Why can the dirty flag not simply be written from every error path?
Those paths can execute while various NTFS locks are held. Writing the dirty bit requires additional locks and mapping the $Volume MFT record, creating risks of self-deadlock or ABBA lock cycles.