CVE-2026-43245: ntfs: ->d_compare() must not block
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
ntfs: ->d_compare() must not block
... so don't use __getname() there. Switch it (and ntfs_d_hash(), while we are at it) to kmalloc(PATH_MAX, GFP_NOWAIT). Yes, ntfs_d_hash() almost certainly can do with smaller allocations, but let ntfs folks deal with that - keep the allocation size as-is for now.
Stop abusing names_cachep in ntfs, period - various uses of that thing in there have nothing to do with pathnames; just use k[mz]alloc() and be done with that. For now let's keep sizes as-in, but AFAICS none of the users actually want PATH_MAX.
The Linux kernel CVE team has assigned CVE-2026-43245 to this issue.
Affected and fixed versions
===========================
Fixed in 6.18.16 with commit 142c444a395f4d26055c8a4473e228bb86283f1e Fixed in 6.19.6 with commit fb4b1f969ba01fa1d4088467a02fc1e5f0806710 Fixed in 7.0 with commit ca2a04e84af79596e5cd9cfe697d5122ec39c8ce
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-43245
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/dir.c fs/ntfs3/fsntfs.c fs/ntfs3/inode.c fs/ntfs3/namei.c fs/ntfs3/xattr.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/142c444a395f4d26055c8a4473e228bb86283f1e https://git.kernel.org/stable/c/fb4b1f969ba01fa1d4088467a02fc1e5f0806710 https://git.kernel.org/stable/c/ca2a04e84af79596e5cd9cfe697d5122ec39c8ce