{"id":"CVE-2026-99997","aliases":["CVE-2026-99997"],"related":[],"kind":"vulnerability","state":"published","title":"ntfs: do not map a vcn as a hole when its runlist lookup failed","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nntfs: do not map a vcn as a hole when its runlist lookup failed\n\nntfs_attr_vcn_to_rl() retries ntfs_map_runlist_nolock() for any lcn up\nto LCN_RL_NOT_MAPPED, which includes LCN_ENOENT, but turns a failed\nretry into an error only for LCN_RL_NOT_MAPPED.  For LCN_ENOENT the\nerror is dropped and the read path maps the range as a hole.\n\nAn LCN_ENOENT below allocated_size comes from a base extent with a\nhighest_vcn of 0, which ntfs_mapping_pairs_decompress() takes to map the\nwhole attribute, so the runlist ends after its last mapping pair.  If\nthe pairs end early, the retry finds the same extent and fails with\n-ENOENT.  On a crafted volume with 4 KiB clusters, a 64-cluster file\nwhose mapping pairs stop after 16 clusters reads 48 clusters of zeros,\nwith no error.\n\nThe same layout gets a crafted $MFT past the check from \"ntfs: fail the\nmount when $MFT needs its own extent records\".  With 512-byte clusters\nand $MFT's mapping pairs ending at vcn 4, an unpatched kernel hangs on\nthe folio lock reading records 0-3.  With the check alone, the -EIO is\ndropped, records 2 and 3 read as zeros and the mount carries on until\ncheck_mft_mirror() finds the zeroed record 2.\n\nFail the lookup whenever the retry leaves @vcn unmapped below\nallocated_size, -ENOENT included.  At or beyond allocated_size the end\nof the runlist is still returned as it is.\n\nA failed expansion in ntfs_non_resident_attr_expand() or\nntfs_attrlist_repack() truncates the runlist under the runlist lock but\nrestores allocated_size only after dropping it.  A lookup in between\nwould now fail, so restore allocated_size before dropping the lock in\nboth, under size_lock, which ntfs_attr_vcn_to_rl() takes to read it.\n\nThe crafted file now fails from vcn 16 on with -EIO, and the crafted\nvolume fails to mount with the check's message.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nntfs: do not map a vcn as a hole when its runlist lookup failed\n\nntfs_attr_vcn_to_rl() retries ntfs_map_runlist_nolock() for any lcn up\nto LCN_RL_NOT_MAPPED, which includes LCN_ENOENT, but turns a failed\nretry into an error only for LCN_RL_NOT_MAPPED.  For LCN_ENOENT the\nerror is dropped and the read path maps the range as a hole.\n\nAn LCN_ENOENT below allocated_size comes from a base extent with a\nhighest_vcn of 0, which ntfs_mapping_pairs_decompress() takes to map the\nwhole attribute, so the runlist ends after its last mapping pair.  If\nthe pairs end early, the retry finds the same extent and fails with\n-ENOENT.  On a crafted volume with 4 KiB clusters, a 64-cluster file\nwhose mapping pairs stop after 16 clusters reads 48 clusters of zeros,\nwith no error.\n\nThe same layout gets a crafted $MFT past the check from \"ntfs: fail the\nmount when $MFT needs its own extent records\".  With 512-byte clusters\nand $MFT's mapping pairs ending at vcn 4, an unpatched kernel hangs on\nthe folio lock reading records 0-3.  With the check alone, the -EIO is\ndropped, records 2 and 3 read as zeros and the mount carries on until\ncheck_mft_mirror() finds the zeroed record 2.\n\nFail the lookup whenever the retry leaves @vcn unmapped below\nallocated_size, -ENOENT included.  At or beyond allocated_size the end\nof the runlist is still returned as it is.\n\nA failed expansion in ntfs_non_resident_attr_expand() or\nntfs_attrlist_repack() truncates the runlist under the runlist lock but\nrestores allocated_size only after dropping it.  A lookup in between\nwould now fail, so restore allocated_size before dropping the lock in\nboth, under size_lock, which ntfs_attr_vcn_to_rl() takes to read it.\n\nThe crafted file now fails from vcn 16 on with -EIO, and the crafted\nvolume fails to mount with the check's message.","source":"cvelist"}],"published":"2026-11-30T13:19:00.054Z","modified":"2026-11-30T14:20:43.017Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"495e90fa334828d4119061e2726af51d0a0fb4ed","fixed":"ce91fe5137a448d6ed0debb7493ff5a32d3bd5eb","status":"affected"},{"type":"git","introduced":"495e90fa334828d4119061e2726af51d0a0fb4ed","fixed":"e727ea7fc4e36b3d14b7bb304e82918aa6e2024a","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/ce91fe5137a448d6ed0debb7493ff5a32d3bd5eb","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e727ea7fc4e36b3d14b7bb304e82918aa6e2024a","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-99997","url":"https://www.cve.org/CVERecord?id=CVE-2026-99997","licence":"CVE Terms of Use","modified":"2026-11-30T13:19:00.054Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-99997","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99997","licence":"Public domain","modified":"2026-11-30T14:20:43.017Z"}],"updatedAt":"2026-11-30T14:33:17.617Z","epss":{"score":0.00267,"percentile":0.20075,"date":"2026-12-01T12:00:22.000Z"}}