ntfs: avoid self-deadlock during inode eviction
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ntfs: avoid self-deadlock during inode eviction
An attribute-list update performed while allocating clusters can drop the last reference to the temporary attribute inode. Evicting that inode drops its reference to the base inode and can invoke ntfs_drop_big_inode() for the base inode from within the base inode's own writeback path.
If the base inode is unlinked, ntfs_drop_big_inode() calls truncate_setsize(), which waits for the inode's folio writeback to complete. The same writeback worker is responsible for completing that writeback, so it waits for itself indefinitely.
Prevent this self-deadlock by grabbing a reference to the base inode at the beginning of ntfs_writepages() and releasing it at the end of the function. This defers eviction until all bios have been submitted, allowing the wait for folio writeback to complete safely.
From the CVE record · Linux
The Linux kernel's NTFS writeback path can deadlock during inode eviction. If an attribute-list update drops the last reference to a temporary attribute inode while its unlinked base inode is being written back, the writeback worker can wait indefinitely for itself. The input does not specify attacker access requirements or user interaction.
Engineers running Linux kernels with NTFS support should check whether their kernel includes this fix; affected versions are not specified.