Skip to contentSkip to conversation

CVE-2026-89785: fs/ntfs3: fix out-of-bounds read of INDEX_ROOT in reparse/objid init

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 16

lore
Share & tools
lore
#0 lore raw

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

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

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

fs/ntfs3: fix out-of-bounds read of INDEX_ROOT in reparse/objid init

ntfs_reparse_init() and ntfs_objid_init() parse the index root of the $Extend/$Reparse and $Extend/$ObjId metafiles (the INDEX_ROOT attributes named $R and $O). They read its type and rule fields through resident_data(), which does not check that the resident attribute is large enough to hold them.

mi_enum_attr() accepts a resident attribute with data_off == asize and data_size == 0. For such an attribute placed last in its MFT record, resident_data() returns a pointer to the end of the record_size buffer, so reading root->type / root->rule reads past the allocation.

Use resident_data_ex(attr, sizeof(struct INDEX_ROOT)) and bail out when it returns NULL, as ntfs_security_init() already does for $SDH / $SII.

The attribute is only parsed while mounting a crafted image, so this needs CAP_SYS_ADMIN.

 BUG: KASAN: slab-out-of-bounds in ntfs_reparse_init (fs/ntfs3/fsntfs.c:2306)
 Read of size 4 at addr ffff88801219dc00 by task mount
  ntfs_reparse_init (fs/ntfs3/fsntfs.c:2306)
  ntfs_fill_super (fs/ntfs3/super.c:1604)
  get_tree_bdev_flags (fs/super.c:1703)
  vfs_get_tree (fs/super.c:1758)
  path_mount (fs/namespace.c:4131)
  __x64_sys_mount (fs/namespace.c:4360)

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

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

	Issue introduced in 5.15 with commit 82cae269cfa953032fbb8980a7d554d60fb00b17 and fixed in 5.15.221 with commit eb80003744e32a7366a523015e4acfe0a2ac7d88
	Issue introduced in 5.15 with commit 82cae269cfa953032fbb8980a7d554d60fb00b17 and fixed in 6.1.188 with commit bd631e2005290a55c8edda87363bc0d594c01705
	Issue introduced in 5.15 with commit 82cae269cfa953032fbb8980a7d554d60fb00b17 and fixed in 6.6.157 with commit 94fce1d3e74fe011e21f17490ba58491709fd7e5
	Issue introduced in 5.15 with commit 82cae269cfa953032fbb8980a7d554d60fb00b17 and fixed in 6.12.110 with commit 66c074eab6f966fbe48a0fc4b3a45b2a2e2df527
	Issue introduced in 5.15 with commit 82cae269cfa953032fbb8980a7d554d60fb00b17 and fixed in 6.18.52 with commit 64bb6000bfbdf241a6dd578199acd90321a4243e
	Issue introduced in 5.15 with commit 82cae269cfa953032fbb8980a7d554d60fb00b17 and fixed in 7.2.6 with commit 72caafbc95c5dca8266a942b8e96ad81d8d9adc7
	Issue introduced in 5.15 with commit 82cae269cfa953032fbb8980a7d554d60fb00b17 and fixed in 7.3-rc1 with commit 2064bc663f89e61b8681c1fb9d1ce445de72063d

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-89785

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/fsntfs.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/eb80003744e32a7366a523015e4acfe0a2ac7d88
	https://git.kernel.org/stable/c/bd631e2005290a55c8edda87363bc0d594c01705
	https://git.kernel.org/stable/c/94fce1d3e74fe011e21f17490ba58491709fd7e5
	https://git.kernel.org/stable/c/66c074eab6f966fbe48a0fc4b3a45b2a2e2df527
	https://git.kernel.org/stable/c/64bb6000bfbdf241a6dd578199acd90321a4243e
	https://git.kernel.org/stable/c/72caafbc95c5dca8266a942b8e96ad81d8d9adc7
	https://git.kernel.org/stable/c/2064bc663f89e61b8681c1fb9d1ce445de72063d