{"id":"CVE-2026-99994","aliases":["CVE-2026-99994"],"related":[],"kind":"vulnerability","state":"published","title":"ntfs: balance the $MFT runlist lock in data extension error paths","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nntfs: balance the $MFT runlist lock in data extension error paths\n\nntfs_mft_data_extend_allocation_nolock() drops the $MFT runlist lock\nbefore allocating clusters, and every path into undo_alloc arrives\nwithout it, except a map_mft_record() failure, which takes it first.\nundo_alloc never releases it, so the lock leaks and the next $MFT\nextension and $MFT writeback hang.  The restore_undo_alloc failure\npath, on the other hand, releases the lock without holding it.  And\nundo_alloc frees the clusters with ntfs_cluster_free() and truncates\nthe runlist without the lock, although both require it.\n\nEnter undo_alloc without the lock on every path.  Merge the new clusters\nwith ntfs_runlists_merge_keep_src() and keep the runlist that\nntfs_cluster_alloc() returned until the extension is complete.  On\nfailure, undo_alloc truncates $MFT's runlist under the lock and, after\ndropping it, frees the clusters from the kept runlist with\nntfs_cluster_free_from_rl().  That keeps lcnbmp_lock outside the runlist\nlock, the order given by the comment before the cluster allocation.\nUnlike ntfs_cluster_free() on a volume mounted with -o discard, this\ndoes not issue discards for the clusters, which were never written; the\nrunlist merge failure path already frees them the same way.  If the\ntruncation fails, the runlist may still reference the clusters, so they\nstay allocated and the volume is marked for chkdsk; at this call site\nthe truncation only shrinks the runlist and cannot fail today.\n\nA shorter fix would keep calling ntfs_cluster_free() on the live\nrunlist without the lock, relying on $MFT's runlist being fully mapped\nand changed only by this function under mrec_lock.  That breaks\nntfs_cluster_free()'s documented locking rule on an argument about the\nrest of the driver, so this patch does not do that.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nntfs: balance the $MFT runlist lock in data extension error paths\n\nntfs_mft_data_extend_allocation_nolock() drops the $MFT runlist lock\nbefore allocating clusters, and every path into undo_alloc arrives\nwithout it, except a map_mft_record() failure, which takes it first.\nundo_alloc never releases it, so the lock leaks and the next $MFT\nextension and $MFT writeback hang.  The restore_undo_alloc failure\npath, on the other hand, releases the lock without holding it.  And\nundo_alloc frees the clusters with ntfs_cluster_free() and truncates\nthe runlist without the lock, although both require it.\n\nEnter undo_alloc without the lock on every path.  Merge the new clusters\nwith ntfs_runlists_merge_keep_src() and keep the runlist that\nntfs_cluster_alloc() returned until the extension is complete.  On\nfailure, undo_alloc truncates $MFT's runlist under the lock and, after\ndropping it, frees the clusters from the kept runlist with\nntfs_cluster_free_from_rl().  That keeps lcnbmp_lock outside the runlist\nlock, the order given by the comment before the cluster allocation.\nUnlike ntfs_cluster_free() on a volume mounted with -o discard, this\ndoes not issue discards for the clusters, which were never written; the\nrunlist merge failure path already frees them the same way.  If the\ntruncation fails, the runlist may still reference the clusters, so they\nstay allocated and the volume is marked for chkdsk; at this call site\nthe truncation only shrinks the runlist and cannot fail today.\n\nA shorter fix would keep calling ntfs_cluster_free() on the live\nrunlist without the lock, relying on $MFT's runlist being fully mapped\nand changed only by this function under mrec_lock.  That breaks\nntfs_cluster_free()'s documented locking rule on an argument about the\nrest of the driver, so this patch does not do that.","source":"cvelist"}],"published":"2026-11-30T13:18:58.380Z","modified":"2026-11-30T14:20:42.687Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"115380f9a2f9675c7924563cbba70d40cae8fb81","fixed":"68879bf28ba6e48d9c07edac49ad62e1f820b5a6","status":"affected"},{"type":"git","introduced":"115380f9a2f9675c7924563cbba70d40cae8fb81","fixed":"69ba74e8a5dfc6fd7ba3588e81d53e965566f3a4","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"7.1","status":"affected"},{"type":"semver","introduced":"0","fixed":"7.1","status":"unaffected"},{"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/68879bf28ba6e48d9c07edac49ad62e1f820b5a6","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/69ba74e8a5dfc6fd7ba3588e81d53e965566f3a4","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-99994","url":"https://www.cve.org/CVERecord?id=CVE-2026-99994","licence":"CVE Terms of Use","modified":"2026-11-30T13:18:58.380Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-99994","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99994","licence":"Public domain","modified":"2026-11-30T14:20:42.687Z"}],"updatedAt":"2026-11-30T14:33:45.702Z","epss":{"score":0.00267,"percentile":0.20076,"date":"2026-12-01T12:00:22.000Z"}}