All of lore.kernel.org
 help / color / mirror / Atom feed
* CVE-2026-72196: fs/ntfs3: bound copy_lcns dp->page_lcns[] index in analysis pass
@ 2026-08-15  6:04 Greg Kroah-Hartman
  0 siblings, 0 replies; only message in thread
From: Greg Kroah-Hartman @ 2026-08-15  6:04 UTC (permalink / raw)
  To: linux-cve-announce; +Cc: Greg Kroah-Hartman

From: Greg Kroah-Hartman <gregkh@kernel.org>

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

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

fs/ntfs3: bound copy_lcns dp->page_lcns[] index in analysis pass

In log_replay()'s analysis pass, after find_dp() returns a
valid DIR_PAGE_ENTRY for the (target_attr, target_vcn) tuple,
the copy_lcns block walks lrh->lcns_follow further entries:

	t16 = le16_to_cpu(lrh->lcns_follow);
	for (i = 0; i < t16; i++) {
	    size_t j = (size_t)(le64_to_cpu(lrh->target_vcn) -
	                        le64_to_cpu(dp->vcn));
	    dp->page_lcns[j + i] = lrh->page_lcns[i];
	}

find_dp() only validates that target_vcn falls within
[dp->vcn, dp->vcn + dp->lcns_follow), i.e., that the FIRST
cluster is covered.  The walk through the further entries is
not bounded against dp->lcns_follow.  For a malformed LRH
where target_vcn = dp->vcn + dp->lcns_follow - 1 and
lrh->lcns_follow > 1, the i > 0 writes overflow the dp's
allocated page_lcns[] array.

Add the missing j + lrh->lcns_follow <= dp->lcns_follow guard.

Reproduced under UML+KASAN on mainline 8d90b09e6741 as a
slab-out-of-bounds write of size 8 from log_replay+0x68d4 on
the mount path.

This is distinct from Pavitra Jha's 2026-05-02 patch
("fs/ntfs3: validate lcns_follow in log_replay conversion",
<20260502154252.164586-1-jhapavitra98@gmail.com>) which
addresses the separate version-0 dirty-page-table conversion
path's memmove(&dp->vcn, ...) call.  The two fixes are
complementary; both should land.

[almaz.alexandrovich@paragon-software.com: clang-formatted the changes,
fixed conflicts]

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


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

	Issue introduced in 5.15 with commit b46acd6a6a627d876898e1c84d3f84902264b445 and fixed in 6.1.178 with commit 9b3d8cc9d54fcded4de51b2b1026ae7182512077
	Issue introduced in 5.15 with commit b46acd6a6a627d876898e1c84d3f84902264b445 and fixed in 6.6.145 with commit 9b7c28d8c61bdb041936222a09a708531a1c2921
	Issue introduced in 5.15 with commit b46acd6a6a627d876898e1c84d3f84902264b445 and fixed in 6.12.97 with commit 0f13e823bf86bd1800168ea0bb5bca8b8500a81c
	Issue introduced in 5.15 with commit b46acd6a6a627d876898e1c84d3f84902264b445 and fixed in 6.18.40 with commit d240cd98f5f7b65c90f6b2b6abe3232ccdc405ab
	Issue introduced in 5.15 with commit b46acd6a6a627d876898e1c84d3f84902264b445 and fixed in 7.1.5 with commit 49c86dae0c0ccb8d98ddcdc46987259389c816dd
	Issue introduced in 5.15 with commit b46acd6a6a627d876898e1c84d3f84902264b445 and fixed in 7.2-rc1 with commit 5e7b598660cfa8e5af172cf4c65cffc126333307

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-72196
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/ntfs3/fslog.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/9b3d8cc9d54fcded4de51b2b1026ae7182512077
	https://git.kernel.org/stable/c/9b7c28d8c61bdb041936222a09a708531a1c2921
	https://git.kernel.org/stable/c/0f13e823bf86bd1800168ea0bb5bca8b8500a81c
	https://git.kernel.org/stable/c/d240cd98f5f7b65c90f6b2b6abe3232ccdc405ab
	https://git.kernel.org/stable/c/49c86dae0c0ccb8d98ddcdc46987259389c816dd
	https://git.kernel.org/stable/c/5e7b598660cfa8e5af172cf4c65cffc126333307

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-15  6:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-15  6:04 CVE-2026-72196: fs/ntfs3: bound copy_lcns dp->page_lcns[] index in analysis pass Greg Kroah-Hartman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.