From mboxrd@z Thu Jan 1 00:00:00 1970 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 3653B4C9DE4 for ; Sun, 18 Oct 2026 15:26:41 +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=1792337203; cv=none; b=M7qXNmasVd10ISf5XaV7B7KmfZ1zC0bVXX8Kb0x0iv6F5Sr6+d1ytSadH2j9IzVU9hfP1FIu9p8U9/yM/icTimZbJl9YBXa9i9nQSHZEwRTfhyzZ2qwa65WNWHCkm4A0FuXN/klQw0D5eljnJWj37YVvSsywlPvKFSVGg9oCNsc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792337203; c=relaxed/simple; bh=xkRYMIxrY+P1DUMzPZsSbAMuFT/hY+5SAtBNMisEo7c=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=BY3moU1US6xaFgzgjCGzkpwSdUknGPBZ0OS8MzY2h5HsTZQUHU/0XJPi7AdKEennjh6usf1bHgBw6qRHamaCz3pm+3fxuhw98UA7cbtSHUChmDZsfIGq5wMWmeT+N3ELdSuN3QZ7tu0CSeGiAKIY1NBUPPEMB3B+0+3DIKxLHWA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=UKdv6iBF; 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="UKdv6iBF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A1841F000C4; Sun, 18 Oct 2026 15:26:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1792337200; bh=nAUXNSBCamInWZ2M9fO9cI8jU+6OCska/Q8kukjAKao=; h=From:To:Cc:Subject:Date:Reply-To; b=UKdv6iBFs18eJYhCNwzXviHM5rE+l15QfwyIDPLQmGQ7IqNm8MheuHtUeT+OxOZ2N sL3y/hsM3AjVBZofaQzxdmVrSDLKuGSbhfNmpDCoYjNhonOAYDEbW9A+fd6xvfS5+m hddkCvhEK4dZNzRD0VsqV1m0R3ri9fe4W9fZhbNg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-98539: fs/ntfs3: use d_instantiate_new() in ntfs_create_inode() and murder syzbot's "WARNING in do_new_mount" saga Date: Sun, 18 Oct 2026 17:16:43 +0200 Message-ID: <2026101826-CVE-2026-98539-18dc@gregkh> X-Mailer: git-send-email 2.56.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=4986; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=qQyTAgZ/XTe5qoa5hY4gR4DlUUUyBsqic/X+r+6+V+g=; b=owGbwMvMwCRo6H6F97bub03G02pJDFlXHvVpHV5QMGX/Sct3Dh+/bowIWWuzTXHT49lfrYVtv r/vN0na1RHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATed3IME/nLK9+X50gZ55j 50kJ7k9P9qmb7GFYsH9nxYzw9aym7LOX+t5RyHl8Pl/iHwA= 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: use d_instantiate_new() in ntfs_create_inode() and murder syzbot's "WARNING in do_new_mount" saga ntfs_create_inode() creates a new inode via ntfs_new_inode(). It hashes it with insert_inode_locked() and so it's marked as I_NEW until unlock_new_inode(). ntfs 3 calls d_instantiate() in between though... Since the dentry was already hashed by the lookup before the create any path walk finds it without touching the parent's i_rwsem and so can lock the inode. If the inode is a directory unlock_new_inode() calls lockdep_annotate_inode_mutex_key() and marks i_rwsem with the i_mutex_dir_key class. That resets the count and the owner of a lock somebody else may already hold by now... syzbot has been spamming us with the same godforsaken bug "WARNING in do_new_mount" since 2023. I can't take it anymore so I went looking. Afaict, syzbot's executor chdirs into a freshly mounted ntfs3 image, creates a directory and then mounts some pseudofs on it. Everytime the mkdir() takes longer than syzbot waits mount() runs concurrently: mkdir("./sys") mount(NULL, "./sys", "sysfs") ntfs_create_inode() d_instantiate() user_path_at() finds the dentry do_lock_mount() inode_lock(inode) namespace_lock() unlock_new_inode() lockdep_annotate_inode_mutex_key() init_rwsem(&inode->i_rwsem) unlock_mount() inode_unlock(inode) The mount side then releases a lock that according to the rwsem nobody holds: DEBUG_RWSEMS_WARN_ON((rwsem_owner(sem) != current) && ...): count = 0x0, magic = 0xffff888043a854e8, owner = 0x0, curr 0xffff888000244880, list empty WARNING: CPU: 0 PID: 5346 at kernel/locking/rwsem.c:1368 __up_write Call Trace: inode_unlock include/linux/fs.h:877 [inline] unlock_mount fs/namespace.c:2892 [inline] do_new_mount_fc fs/namespace.c:3828 [inline] do_new_mount+0x777/0xa40 fs/namespace.c:3887 On PREEMPT_RT the same thing shows up as DEBUG_LOCKS_WARN_ON(rt_mutex_owner(lock) != current) WARNING: kernel/locking/rtmutex_common.h:193 at rt_mutex_slowunlock The up_write() underflows the reset count. A following inode_lock() on that directory then never returns. A path walk into the new directory racing with the mkdir() corrupts the lock the same way via inode_lock_shared() in lookup_slow(). Switch to d_instantiate_new() and drop the trailing unlock_new_inode(). All error paths bail out before that point with I_NEW still set and keep using discard_new_inode(). May we never see this fscking bug report again. The Linux kernel CVE team has assigned CVE-2026-98539 to this issue. Affected and fixed versions =========================== Issue introduced in 5.15 with commit 82cae269cfa953032fbb8980a7d554d60fb00b17 and fixed in 6.12.112 with commit 6fda7121cb6a8ea6fbd77d0f787f04b8e8b5358e Issue introduced in 5.15 with commit 82cae269cfa953032fbb8980a7d554d60fb00b17 and fixed in 6.18.55 with commit 37ec7353f4ac495b28284b0fcb0e53d21d1b3f3f Issue introduced in 5.15 with commit 82cae269cfa953032fbb8980a7d554d60fb00b17 and fixed in 7.2.9 with commit 1ae2a242c15b03470b1b16289298e597bbe3bb29 Issue introduced in 5.15 with commit 82cae269cfa953032fbb8980a7d554d60fb00b17 and fixed in 7.3-rc5 with commit 1abd643f3783ea8f8e273c18697ff0413aa92dc7 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-98539 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/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/6fda7121cb6a8ea6fbd77d0f787f04b8e8b5358e https://git.kernel.org/stable/c/37ec7353f4ac495b28284b0fcb0e53d21d1b3f3f https://git.kernel.org/stable/c/1ae2a242c15b03470b1b16289298e597bbe3bb29 https://git.kernel.org/stable/c/1abd643f3783ea8f8e273c18697ff0413aa92dc7