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
nfs4_client and does not keep it alive. The client survives its
stateids only because __destroy_client() drains cl_delegations and
cl_revoked before free_client() runs.
nfs4_laundromat() breaks that invariant: it unhashes an
expired delegation from cl_delegations, drops deleg_lock, then
revoke_delegation() relinks it onto cl_revoked under cl_lock. In that
window the delegation is on neither list, so client_has_state() can
report no remaining state.
Every teardown path first requires cl_rpc_users to be zero, but
the laundromat holds no such reference. A client whose recalled
delegation has just timed out can therefore reach free_client()
while revoke_delegation() is still about to dereference cl_lock,
a use-after-free.
Pin the client with cl_rpc_users across the revoke so teardown blocks
until it completes, then reap the delegation from cl_revoked. A client
already expiring reaps its own, so skip it and leave the delegation on
del_recall_lru.
CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS Score: 9.8
AV:N - The bug is in nfsd nfs4_laundromat()/revoke_delegation() in fs/nfsd/nfs4state.c. A remote NFSv4 client reaches it over TCP/2049 by OPEN to obtain a delegation, a conflicting OPEN to force CB_RECALL, then DESTROY_CLIENTID or CREATE_SESSION replacement while the laundromat revokes.
AC:L - The attacker controls both sides: it creates the recalled delegation, learns FATTR4_LEASE_TIME, and issues DESTROY_CLIENTID or same-name CREATE_SESSION/SETCLIENTID_CONFIRM while laundromat unhashes. Many recalled delegations widen the unhash-to-revoke window, and the sequence is retryable.
PR:N - Default AUTH_SYS nfsd exports do no cryptographic authentication; any host allowed by the export ACL can EXCHANGE_ID/SETCLIENTID, OPEN to get a delegation, and DESTROY_CLIENTID. No local account or capability on the NFS server is required.
UI:N - The attacking NFS client performs the full sequence itself (delegation, recall, teardown). No local user or administrator action on the NFS server is required at attack time.
S:U - The use-after-free corrupts the nfs4_client object in the host kernel's nfsd state tables. Impact stays in that kernel security authority and does not cross a VM, IOMMU, or sandbox boundary.
C:H - revoke_delegation() and nfs4_put_stid() dereference sc_client (cl_lock, cl_revoked, cl_stateids) after free_client() kmem_cache_free's the mergeable client_slab object (KMEM_CACHE flags 0), a UAF the attacker can reallocate via EXCHANGE_ID to disclose kernel memory.
I:H - The UAF writes include spin_lock/unlock of freed cl_lock, list_add onto cl_revoked, and refcount_dec_and_lock in nfs4_put_stid on a reclaimable nfs4_client, enabling heap corruption and control-flow hijack.
A:H - Use-after-free of nfs4_client in an nfsd/laundromat thread oopses or panics the NFS server even without full exploitation, and the attacker can repeat the RPC sequence to deny service.
| Attack Vector |
Network |
Scope |
Unchanged |
| Attack Complexity |
Low |
Confidentiality Impact |
High |
| Privileges Required |
None |
Integrity Impact |
High |
| User Interaction |
None |
Availability Impact |
High |
AV:N - The bug is in nfsd nfs4_laundromat()/revoke_delegation() in fs/nfsd/nfs4state.c. A remote NFSv4 client reaches it over TCP/2049 by OPEN to obtain a delegation, a conflicting OPEN to force CB_RECALL, then DESTROY_CLIENTID or CREATE_SESSION replacement while the laundromat revokes.
AC:L - The attacker controls both sides: it creates the recalled delegation, learns FATTR4_LEASE_TIME, and issues DESTROY_CLIENTID or same-name CREATE_SESSION/SETCLIENTID_CONFIRM while laundromat unhashes. Many recalled delegations widen the unhash-to-revoke window, and the sequence is retryable.
PR:N - Default AUTH_SYS nfsd exports do no cryptographic authentication; any host allowed by the export ACL can EXCHANGE_ID/SETCLIENTID, OPEN to get a delegation, and DESTROY_CLIENTID. No local account or capability on the NFS server is required.
UI:N - The attacking NFS client performs the full sequence itself (delegation, recall, teardown). No local user or administrator action on the NFS server is required at attack time.
S:U - The use-after-free corrupts the nfs4_client object in the host kernel's nfsd state tables. Impact stays in that kernel security authority and does not cross a VM, IOMMU, or sandbox boundary.
C:H - revoke_delegation() and nfs4_put_stid() dereference sc_client (cl_lock, cl_revoked, cl_stateids) after free_client() kmem_cache_free's the mergeable client_slab object (KMEM_CACHE flags 0), a UAF the attacker can reallocate via EXCHANGE_ID to disclose kernel memory.
I:H - The UAF writes include spin_lock/unlock of freed cl_lock, list_add onto cl_revoked, and refcount_dec_and_lock in nfs4_put_stid on a reclaimable nfs4_client, enabling heap corruption and control-flow hijack.
A:H - Use-after-free of nfs4_client in an nfsd/laundromat thread oopses or panics the NFS server even without full exploitation, and the attacker can repeat the RPC sequence to deny service.
CVSS 3.1