Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A24033DFC7C for ; Wed, 27 May 2026 13:00:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779886834; cv=none; b=dzR9sBbNKQXD4mfLDSV6fCzv+eE3BcQjLKhUKrr43gU6mtaONwNNNflXYX5KHsk8Hli7ZLfqjZb3lyqmQZqVh3D9+BBkGfvFG1Y2dTAY6+Wpl4A7VppUdjpyUr0tefJgkbG8GIecmqvTlXo2cTABMA/Ef5WQ5Kz7KktouBktp0g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779886834; c=relaxed/simple; bh=p25WQHNoUfSOviWL7OLt5klUeHxPHoAtd8QRl8LqQcU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=GEurIyX0T3Pi7/iXaasNJioYi+kOki+jja3utSWsd6r5KancJAH6jfkgS9C2SUKQnmurQ4MRpoRlklmMjXpCxURCF1SMvBoSO/ZouOeDB8UaLUkMfn3kmpFt6j5vIplC/JZU5AL8ImwBo2axmgIkqby1YUouSCCVzPpeh6L2Ufc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=D8PEFyS0; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="D8PEFyS0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EECC71F000E9; Wed, 27 May 2026 13:00:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779886833; bh=7L3/IDB1NQKfR5QiDyHCvc2Fz6R/ehB7WFQUFj6rujU=; h=From:To:Cc:Subject:Date:Reply-To; b=D8PEFyS0yWmsmVpK9f1Mj2yfPxswBEQ9bVusYgYSly16xBKNTn5wN4KjWvkY7vg3R bMFyEIk6uq55akK3Nqi6iJVti8nr7QfUqe9OOHSt+QRl//TrmKem3HrBINTL4INnRj qD6qtLYkbKAnv+6urm7V2zakqA66Cu7pHHiK9OwQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-46002: ext2: reject inodes with zero i_nlink and valid mode in ext2_iget() Date: Wed, 27 May 2026 14:58:53 +0200 Message-ID: <2026052742-CVE-2026-46002-002d@gregkh> X-Mailer: git-send-email 2.54.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4882; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=anHg1OXvJs5ZSDSIPh4+myDsgJ1uBTnBSygU+9lQXM4=; b=owGbwMvMwCRo6H6F97bub03G02pJDFlir5o+r0pYwpWcmWiS3peqdf7oQq6yewfT85IEFcNdG nnUDup0xLIwCDIxyIopsnzZxnN0f8UhRS9D29Mwc1iZQIYwcHEKwERYzjMs2BCU0vhvb8U5Hwlz 8cdaE4KmLORQZ5jD/15s8d93n66LL3c99j+utuiNw4srAA== 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: ext2: reject inodes with zero i_nlink and valid mode in ext2_iget() ext2_iget() already rejects inodes with i_nlink == 0 when i_mode is zero or i_dtime is set, treating them as deleted. However, the case of i_nlink == 0 with a non-zero mode and zero dtime slips through. Since ext2 has no orphan list, such a combination can only result from filesystem corruption - a legitimate inode deletion always sets either i_dtime or clears i_mode before freeing the inode. A crafted image can exploit this gap to present such an inode to the VFS, which then triggers WARN_ON inside drop_nlink() (fs/inode.c) via ext2_unlink(), ext2_rename() and ext2_rmdir(): WARNING: CPU: 3 PID: 609 at fs/inode.c:336 drop_nlink+0xad/0xd0 fs/inode.c:336 CPU: 3 UID: 0 PID: 609 Comm: syz-executor Not tainted 6.12.77+ #1 Call Trace: inode_dec_link_count include/linux/fs.h:2518 [inline] ext2_unlink+0x26c/0x300 fs/ext2/namei.c:295 vfs_unlink+0x2fc/0x9b0 fs/namei.c:4477 do_unlinkat+0x53e/0x730 fs/namei.c:4541 __x64_sys_unlink+0xc6/0x110 fs/namei.c:4587 do_syscall_64+0xf5/0x220 arch/x86/entry/common.c:78 entry_SYSCALL_64_after_hwframe+0x77/0x7f WARNING: CPU: 0 PID: 646 at fs/inode.c:336 drop_nlink+0xad/0xd0 fs/inode.c:336 CPU: 0 UID: 0 PID: 646 Comm: syz.0.17 Not tainted 6.12.77+ #1 Call Trace: inode_dec_link_count include/linux/fs.h:2518 [inline] ext2_rename+0x35e/0x850 fs/ext2/namei.c:374 vfs_rename+0xf2f/0x2060 fs/namei.c:5021 do_renameat2+0xbe2/0xd50 fs/namei.c:5178 __x64_sys_rename+0x7e/0xa0 fs/namei.c:5223 do_syscall_64+0xf5/0x220 arch/x86/entry/common.c:78 entry_SYSCALL_64_after_hwframe+0x77/0x7f WARNING: CPU: 0 PID: 634 at fs/inode.c:336 drop_nlink+0xad/0xd0 fs/inode.c:336 CPU: 0 UID: 0 PID: 634 Comm: syz-executor Not tainted 6.12.77+ #1 Call Trace: inode_dec_link_count include/linux/fs.h:2518 [inline] ext2_rmdir+0xca/0x110 fs/ext2/namei.c:311 vfs_rmdir+0x204/0x690 fs/namei.c:4348 do_rmdir+0x372/0x3e0 fs/namei.c:4407 __x64_sys_unlinkat+0xf0/0x130 fs/namei.c:4577 do_syscall_64+0xf5/0x220 arch/x86/entry/common.c:78 entry_SYSCALL_64_after_hwframe+0x77/0x7f Extend the existing i_nlink == 0 check to also catch this case, reporting the corruption via ext2_error() and returning -EFSCORRUPTED. This rejects the inode at load time and prevents it from reaching any of the namei.c paths. Found by Linux Verification Center (linuxtesting.org) with Syzkaller. The Linux kernel CVE team has assigned CVE-2026-46002 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.6.140 with commit 32e0b925572686399243834ec99e2a9d85c62eae Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.12.86 with commit d3af04a43db86379df7438bf8bade71685b8a239 Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.18.27 with commit 2dde6377ab2e46bb80cf066c659ef016f3ad7a9b Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 7.0.4 with commit 470264bbec499e276a89a6431144ae58f411ea4d Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 7.1-rc1 with commit 25947cc5b2374cd5bf627fe3141496444260d04f 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-46002 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/ext2/inode.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/32e0b925572686399243834ec99e2a9d85c62eae https://git.kernel.org/stable/c/d3af04a43db86379df7438bf8bade71685b8a239 https://git.kernel.org/stable/c/2dde6377ab2e46bb80cf066c659ef016f3ad7a9b https://git.kernel.org/stable/c/470264bbec499e276a89a6431144ae58f411ea4d https://git.kernel.org/stable/c/25947cc5b2374cd5bf627fe3141496444260d04f