NFSD: fix nfs4_file access extra count in nfsd4_add_rdaccess_to_wrdeleg
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
06.18.337.0.107.1In the Linux kernel, the following vulnerability has been resolved:
NFSD: fix nfs4_file access extra count in nfsd4_add_rdaccess_to_wrdeleg
In nfsd4_add_rdaccess_to_wrdeleg, if fp->fi_fds[O_RDONLY] is already set by another thread, __nfs4_file_get_access should not be called to increment the nfs4_file access count since that was already done by the thread that added READ access to the file. The extra fi_access count in nfs4_file can prevent the corresponding nfsd_file from being freed.
When stopping nfs-server service, these extra access counts trigger a BUG in kmem_cache_destroy() that shows nfsd_file object remaining on __kmem_cache_shutdown.
This problem can be reproduced by running the Git project's test suite over NFS.
From the CVE record · Linux
A race in Linux kernel NFSD can add an extra file access count when another thread has already added READ access. The count can prevent an nfsd_file from being freed and trigger a kernel BUG when the NFS server service stops. The issue can be reproduced by running the Git test suite over NFS; the input does not establish authentication requirements or a specific attacker action.
Operators running the Linux kernel's NFS server should check their affected kernel versions against the vendor advisory; no version range was provided.