CVE-2025-38567 nfsd: avoid ref leak in nfsd_open_local_fh()

Medium 4.7 Published Updated

A race condition in the Linux kernel NFS server causes a reference leak, leading to a hang during shutdown and denial of service.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2025-38567?

CVE-2025-38567 is a medium-severity vulnerability in Linux kernel, published on 19 Aug 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

In the Linux kernel, the following vulnerability has been resolved:

nfsd: avoid ref leak in nfsd_open_local_fh()

If two calls to nfsd_open_local_fh() race and both successfully call nfsd_file_acquire_local(), they will both get an extra reference to the net to accompany the file reference stored in *pnf.

One of them will fail to store (using xchg()) the file reference in *pnf and will drop that reference but WON'T drop the accompanying reference to the net. This leak means that when the nfs server is shut down it will hang in nfsd_shutdown_net() waiting for &nn->nfsd_net_free_done.

This patch adds the missing nfsd_net_put().

Weakness: CWE-362

Which versions are affected by CVE-2025-38567?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2025-38567?

Apply the vendor's patch.

Is CVE-2025-38567 being exploited?

There is no known exploitation of CVE-2025-38567 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2025-38567, GHSA-36x9-553r-v339, UBUNTU-CVE-2025-38567.

Is CVE-2025-38567 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free