Skip to contentSkip to conversation

CVE-2026-72190: ntfs: fix mrec_lock ABBA deadlock in rename

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Aug 15

lore
Share & tools
lore
#0 lore raw

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

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

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

ntfs: fix mrec_lock ABBA deadlock in rename

ntfs_file_fsync(), ntfs_dir_fsync() and __ntfs_write_inode() lock an inode's mrec_lock before taking the mrec_lock of its parent directory.

ntfs_rename() takes old_ni->mrec_lock and old_dir_ni->mrec_lock before taking new_ni->mrec_lock for an existing target, or new_dir_ni->mrec_lock for a cross-directory rename.
This can deadlock when ntfs_file_fsync() or __ntfs_write_inode() holds the target inode, or when ntfs_dir_fsync() holds a child target directory, while rename() holds the parent directory and waits for the target.

Fix this by locking the existing target inode before taking any parent directory mrec_lock. For cross-directory renames where the target parent is a descendant of the source parent, lock the target parent before the source parent so the directory order matches the child-to-parent order used by ntfs_file_fsync(), ntfs_dir_fsync(), and __ntfs_write_inode().

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

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

	Issue introduced in 7.1 with commit af0db57d4293cc9fe6ce99fb5592dc2652228c9d and fixed in 7.1.5 with commit b3d09502b80dfe0bab9090ca532710da389f6c7f
	Issue introduced in 7.1 with commit af0db57d4293cc9fe6ce99fb5592dc2652228c9d and fixed in 7.2-rc3 with commit eb94f5a41a193a425e09a63cb75dffd151d8f42e

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

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/ntfs/namei.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/b3d09502b80dfe0bab9090ca532710da389f6c7f
	https://git.kernel.org/stable/c/eb94f5a41a193a425e09a63cb75dffd151d8f42e