{"id":"CVE-2026-139217","state":"PUBLISHED","title":"ntfs: reject index blocks with a too small entries offset","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nntfs: reject index blocks with a too small entries offset\n\nIndex blocks read from the volume are checked for a plausible header, but\nnothing keeps a block from placing its entries closer to the header than\nntfs_ib_alloc() does when it creates one.  The allocation adds the update\nsequence array, one entry per 512-byte sector plus the terminator, to the\nindex header and aligns the result to 8 bytes, so the first entry of a\n4096-byte block starts at offset 40, while a corrupt block may declare 16.\n\nntfs_ib_copy_tail() then copies the entries that follow the median entry\nfrom the source block into a freshly allocated destination.  The tail is\nsized as index_length minus entries_offset and the median entry, both from\nthe source, while the destination only has allocated_size minus the\ncanonical offset of room.  With the values above the tail is 4040 bytes\nand the destination holds 4032, so the last 8 bytes are written past the\nend of the new allocation, with contents taken from the mounted image.\n\nReject such a block when it is read: entries_offset must not be smaller\nthan the canonical offset for the block size.  Derive it from block_size\nrather than from the block's own usa_count, which post_read_mst_fixup()\ntreats as \"not protected\" when it does not match the block size, and use\nthe same helper in ntfs_ib_alloc() so both stay in sync.","publishedAt":"2026-11-30T13:32:40.315Z","updatedAt":"2026-11-30T13:32:40.315Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"0a8ac0c1fa0b99a5b29002bc7f232ed7eafddef0","status":"affected","lessThan":"bae87fc0e80c50f065f1feca232e38e3292be425","versionType":"git"},{"version":"0a8ac0c1fa0b99a5b29002bc7f232ed7eafddef0","status":"affected","lessThan":"20e14268ef410cbabff54a79405813a8b9ce8e89","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/ntfs/index.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"7.1","status":"affected"},{"version":"0","status":"unaffected","lessThan":"7.1","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/ntfs/index.c"]}],"references":["https://git.kernel.org/stable/c/bae87fc0e80c50f065f1feca232e38e3292be425","https://git.kernel.org/stable/c/20e14268ef410cbabff54a79405813a8b9ce8e89"],"weaknesses":[],"ingestedAt":"2026-11-30T13:44:05.999Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139217.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139217","state":"PUBLISHED","datePublished":"2026-11-30T13:32:40.315Z","dateUpdated":"2026-11-30T13:32:40.315Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.921Z"},"containers":{"cna":{"title":"ntfs: reject index blocks with a too small entries offset","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nntfs: reject index blocks with a too small entries offset\n\nIndex blocks read from the volume are checked for a plausible header, but\nnothing keeps a block from placing its entries closer to the header than\nntfs_ib_alloc() does when it creates one.  The allocation adds the update\nsequence array, one entry per 512-byte sector plus the terminator, to the\nindex header and aligns the result to 8 bytes, so the first entry of a\n4096-byte block starts at offset 40, while a corrupt block may declare 16.\n\nntfs_ib_copy_tail() then copies the entries that follow the median entry\nfrom the source block into a freshly allocated destination.  The tail is\nsized as index_length minus entries_offset and the median entry, both from\nthe source, while the destination only has allocated_size minus the\ncanonical offset of room.  With the values above the tail is 4040 bytes\nand the destination holds 4032, so the last 8 bytes are written past the\nend of the new allocation, with contents taken from the mounted image.\n\nReject such a block when it is read: entries_offset must not be smaller\nthan the canonical offset for the block size.  Derive it from block_size\nrather than from the block's own usa_count, which post_read_mst_fixup()\ntreats as \"not protected\" when it does not match the block size, and use\nthe same helper in ntfs_ib_alloc() so both stay in sync."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"0a8ac0c1fa0b99a5b29002bc7f232ed7eafddef0","status":"affected","lessThan":"bae87fc0e80c50f065f1feca232e38e3292be425","versionType":"git"},{"version":"0a8ac0c1fa0b99a5b29002bc7f232ed7eafddef0","status":"affected","lessThan":"20e14268ef410cbabff54a79405813a8b9ce8e89","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/ntfs/index.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"7.1","status":"affected"},{"version":"0","status":"unaffected","lessThan":"7.1","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/ntfs/index.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/bae87fc0e80c50f065f1feca232e38e3292be425"},{"url":"https://git.kernel.org/stable/c/20e14268ef410cbabff54a79405813a8b9ce8e89"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:32:40.315Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.1","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.1","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}