CVE-2026-89659: NFSD: Prevent client use-after-free during delegation revoke
In the Linux kernel, the following vulnerability has been resolved:
NFSD: Prevent client use-after-free during delegation revoke
A delegation stateid holds only a bare pointer to its owning nfs4client and does not keep it alive. The client survives its stateids only because destroyclient() drains cldelegations and clrevoked before freeclient() runs.
nfs4laundromat() breaks that invariant: it unhashes an expired delegation from cldelegations, drops deleglock, then revokedelegation() relinks it onto clrevoked under cllock. In that window the delegation is on neither list, so clienthasstate() can report no remaining state.
Every teardown path first requires clrpcusers to be zero, but the laundromat holds no such reference. A client whose recalled delegation has just timed out can therefore reach freeclient() while revokedelegation() is still about to dereference cllock, a use-after-free.
Pin the client with clrpcusers across the revoke so teardown blocks until it completes, then reap the delegation from clrevoked. A client already expiring reaps its own, so skip it and leave the delegation on delrecalllru.
Affected Software
Event History
Frequently Asked Questions
Which deployments are exposed to this race?
Systems using the Linux kernel NFSD server are relevant. The race involves an NFSv4 client with a recalled delegation that has timed out while that client is also being torn down.
What conditions are needed for the use-after-free to occur?
The laundromat must remove an expired delegation from the client's delegation list and, before it relinks the delegation to the revoked list, client teardown must conclude that no state remains and free the client. The revoke path can then dereference the freed client's lock.
What does the fix change to prevent the race?
It holds a cl_rpc_users reference on the client throughout delegation revocation, preventing teardown until revocation is complete. It also avoids reaping a delegation through this path when the client is already expiring, leaving that delegation on the recall LRU.