{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139258","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2026-11-30T13:22:15.923Z","datePublished":"2026-11-30T13:33:05.006Z","dateUpdated":"2026-12-01T05:42:03.289Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-12-01T05:42:03.289Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nntfs: widen the sub-block offsets in ntfs_decompress()\n\nntfs_decompress() tracks where the current sub-block starts and ends\ninside the destination page with two u16s:\n\n\tu16 do_sb_start;\n\tu16 do_sb_end;\n\t...\n\tdo_sb_start = *dest_ofs;\n\tdo_sb_end = do_sb_start + NTFS_SB_SIZE;\n\n*dest_ofs is an int page offset masked with ~PAGE_MASK, and\nNTFS_SB_SIZE is 0x1000, so do_sb_end needs PAGE_SIZE + 0xfff of range.\nThat exceeds u16 once PAGE_SIZE reaches 0x10000: the last sub-block of a\npage starts at 0xf000 and do_sb_end wraps from 0x10000 to 0.\n\nThe zero-fill that pads a short sub-block then computes a negative\nlength:\n\n\tif (dp_addr < dp_sb_end) {\n\t\tint nr_bytes = do_sb_end - *dest_ofs;\n\n\t\tmemset(dp_addr, 0, nr_bytes);\n\nA sub-block made only of symbol tokens reaches this without consulting\ndo_sb_end on the way, because that path just does\n\n\t*dp_addr++ = *cb++;\n\t++*dest_ofs;\n\nand is bounded by dp_addr against dp_sb_end.  With do_sb_start at 0xf000\nand eight literal bytes emitted, nr_bytes is -61448 and the memset()\nruns for 18446744073709490168 bytes.\n\nGetting there is cheap: fifteen sub-blocks of eleven bytes each advance\n*dest_ofs to 0xf000, since the same zero-fill pads each of them out to\n0x1000 while do_sb_end is still exact, and the sixteenth one triggers\nthe wrap.  A compression block is 0x10000 bytes with 4 KiB clusters and\nthe fixed compression unit of 4, so all sixteen fit with room to spare.\n\nPhrase tokens are bounded against do_sb_end and so return -EOVERFLOW\ninstead, and the\n\n\tif (*dest_index == dest_max_index && do_sb_end > dest_max_ofs)\n\ncheck at the top of the sub-block stops firing for the same reason.\n\nUse int for both, matching *dest_ofs and dest_max_ofs.  The narrow type\ncame in with the original import and survived the removal and revert of\nthe driver."}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The malformed LZNT1 stream comes from compressed $DATA clusters on a local NTFS image or removable disk. ntfs_decompress() is reached only via read(2) → ntfs_read_folio() → ntfs_read_compressed_block() on that mounted volume, and no network protocol carries the sub-block data.\nAC:L - The bug fires every time on a 64K-page kernel. Fifteen 11-byte sub-blocks move *dest_ofs to 0xf000, and the 16th wraps the u16 do_sb_end to 0. A tag of literal bytes then skips every do_sb_end check. 64K pages are the Kconfig default for PPC_BOOK3S_64 (arch/powerpc/Kconfig:819), so this is a standard setup, not a rare config.\nPR:N - The attacker only has to supply the image and needs no account on the target. ntfs_fs_type is FS_REQUIRES_DEV|FS_ALLOW_IDMAP with no FS_USERNS_MOUNT, so the attacker can't mount it themselves from a user namespace. The privileged mount is done by the victim and is scored under UI.\nUI:R - A user or automounter has to mount the crafted NTFS volume, and something has to read the compressed file so that ntfs_read_compressed_block() runs. ntfs_readahead() skips compressed inodes, so any plain read triggers it.\nS:U - The wild zero-fill runs in the host kernel's linear map, inside the same kernel security authority. No VM, IOMMU or sandbox boundary is crossed.\nC:H - memset(dp_addr, 0, nr_bytes) with nr_bytes = 0 - 0xf008 runs for about 2^64 bytes. It wipes every kernel object, credential and page-cache page above the destination page, an unbounded corruption of kernel memory that can be leveraged for disclosure, like the OMFS ~4 GiB memset.\nI:H - The negative int length becomes size_t, so memset() keeps zeroing physical memory past the page-cache page through the linear map until it faults. That is an out-of-bounds write over arbitrary kernel data structures and other files' cached pages.\nA:H - The zero-fill always ends in an oops when it hits an unmapped address. Before that it has corrupted surrounding kernel memory, and ntfs_cb_lock and the page locks are still held, so the system crashes or hangs."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/ntfs/compress.c"],"versions":[{"version":"1e9ea7e04472d4e5e12e58c881eaacfb3e49b669","lessThan":"389ab01cff8a352c46cb137ef382d5eab4c0bbf9","status":"affected","versionType":"git"},{"version":"1e9ea7e04472d4e5e12e58c881eaacfb3e49b669","lessThan":"d45f99f816c9e40cf89b93b90396b1503eda1e47","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/ntfs/compress.c"],"versions":[{"version":"7.1","status":"affected"},{"version":"0","lessThan":"7.1","status":"unaffected","versionType":"semver"},{"version":"7.3.6","lessThanOrEqual":"7.3.*","status":"unaffected","versionType":"semver"},{"version":"7.4-rc1","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"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"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/389ab01cff8a352c46cb137ef382d5eab4c0bbf9"},{"url":"https://git.kernel.org/stable/c/d45f99f816c9e40cf89b93b90396b1503eda1e47"}],"title":"ntfs: widen the sub-block offsets in ntfs_decompress()","x_generator":{"engine":"bippy-1.2.0"}}}}