CVE-2025-71090: nfsd: fix nfsd_file reference leak in nfsd4_add_rdaccess_to_wrdeleg()
In the Linux kernel, the following vulnerability has been resolved:
nfsd: fix nfsdfile reference leak in nfsd4addrdaccesstowrdeleg()
nfsd4addrdaccesstowrdeleg() unconditionally overwrites fp->fifds[ORDONLY] with a newly acquired nfsdfile. However, if the client already has a SHAREACCESSREAD open from a previous OPEN operation, this action overwrites the existing pointer without releasing its reference, orphaning the previous reference.
Additionally, the function originally stored the same nfsdfile pointer in both fp->fifds[ORDONLY] and fp->firdelegfile with only a single reference. When putdelegfile() runs, it clears firdelegfile and calls nfs4fileputaccess() to release the file.
However, nfs4fileputaccess() only releases fifds[ORDONLY] when the fiaccess[ORDONLY] counter drops to zero. If another READ open exists on the file, the counter remains elevated and the nfsdfile reference from the delegation is never released. This potentially causes open conflicts on that file.
Then, on server shutdown, these leaks cause nfsdfilecachepurge() to encounter files with an elevated reference count that cannot be cleaned up, ultimately triggering a BUG() in kmemcachedestroy() because there are still nfsdfile objects allocated in that cache.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2025-71090?
CVE-2025-71090 is classified as a medium severity vulnerability in the Linux kernel.
How do I fix CVE-2025-71090?
To fix CVE-2025-71090, you should update your Linux kernel to the latest patched version provided by your distribution.
What systems are affected by CVE-2025-71090?
CVE-2025-71090 affects all versions of the Linux kernel that include the nfsd_file reference leak.
What does CVE-2025-71090 exploit?
CVE-2025-71090 exploits a reference leak in the nfsd4_add_rdaccess_to_wrdeleg() function within the NFS server.
Is CVE-2025-71090 a remote code execution vulnerability?
No, CVE-2025-71090 is primarily a reference leak vulnerability and does not directly lead to remote code execution.