CVE-2026-89670
nicheUse-After-Free Race in Linux Kernel nfsd Localio File Handling
The Linux kernel's NFS daemon (nfsd) localio path contains a use-after-free race in nfsd_open_local_fh(), where a pointer obtained via cmpxchg can reference an nfsd_file object that was already freed through call_rcu and whose backing slab page (created without SLAB_TYPESAFE_BY_RCU) has been recycled after the RCU grace period elapsed. A racing nfsd_file_put_local on another CPU triggers the flaw, causing refcount_inc_not_zero to operate on recycled memory; a non-zero word at the nf_ref offset makes the increment appear to succeed, after which the caller dereferences new->nf_net and new->nf_file out of freed memory. A local attacker with low privileges who can race this code path can corrupt kernel memory, with the CVSS assessment (7.8, AV:L/PR:L, C:H/I:H/A:H) indicating potential full compromise of confidentiality, integrity, and availability — in practice a plausible local privilege escalation to kernel-level code execution. Only systems running the kernel NFS server together with same-host NFS clients using the localio fast path are exposed to this code. No public proof of concept is known and the issue is not listed in CISA's KEV catalog.
What to do: Apply kernel updates from your distribution once the fix (holding rcu_read_lock across the cmpxchg retry in nfsd_open_local_fh) is backported, and reboot to load the patched kernel. On hosts using same-host nfsd localio, restrict unprivileged local code execution and container workloads until patched. Check whether NFS localio is actually in use (kernel nfsd plus local NFS mounts) to prioritize patching of the genuinely exposed systems.
| Linux kernel (nfsd localio, nfsd_open_local_fh) | — |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
In the Linux kernel, the following vulnerability has been resolved: nfsd: hold rcu across localio cmpxchg retry nfsd_file objects are freed via call_rcu (filecache.c:296), and nfsd_file_slab is created without SLAB_TYPESAFE_BY_RCU (KMEM_CACHE(nfsd_file, 0) at filecache.c:789), so the slab page backing a freed nfsd_file becomes freely reclaimable once the RCU grace period elapses. The again: retry block in nfsd_open_local_fh() loads a pointer with cmpxchg and then calls nfsd_file_get(new) (which is refcount_inc_not_zero) without holding rcu_read_lock. The sole caller nfs_open_local_fh() drops rcu_read_lock before invoking this helper, so no outer reader-side critical section covers the load. CPU 0 (nfsd_open_local_fh) CPU 1 (nfsd_file_put_local) ----- ----- new = cmpxchg(pnf, NULL, ...) nf = xchg(pnf, NULL) nfsd_file_put(nf) last ref -> call_rcu() /* grace period elapses; slab page recycled */ nfsd_file_get(new) refcount_inc_not_zero(&new->nf_ref) /* operates on recycled memory */ A non-zero word at the nf_ref offset of the recycled object makes the refcount bump appear to succeed, and the caller then dereferences new->nf_net and new->nf_file out of freed memory. Fix by taking rcu_read_lock() immediately before the cmpxchg and releasing it on all three exits of the if (new) block: the goto-again retry, the lost-race cleanup path, and the install-succeeded path. nfsd_file_put() and nfsd_net_put() stay outside the RCU section so they remain free to block.
- Vector
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
In the news0 stories
No ingested article mentions this CVE yet.