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=1795099808; b=d6f4SnWDlMnWv8ixD1ZlzKPjhtFV6UnBUMZWFouTKifcPoLR3HieirhYBVmZipez0GFN CL0aQ5tRKxWjrM8TnUMq1+XnbXq1EpMc6pLBJ77HoOnSGCOhcaogWuVV18coMXe6Jm3K+ VhqcYasb0ehApzgu0c0RhPedSWMWOBM2OwMrljH6rVhbqcFZ0Geyh4WclwI+9Ysan/oXJ FXmz66F8ei0+0yfW1JMgq5j76OtMa3rT1bnyFfUkpVUNJvc8/sk7h1sqs9W1qZIbIvs49 Us0bfxwnLqh4pQ+ulV96xT0vqyQuwoQUBW6y0HU6IBVHT8NCmMzZTO3tV80Ok/Bad8Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795099808; 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=Sw9k19HpXFmldsXBD4yV8F+QAvVTBmRt0Y1RRCuF0Uo=; b=Wi70uQHEOK3YdyOkP6ha9R5idSqPRITo5Fr9AgGlGb9ZVyW1jU/SaaZI+FoBQ/2pwfPY U1kUBIkDlwuW9qRLvy723/A7kqSo3EiJEKuejBvBwOSW+uqWg9gFVDhIW6mgl4XOQmPLu R18uUAnS4WBFuj1zIu2wdL1H2PSleiaYitZgwiGNNOyky5eVrTDtZdWbBhWEuRUv74Bgt CxJx7s3LUd9AEP/re6l8/umqHon20Vnm0iQW+cqUHcThy67hHQ8xZny+vd5DEnlFgXC8E kg9TD99cZBXfhdLJwX7EcJvGVTUAE6jF+Jyl8ENThQCFQg1gsVvkMtZFIOLFvi5pfpg== 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=dZc+F5IH; 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 A9125606B06A for ; Thu, 19 Nov 2026 14:50:08 +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=dZc+F5IH Received: by smtp.kernel.org (Postfix) with ESMTPSA id 790FA1F000C4; Thu, 19 Nov 2026 14:50:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795099808; bh=Sw9k19HpXFmldsXBD4yV8F+QAvVTBmRt0Y1RRCuF0Uo=; h=From:To:Cc:Subject:Date:Reply-To; b=dZc+F5IHybmrt4TA35VjaCJHIqIT/QQjH2T5YGPBAf84YqksFN8zcc9xuYTbt7MDu 8m9iaSWDqam2CPn9PfHsQpMRKQVFq4JJHIYFAE3kEuBTu9QjMOQn8eX1V5xZFdMl1Q 16jPJrf6o65tpA8jvMgmZFebf0dBlDENxorTRDbU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-99448: ufs: use u64 for directory size in ufs_last_byte Date: Thu, 19 Nov 2026 15:25:46 +0100 Message-ID: <2026111906-CVE-2026-99448-c594@gregkh> X-Mailer: git-send-email 2.56.0 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=4151; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=lXZ+vie75PW/+mf6lBXG//O69Y4XFhHrhD8bI787rDk=; b=owGbwMvMwCRo6H6F97bub03G02pJDFn/2drKtluFTdzbsnfaa7dups1Nsm9fe94OExCa6bXKT OzntkLnjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZiIhi7DfPdpCdWJYp4sxfOM nUTKGO2XvRdsZVjQ+WAR9wGdhQnzmNt21U5JFl37qqoAAA== 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: ufs: use u64 for directory size in ufs_last_byte ufs1_read_inode() and ufs2_read_inode() copy the untrusted 64-bit on-disk size into inode->i_size. ufs_last_byte() then truncates that value to an unsigned int before calculating the valid extent of a directory folio. A directory size of exactly 4 GiB is truncated to zero. In ufs_find_entry(), subtracting the requested record length from that zero forms an endpoint almost 4 GiB beyond the mapped folio. A crafted UFS2 image produces: BUG: KASAN: use-after-free in ufs_find_entry+0x583/0x6e0 [ufs] Read of size 1 ... ufs_find_entry ufs_inode_by_name ufs_lookup __lookup_slow path_lookupat The KASAN classification reflects that the adjacent physical page was free; the source-level operation is an out-of-folio read. A controlled UFS1 test with CONFIG_UFS_FS_WRITE enabled also made ufs_find_entry() return a directory entry from an adjacent anonymous page. unlink() then passed that pointer to ufs_delete_entry(), which cleared the adjacent page's 3 2-bit d_ino. This write result reproduced three out of three times. UFS normally requires a privileged mount path. A relevant boundary is a privileged automounter or image-processing service handling an attacker-supplied filesystem. The write primitive additionally requires UFS1 to be mounted read-write with CONFIG_UFS_FS_WRITE enabled; the read is reachable with read-only UFS2. Keep the intermediate size arithmetic at 64 bits so non-final pages are bounded at PAGE_SIZE. With this change, the same controlled tests reach the real on-disk directory entry and produce no adjacent-page write or KASAN report. A reproducer and full validation logs are available on request. The vulnerable helper is present in v7.2-rc3, v7.1, v6.18.38, v6.12.95, v6.6.111, and upstream master at 1229e2e57a5c. Runtime reproduction and fix validation were performed in an x86-64 QEMU guest running v7.2-rc3 with generic KASAN. The Linux kernel CVE team has assigned CVE-2026-99448 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.18 with commit b71034e5e67d1577424cebe7bbb7d0ce134a4cd8 and fixed in 6.12.117 with commit ae50223c56b9a1c27d4f824c9e2fbbefc8686891 Issue introduced in 2.6.18 with commit b71034e5e67d1577424cebe7bbb7d0ce134a4cd8 and fixed in 6.18.61 with commit c792858491ee39e8f6e1547c45422595cf25b415 Issue introduced in 2.6.18 with commit b71034e5e67d1577424cebe7bbb7d0ce134a4cd8 and fixed in 7.3.2 with commit ac2859c61ecf52a9e39b44b35c981dbfeb8ad54b Issue introduced in 2.6.18 with commit b71034e5e67d1577424cebe7bbb7d0ce134a4cd8 and fixed in 7.4-rc1 with commit 1eff23433e73d7da4f9e3529d2701e34962b161f 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-99448 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/ufs/dir.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/ae50223c56b9a1c27d4f824c9e2fbbefc8686891 https://git.kernel.org/stable/c/c792858491ee39e8f6e1547c45422595cf25b415 https://git.kernel.org/stable/c/ac2859c61ecf52a9e39b44b35c981dbfeb8ad54b https://git.kernel.org/stable/c/1eff23433e73d7da4f9e3529d2701e34962b161f