Skip to contentSkip to conversation

CVE-2026-90118: ntfs: fix off-by-one page overflow in ntfs_decompress()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 17

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

ntfs: fix off-by-one page overflow in ntfs_decompress()

The per-token range check in ntfs_decompress() uses

	if (cb >= cb_sb_end || dp_addr > dp_sb_end)
		break;

so dp_addr == dp_sb_end falls through to the symbol copy *dp_addr++ = *cb++, writing one byte past the destination page. Since NTFS_SB_SIZE == PAGE_SIZE the destination is a single page, so the byte lands in the adjacent page, and *dest_ofs is left one past the sub-block end (the later *dest_ofs &= ~PAGE_MASK then yields 1, not 0, so the page is never finalized and later sub-blocks keep writing further past it). A corrupted compressed $DATA attribute thus produces a bounded run of out-of-bounds writes when the file is read.

Break as soon as dp_addr reaches dp_sb_end; a full sub-block still completes, as its final copy advances dp_addr to exactly dp_sb_end.

The Linux kernel CVE team has assigned CVE-2026-90118 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 7.1 with commit 1e9ea7e04472d4e5e12e58c881eaacfb3e49b669 and fixed in 7.2.6 with commit b42644e425fed4a5cd6c88372655da5c1b52c666
	Issue introduced in 7.1 with commit 1e9ea7e04472d4e5e12e58c881eaacfb3e49b669 and fixed in 7.3-rc1 with commit 98716c9fce21f6c8a9d71e08cf53e7504fa562f4

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-90118

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
fs/ntfs/compress.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/b42644e425fed4a5cd6c88372655da5c1b52c666
	https://git.kernel.org/stable/c/98716c9fce21f6c8a9d71e08cf53e7504fa562f4