CVE-2026-89682: nfsd: fix fcache_disposal UAF by inlining dispose state into nfsd_net
In the Linux kernel, the following vulnerability has been resolved:
nfsd: fix fcachedisposal UAF by inlining dispose state into nfsdnet
nfsdfiledisposelistdelayed() defers fput() to nfsd service threads via a per-net freeme queue, preventing the shrinker and GC worker from bearing the cost of closing files (see ffb402596147). However, the queue lives in a separately-allocated struct nfsdfcachedisposal that is freed by nfsdfreefcachedisposalnet() during per-net teardown. The global shrinker, laundrette, and fsnotify callbacks can still be inside nfsdfiledisposelistdelayed() dereferencing that pointer, causing a use-after-free.
Inline the spinlock and freeme list directly into struct nfsdnet (as fcachedisposelock and fcachedisposelist), eliminating the separately allocated struct nfsdfcachedisposal entirely. These fields now have the same lifetime as the net namespace itself, so there is no dangling pointer to chase.
nfsdfilecachestartnet() now just initializes the inline fields and cannot fail due to allocation. nfsdfilecacheshutdownnet() drains the inline list directly instead of freeing a separate struct. The alloc/free helpers are removed.
Affected Software
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Linux systems running the kernel NFS server (nfsd) are relevant. The vulnerable path involves per-network-namespace teardown and NFS file-cache disposal activity.
What conditions can trigger the use-after-free?
The issue occurs when the per-network file-cache disposal structure is freed during teardown while global shrinker, laundrette, or fsnotify callbacks are still executing deferred file-disposal code that dereferences it.
How can I determine whether a kernel includes the fix?
Check whether the kernel contains the change that removes the separately allocated nfsd_fcache_disposal structure and instead places fcache_dispose_lock and fcache_dispose_list directly in struct nfsd_net. The referenced stable commits document fixes for this issue.