From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796045329; b=oSZRqSBe94mzd1x7Ldni80Lsu9hGCf/qrwhU0G1Re1Sz2hSLN+/rel2dbT3AWJ5fv+/g xXYiErsNdtapl3MhsitoxNm9CFvC9kFE1kZMXT0q/uJhuGgzh8HuYkRjRIolp5WogGXUT S8nBgZTHrLnJ2QzqFizqQQ7t1aDzfVdBhyb1zON6kNqeQlA2E6Sj0dmcP/aEU//VX/Mx6 kFZCWyljG7s3ummJni9fzu2C8RkeWtXQ6X7pTFEfpDCmLjyVWFKyDxWK6Zc7JltWzp5Bl FcqGcqaOnUEmajREThi1G7U1d3nLua317aaGOgzFVFml2BQzlA+vr/QWv6H6GSzzd9w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796045329; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: Reply-To:MIME-Version:Lines:X-Developer-Signature:X-Developer-Key: Content-Transfer-Encoding; bh=UInpPZb+ppV3EAvqqeLnkiIoDjc3h3EeKLf579rmSuQ=; b=tRazEejHXMMobYIOZIliKJzziIym4Y4W7Pu1PpLrBuig4KFwQmu0LGJ5uLpvndiy0I65 yxgDWsntIkD5ssVv9O0Uo+5sQtKk2iNKc9cWMsxy7F5U5hf+zpHsZSXBQyPT4FlDsi4lP Um+81rh6EtZIB/DZqL+KuQlU5ZfSKLefVDGHhQKR88wjdDxxSuTXOYRf2W2HhVlsUPMZg y1OA6CX6iLqI0hF7vfPK83tawvuqilCnYpEjpldzbUdA+RbGzvhDsRVdVsr6J3xBzsTW7 76ugKM8yNilMdOhYW1Ei6JhlmdiumO1L/KRch4pV+WlKTkEFIW+4Qt9CXf4cFNMpomA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=DTMksMBl; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 07A7B606A31C for ; Mon, 30 Nov 2026 13:28:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=DTMksMBl Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1E38A1F000C1; Mon, 30 Nov 2026 13:28:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796045328; bh=UInpPZb+ppV3EAvqqeLnkiIoDjc3h3EeKLf579rmSuQ=; h=From:To:Cc:Subject:Date:Reply-To; b=DTMksMBl+JVhkDK6LoyWGhvsVXB08zMlRrS15JNLy0V/rk+UtX/QUPVZFvUkb9etP xZgR8bwUZE0KzY5PMrCzprUkR291KVZu3yC7M+yB2ADyrzvZx65SeJD+rczphtepBP qw0zbZi11EUOjVR6pHil9C2fnKleN7lAi05j1M9A= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-99862: fs/ntfs3: bound DeleteAttribute asize against rec->used in do_action Date: Mon, 30 Nov 2026 14:18:12 +0100 Message-ID: <2026113040-CVE-2026-99862-da13@gregkh> X-Mailer: git-send-email 2.56.1 Reply-To: , X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=7496; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=ieX1N38I/TWwR/9pBsYbj8DLGZQx32IV+tRcwMv9x1A=; b=owGbwMvMwCRo6H6F97bub03G02pJDNm85SUHVi2b7XomR2enU/DhH2vXSsebLHldylX8IWjL8 7NLzyj6dcSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEZm5gmKd37G6QK3tNWeBH rdB/kfeiZP52bmKYycis8KmJlc/JtfBe/6x0t9z9e/6nAAA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: fs/ntfs3: bound DeleteAttribute asize against rec->used in do_action In do_action()'s DeleteAttribute case (fslog.c:3316), attr is Add2Ptr(rec, roff) with roff taken from the on-disk lrh->record_off, and asize = le32_to_cpu(attr->size) is read straight out of the MFT record: asize = le32_to_cpu(attr->size); used = le32_to_cpu(rec->used); if (!check_if_attr(rec, lrh)) goto dirty_vol; ... memmove(attr, Add2Ptr(attr, asize), used - asize - roff); check_if_attr() (fslog.c:2869) walks the attribute chain from rec->attr_off and returns o == ro. Its loop breaks on ATTR_END, so ro may legitimately equal the offset of the ATTR_END marker; that is exactly how CreateAttribute appends to a record. But check_file_record()'s walk (fslog.c:2831) also stops at ATTR_END, so check_attr() never inspects the bytes there. When roff is the ATTR_END offset, those never-validated bytes are what gets read as attr->size, and used - asize - roff underflows. The read itself is also unbounded: roff is a u16 and attr->size is dereferenced at fslog.c:3317, before check_if_attr() has constrained roff at all, so it can be up to ~64K past a record_size-sized object. Commit 0ca0485e4b2e ("fs/ntfs3: validate rec->used in journal-replay file record check") added at fslog.c:2844 if (used < PtrOffset(rec, attr) + sizeof(attr->type)) return false; and its changelog names this very memmove. It bounds rec->used against the ATTR_END offset; it does not bound asize. With record_size 0x400, attr_off 0x38, a valid three-attribute chain ending in ATTR_END at 0x158 and used 0x160, a record whose four bytes at 0x15c read 0x100 gives used - asize - roff = 0x160 - 0x100 - 0x158 = 0xffffff08 i.e. a ~4 GiB memmove whose source and destination both run off the end of rec, a kmalloc(sbi->record_size) object (record.c:105). The equivalent non-replay path already refuses this. mi_remove_attr() performs the same removal and starts with (record.c:548): if (aoff + asize > used) return false; Apply the same bound, spelled as a subtraction to match the neighbouring cases, and move the attr->size read after check_if_attr() so that the header is known to lie inside the record before it is dereferenced. Requiring roff + SIZEOF_RESIDENT <= used rejects the ATTR_END offset without rejecting any real attribute: for an attribute the walk validated, roff + asize <= off(ATTR_END) <= used - 4, and any attribute a DeleteAttribute record can legitimately name carries a full resident header, so roff + SIZEOF_RESIDENT <= roff + asize <= used - 4. check_attr() itself imposes no lower bound on asize, so a crafted sub-header asize can still pass the first test; the second test then bounds it and the memmove stays inside the record. Reproduced by mounting a crafted image on v7.2-rc5, which already contains 0ca0485e4b2e, under KASAN. The image is an ordinary mkfs.ntfs volume with four bytes of one MFT record changed and a crafted $LogFile: BUG: KASAN: slab-out-of-bounds in do_action.isra.0+0x3211/0x83c0 Read of size 4294967048 at addr ffff888002423258 by task mount/66 CPU: 1 UID: 0 PID: 66 Comm: mount Not tainted 7.2.0-rc5 #3 Call Trace: kasan_report+0xce/0x100 kasan_check_range+0x105/0x1b0 __asan_memmove+0x23/0x60 do_action.isra.0+0x3211/0x83c0 log_replay+0x920a/0xd300 ntfs_loadlog_and_replay+0x3ef/0x510 ntfs_fill_super+0x1d23/0x4550 get_tree_bdev_flags+0x2ef/0x550 vfs_get_tree+0x82/0x2f0 fc_mount+0x10/0x1b0 path_mount+0x517/0x1df0 __x64_sys_mount+0x20b/0x270 do_syscall_64+0xf9/0x540 entry_SYSCALL_64_after_hwframe+0x77/0x7f Allocated by task 66: __kasan_kmalloc+0x8f/0xa0 __kmalloc_noprof+0x1b4/0x460 mi_init+0x81/0x110 mi_get+0x6a/0x220 do_action.isra.0+0x1dbf/0x83c0 log_replay+0x920a/0xd300 ntfs_loadlog_and_replay+0x3ef/0x510 ntfs_fill_super+0x1d23/0x4550 The buggy address belongs to the object at ffff888002423000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 600 bytes inside of allocated 1024-byte region [ffff888002423000, ffff888002423400) KASAN reports the source side because __asan_memmove() (mm/kasan/shadow.c:94) validates src before dest and returns without copying. Both ends are out of bounds, and on a kernel built without KASAN the copy is performed. rec->used is also left at used - asize by fslog.c:3323 before the memmove, so the record stays inconsistent even when the copy is suppressed; the same mount goes on to report "ino=1a, mi_enum_attr" and marks the volume dirty. The Linux kernel CVE team has assigned CVE-2026-99862 to this issue. Affected and fixed versions =========================== Issue introduced in 5.15 with commit b46acd6a6a627d876898e1c84d3f84902264b445 and fixed in 5.15.226 with commit c9544b9a24a60d5eb3fedd7765ac741f1f0bf191 Issue introduced in 5.15 with commit b46acd6a6a627d876898e1c84d3f84902264b445 and fixed in 6.1.193 with commit 7e1d4096436edfb365c536ca92d5db8e507add9c Issue introduced in 5.15 with commit b46acd6a6a627d876898e1c84d3f84902264b445 and fixed in 6.6.163 with commit 986ec1c317d15cb8040d82471190e5fb209a564e Issue introduced in 5.15 with commit b46acd6a6a627d876898e1c84d3f84902264b445 and fixed in 6.12.117 with commit e558ee689f40b4d4e8d46d7a76c1c4e439f11200 Issue introduced in 5.15 with commit b46acd6a6a627d876898e1c84d3f84902264b445 and fixed in 6.18.63 with commit 61329755f28185322ab4f7640112b1e5c2f505ee Issue introduced in 5.15 with commit b46acd6a6a627d876898e1c84d3f84902264b445 and fixed in 7.3.4 with commit 81e354bc1e5568fd56ebe1caf1a828df67294d93 Issue introduced in 5.15 with commit b46acd6a6a627d876898e1c84d3f84902264b445 and fixed in 7.4-rc1 with commit 408216b66afd9ddadaba2dce56fd4af6793e95a2 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-99862 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/c9544b9a24a60d5eb3fedd7765ac741f1f0bf191 https://git.kernel.org/stable/c/7e1d4096436edfb365c536ca92d5db8e507add9c https://git.kernel.org/stable/c/986ec1c317d15cb8040d82471190e5fb209a564e https://git.kernel.org/stable/c/e558ee689f40b4d4e8d46d7a76c1c4e439f11200 https://git.kernel.org/stable/c/61329755f28185322ab4f7640112b1e5c2f505ee https://git.kernel.org/stable/c/81e354bc1e5568fd56ebe1caf1a828df67294d93 https://git.kernel.org/stable/c/408216b66afd9ddadaba2dce56fd4af6793e95a2