UBUNTU-CVE-2026-89661: Use After Free
In the Linux kernel, the following vulnerability has been resolved: NFSD: Prevent post-shutdown use-after-free in unlockfilesystem Writing a filesystem path to /proc/fs/nfsd/unlockfilesystem runs nfsd4cancelcopybysb() before nfsdmutex is held and before the handler confirms that nn->nfsdserv is set. Once nfsd has shut down, nfs4statedestroynet() has freed nn->confidhashtbl but left the pointer intact, so the cancel helper iterates freed slab memory as an array of struct listhead and then dereferences a bogus nfs4client when it takes clp->asynclock. A local administrator holding CAPSYSADMIN can reach this use-after-free by stopping the server and then writing to unlockfilesystem; KASAN reports a slab-use-after-free read in nfsd4cancelcopybysb(). nfsd4revokestates() walks the same state tables and for that reason already runs only under nfsdmutex with nn->nfsdserv confirmed present. Move the async COPY cancel into that protected section so every NFSv4 state-table walker on this path observes a running server. Async copies exist only while the server runs, so gating the cancel on nn->nfsdserv loses nothing.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ubuntu/linux-hwe-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42~24.04.1 - Upgrade
Upgrade
ubuntu/linux-riscv-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1~24.04.1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 7.0.0-42.42 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 7.0.0-1016.17 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 7.0.0-1016.18 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oem-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 7.0.0-1015.16 - Upgrade
Upgrade
ubuntu/linux-riscvto a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1
Event History
Frequently Asked Questions
Who can trigger this issue?
A local administrator with CAP_SYS_ADMIN can trigger it. The described path requires stopping the NFS server and then writing a filesystem path to /proc/fs/nfsd/unlock_filesystem.
Are systems without an active NFS server exposed?
The vulnerable sequence occurs after nfsd has shut down. The triggering write targets the NFS server control interface, so exposure depends on access to /proc/fs/nfsd/unlock_filesystem and the ability to stop nfsd.
How can I identify a possible occurrence?
KASAN can report a slab-use-after-free read in nfsd4_cancel_copy_by_sb(). The issue is associated with a write to unlock_filesystem after NFS server shutdown.
What temporary mitigation is supported by the available information?
Prevent untrusted users from obtaining CAP_SYS_ADMIN and from writing to /proc/fs/nfsd/unlock_filesystem. Avoid writing to that interface after stopping the NFS server until the fix is applied.