CVE-2025-21795 NFSD: fix hang in nfsd4_shutdown_callback

High 7.5 Published Updated

A flaw in the Linux kernel's NFSD module causes a hang when shutting down callbacks for courtesy clients, leading to a denial of service.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2025-21795?

CVE-2025-21795 is a high-severity denial of service vulnerability in Linux kernel, published on 27 Feb 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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

NFSD: fix hang in nfsd4_shutdown_callback

If nfs4_client is in courtesy state then there is no point to send the callback. This causes nfsd4_shutdown_callback to hang since cl_cb_inflight is not 0. This hang lasts about 15 minutes until TCP notifies NFSD that the connection was dropped.

This patch modifies nfsd4_run_cb_work to skip the RPC call if nfs4_client is in courtesy state.

Which versions are affected by CVE-2025-21795?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2025-21795?

Apply the vendor's patch.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2025-21795 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2025-21795, DEBIAN-CVE-2025-21795, GHSA-v47h-hxgq-326f, ROOT-OS-UBUNTU-2404-CVE-2025-21795, UBUNTU-CVE-2025-21795.

Is CVE-2025-21795 in your software?

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

Check your SBOMs for free