CVE-2026-89714: NFS: fix delegation_hash_table leak when nfs4_server_common_setup() fails
In the Linux kernel, the following vulnerability has been resolved:
NFS: fix delegationhashtable leak when nfs4servercommonsetup() fails
nfs4servercommonsetup() allocates server->delegationhashtable first, but server->destroy - the only path that frees the table via nfs4destroyserver() - is not assigned until the very end of the function. If any intermediate step fails (the isdsonlyclient() check, nfs4initsession(), nfs4getrootfh(), or nfsprobeserver()), the function returns with server->destroy still NULL, so the caller's nfsfreeserver() skips the destroy callback and the hash table is leaked (4 KiB per attempt with the default delegation watermark).
This is trivially reachable from userspace: every failed NFSv4 mount leaks one allocation. A client that persistently retries a mount that cannot succeed leaks kernel memory without bound. Observed in production where a Longhorn backup poller retried mount.nfs4 against an NFSv3-only server roughly 10 times per second, leaking ~3.4 GiB of unreclaimable slab (kmalloc-rnd-13-4k) per day; the node accumulated 12 GiB of leaked slab before the source was identified via the kmem:kmalloc tracepoint (callsite=nfs4delegationhashalloc).
Reproducer:
# server exports NFSv3 only (or export path absent for v4) while :; do mount -t nfs4 <server>:/missing /mnt; done # watch SUnreclaim in /proc/meminfo grow 4 KiB per iteration
Free the table on the error paths between the allocation and the assignment of server->destroy.
Affected Software
Event History
Frequently Asked Questions
Which systems are exposed to meaningful memory growth?
Linux systems acting as NFS clients are affected when they repeatedly attempt NFSv4 mounts that fail during server setup. A persistently retried mount to a server that cannot satisfy NFSv4, such as an NFSv3-only server, can cause unbounded kernel-memory leakage.
Does this require a non-default configuration?
No. Each failed NFSv4 mount leaks one delegation hash table allocation, reported as 4 KiB per attempt with the default delegation watermark.
What can be done before a fix is deployed?
Stop or rate-limit automated retries of NFSv4 mounts that cannot succeed, and correct the mount protocol or target-server compatibility. In particular, avoid repeatedly using mount.nfs4 against an NFSv3-only server.
How can administrators investigate suspected impact?
Monitor unreclaimable slab growth during failed NFSv4 mount retries. The reported production case identified the allocations using the kmem:kmalloc tracepoint, with allocations appearing in the kmalloc-rnd-13-4k slab cache and an NFSv4 delegation-related call site.