CVE-2026-89709
largeUse-after-free in Linux kernel lockd/nfsd nlmsvc_ops dispatch (module unload race)
The Linux kernel's lockd file-locking service dereferences the nlmsvc_ops callback table without any synchronization, while the nfsd module publishes and clears that pointer with plain stores during module load/unload. If the nfsd kernel module is unloaded (rmmod) while lockd is servicing an NLM request from fs/lockd/svcsubs.c, lockd can load a stale pointer, producing either a NULL dereference or a use-after-free against nfsd's unloaded module text. Successful exploitation of the race would let an attacker crash the kernel (denial of service) and potentially execute code in kernel context, though the CVSS attack complexity is high because the window depends on the module-teardown race. Affected systems are Linux machines running the NFS server with NFSv3/lockd locking enabled and nfsd built as a loadable module. The upstream fix RCU-protects the pointer and pins the module with try_module_get/module_put across indirect calls; no public PoC or exploitation in the wild is known.
What to do: Apply distribution kernel updates containing the fix that RCU-protects nlmsvc_ops and pins the nfsd module (try_module_get/module_put) across indirect calls. Operationally, avoid unloading the nfsd/lockd modules while NFS shares or NLM locking activity is live — stop NFS services and quiesce lock state first. Review kernel logs on NFS servers for lockd oopses or use-after-free splats as an indicator of the race having been hit.
| Linux kernel (fs/lockd and fs/nfsd, NLM/NFS server locking) | — |
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: lockd, nfsd: RCU-protect nlmsvc_ops dispatch nlmsvc_ops is published by nfsd_lockd_init() and cleared by nfsd_lockd_shutdown() with plain stores, while lockd dereferences it unguarded from dispatch sites in fs/lockd/svcsubs.c. The pointer targets nfsd's .rodata and the fopen/fclose callbacks live in nfsd's .text, so a stale load after rmmod nfsd results in either a NULL deref or a module-text use-after-free. Declare nlmsvc_ops as __rcu, publish via rcu_assign_pointer(), clear via RCU_INIT_POINTER() + synchronize_rcu(). Add a struct module *owner field to nlmsvc_binding and pin the module across indirect calls with try_module_get/module_put. When the binding is torn down, fall back to fput() to avoid leaking struct file references.
- Vector
- CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
In the news0 stories
No ingested article mentions this CVE yet.