{"id":"CVE-2026-100008","aliases":["CVE-2026-100008"],"related":[],"kind":"vulnerability","state":"published","title":"ntfs: sync the volume dirty bit with the recorded error state","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nntfs: sync the volume dirty bit with the recorded error state\n\nThe runtime metadata-corruption paths in fs/ntfs only record the\nin-memory NVolErrors() flag; whether VOLUME_IS_DIRTY ever reaches disk\ndepends on ntfs_set_volume_flags() being called by some other path,\nwhich for most error sites never happens.  A volume can therefore\nunmount with a clean on-disk flag despite recorded corruption, and\nchkdsk will not run on the next mount.\n\nPersisting the dirty bit from the error paths themselves does not work:\nthey run under a wide variety of ntfs locks, and the dirty-bit write\ntakes the $Volume mrec_lock and maps the $Volume mft record, which on\nan $MFT page-cache miss takes the $MFT runlist lock for writing.  That\nis enough to self-deadlock or form ABBA cycles from several of them:\nthe $MFT extend undo paths hold the $MFT runlist lock and then take\nvol->lcnbmp_lock inside ntfs_cluster_free(); the cluster allocation and\nfree rollback paths hold vol->lcnbmp_lock; and the whole mft record\nallocation tree is reachable from ntfs_write_volume_label()'s\nattribute-list maintenance while it holds the $Volume mrec_lock itself.\n\nInstead, make the persistence a property of the sync paths, which run\nwithout ntfs locks held.  The new ntfs_sync_volume_dirty_state() sets\nVOLUME_IS_DIRTY when NVolErrors() is recorded and clears it otherwise,\nevaluating the error flag under the $Volume mrec_lock.  It is called\nfrom ntfs_sync_fs(), from the remount-to-read-only path of\nntfs_reconfigure(), and from ntfs_put_super(), which previously\nevaluated NVolErrors() outside the lock before clearing the dirty bit\nunconditionally, and which now also persists the dirty bit for volumes\nwith recorded errors so they unmount with chkdsk scheduled.  The\nntfs_clear_volume_flags() wrapper, whose last callers this patch\nreplaces, has no users left and is removed.\n\nThe guarantee this provides is eventual, not instantaneous: the error\npaths record NVolErrors() with a lock-free set_bit(), so a persistence\npoint that evaluates the flag just before an error is recorded can\nstill leave the on-disk bit clean until the next one.  This is sound\nbecause NVolErrors() is sticky for the lifetime of the mount and every\npersistence point re-derives the on-disk bit from it; the last one,\nntfs_put_super(), runs after evict_inodes() on a quiesced filesystem,\nso a volume that is read-write at unmount time cannot unmount clean.\nA volume that is already read-only when the error is recorded\n(errors=remount-ro flips the superblock on the first error, as does an\nearlier remount-ro) has no persistence point left and keeps whatever\non-disk bit it had; that behaviour is unchanged.  The residual window\nis a crash between the error and the next persistence point.\n\nThe persistence paths never write a hibernated volume: resuming Windows\nfrom a modified image corrupts it.  Record the mount-time hibernation\nverdict in the new NV_Hibernated volume flag and make\nntfs_sync_volume_dirty_state() a no-op while it is set, so the dirty\nbit is left exactly as it is on disk and only the in-memory error\nstate is kept.  Without this, an rw mount of a hibernated volume with\nthe default errors=continue would gain a filesystem-internal write on\nthe first sync, remount or unmount.  Other writes to such a mount,\nlike the mount-time logfile emptying, are pre-existing and unchanged.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nntfs: sync the volume dirty bit with the recorded error state\n\nThe runtime metadata-corruption paths in fs/ntfs only record the\nin-memory NVolErrors() flag; whether VOLUME_IS_DIRTY ever reaches disk\ndepends on ntfs_set_volume_flags() being called by some other path,\nwhich for most error sites never happens.  A volume can therefore\nunmount with a clean on-disk flag despite recorded corruption, and\nchkdsk will not run on the next mount.\n\nPersisting the dirty bit from the error paths themselves does not work:\nthey run under a wide variety of ntfs locks, and the dirty-bit write\ntakes the $Volume mrec_lock and maps the $Volume mft record, which on\nan $MFT page-cache miss takes the $MFT runlist lock for writing.  That\nis enough to self-deadlock or form ABBA cycles from several of them:\nthe $MFT extend undo paths hold the $MFT runlist lock and then take\nvol->lcnbmp_lock inside ntfs_cluster_free(); the cluster allocation and\nfree rollback paths hold vol->lcnbmp_lock; and the whole mft record\nallocation tree is reachable from ntfs_write_volume_label()'s\nattribute-list maintenance while it holds the $Volume mrec_lock itself.\n\nInstead, make the persistence a property of the sync paths, which run\nwithout ntfs locks held.  The new ntfs_sync_volume_dirty_state() sets\nVOLUME_IS_DIRTY when NVolErrors() is recorded and clears it otherwise,\nevaluating the error flag under the $Volume mrec_lock.  It is called\nfrom ntfs_sync_fs(), from the remount-to-read-only path of\nntfs_reconfigure(), and from ntfs_put_super(), which previously\nevaluated NVolErrors() outside the lock before clearing the dirty bit\nunconditionally, and which now also persists the dirty bit for volumes\nwith recorded errors so they unmount with chkdsk scheduled.  The\nntfs_clear_volume_flags() wrapper, whose last callers this patch\nreplaces, has no users left and is removed.\n\nThe guarantee this provides is eventual, not instantaneous: the error\npaths record NVolErrors() with a lock-free set_bit(), so a persistence\npoint that evaluates the flag just before an error is recorded can\nstill leave the on-disk bit clean until the next one.  This is sound\nbecause NVolErrors() is sticky for the lifetime of the mount and every\npersistence point re-derives the on-disk bit from it; the last one,\nntfs_put_super(), runs after evict_inodes() on a quiesced filesystem,\nso a volume that is read-write at unmount time cannot unmount clean.\nA volume that is already read-only when the error is recorded\n(errors=remount-ro flips the superblock on the first error, as does an\nearlier remount-ro) has no persistence point left and keeps whatever\non-disk bit it had; that behaviour is unchanged.  The residual window\nis a crash between the error and the next persistence point.\n\nThe persistence paths never write a hibernated volume: resuming Windows\nfrom a modified image corrupts it.  Record the mount-time hibernation\nverdict in the new NV_Hibernated volume flag and make\nntfs_sync_volume_dirty_state() a no-op while it is set, so the dirty\nbit is left exactly as it is on disk and only the in-memory error\nstate is kept.  Without this, an rw mount of a hibernated volume with\nthe default errors=continue would gain a filesystem-internal write on\nthe first sync, remount or unmount.  Other writes to such a mount,\nlike the mount-time logfile emptying, are pre-existing and unchanged.","source":"cvelist"}],"published":"2026-11-30T13:23:02.022Z","modified":"2026-11-30T14:17:14.677Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"2254d06b1795e0ca1ed977bd604d5c5e633937d9","status":"affected"},{"type":"git","introduced":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","fixed":"521978c4f4441953d67297286e5804485ae05698","status":"affected"},{"type":"semver","introduced":"0","fixed":"7.3.4","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"7.3.4","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/2254d06b1795e0ca1ed977bd604d5c5e633937d9","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/521978c4f4441953d67297286e5804485ae05698","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-100008","url":"https://www.cve.org/CVERecord?id=CVE-2026-100008","licence":"CVE Terms of Use","modified":"2026-11-30T13:23:02.022Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-100008","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-100008","licence":"Public domain","modified":"2026-11-30T14:17:14.677Z"}],"updatedAt":"2026-11-30T14:32:19.351Z","epss":{"score":0.00198,"percentile":0.1011,"date":"2026-12-01T12:00:22.000Z"}}