ZeroHour

CVE-2026-89682

mass

Use-after-free in Linux kernel nfsd file-cache disposal path

CVSS 3.1
8.1 high
EPSS
Published
()
Modified
AI analysis

The Linux kernel's NFS server (nfsd) contains a use-after-free in its file-cache disposal logic: nfsd_file_dispose_list_delayed() defers fput() calls to service threads via a per-network-namespace 'freeme' queue held in a separately allocated struct nfsd_fcache_disposal, which is freed when the network namespace is torn down. However, the global shrinker, the 'laundrette' garbage-collection worker, and fsnotify callbacks can still be executing nfsd_file_dispose_list_delayed() and dereference the freed pointer, triggering a use-after-free. An attacker who can influence this race — for example by inducing memory pressure that invokes the shrinker, or fsnotify activity during namespace teardown — could corrupt kernel memory, with the CVSS 3.1 base score of 8.1 reflecting high impact to confidentiality, integrity, and availability, though attack complexity is high and no exploit is currently known. Any system running an affected kernel that serves NFS via in-kernel nfsd (typically Linux servers and NAS appliances, including containers or environments where network namespaces are created and destroyed) is potentially exposed. The fix eliminates the separate allocation by inlining the disposal lock and list into struct nfsd_net, giving them the same lifetime as the network namespace itself; no public proof-of-concept exists and the flaw is not listed in CISA's KEV catalog.

What to do: Apply a kernel update containing the nfsd fcache disposal fix (which inlines the disposal state into struct nfsd_net) as soon as your distribution ships it, prioritizing multi-tenant hosts, NFS servers, and systems with heavy container/network-namespace churn. Do not expose NFS (port 2049) to the internet — restrict it to trusted internal networks with firewall rules. If patching must be deferred, monitor for kernel oops/panic traces in nfsd_file_dispose_list_delayed or memory-pressure-driven shrinker paths and consider limiting unprivileged network-namespace creation.

Affected
Linux kernel (nfsd file cache)
Estimated exposure
massHundreds of thousands of internet-exposed NFS servers (port 2049) plus a larger uncounted population of internal NFS deployments — Public internet scan data (Shodan/Censys-style counts of hosts with TCP/2049 open) consistently shows on the order of a few hundred thousand exposed nfsd endpoints, and NFS is predominantly deployed on internal networks that are not…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

In the Linux kernel, the following vulnerability has been resolved: nfsd: fix fcache_disposal UAF by inlining dispose state into nfsd_net nfsd_file_dispose_list_delayed() 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 nfsd_fcache_disposal that is freed by nfsd_free_fcache_disposal_net() during per-net teardown. The global shrinker, laundrette, and fsnotify callbacks can still be inside nfsd_file_dispose_list_delayed() dereferencing that pointer, causing a use-after-free. Inline the spinlock and freeme list directly into struct nfsd_net (as fcache_dispose_lock and fcache_dispose_list), eliminating the separately allocated struct nfsd_fcache_disposal entirely. These fields now have the same lifetime as the net namespace itself, so there is no dangling pointer to chase. nfsd_file_cache_start_net() now just initializes the inline fields and cannot fail due to allocation. nfsd_file_cache_shutdown_net() drains the inline list directly instead of freeing a separate struct. The alloc/free helpers are removed.

Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

In the news

No ingested article mentions this CVE yet.