In the Linux kernel, the following vulnerability has been resolved:
NFSD: Prevent client use-after-free during NFSv4.0 revoked-state cleanup
nfs40_clean_admin_revoked() takes a stateid reference under
clp->cl_lock, drops nn->client_lock, and calls
nfsd4_drop_revoked_stid(), which dereferences the stateid's client
through s->sc_client->cl_lock. The stateid reference does not pin the
client, so a teardown racing the dropped lock can free the client
while nfsd4_drop_revoked_stid() is still using it.
This cleanup runs from the laundromat, so a periodic sweep can race
force_expire_client() driven by a write to the clients/<id>/ctl file.
Skip a client that is already expiring and otherwise pin it with
cl_rpc_users under client_lock before dropping the lock, matching
nfsd4_revoke_states().
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 UAF is in nfsd NFSv4.0 revoked-state cleanup (nfs40_clean_admin_revoked). A remote peer reaches it over TCP/2049 via nfsd_dispatch to nfsd4_proc_compound: SETCLIENTID/SETCLIENTID_CONFIRM (ALLOWED_WITHOUT_FH) call expire_client() while the laundromat still uses the client.
AC:L - The attacker controls the expire side by retrying SETCLIENTID_CONFIRM around the known lease interval, or by inducing the documented clients/<id>/ctl expire of a misbehaving client. Cleanup drops client_lock without pinning cl_rpc_users, so mark_client_expired_locked succeeds; this is not a race outside attacker influence.
PR:N - OP_SETCLIENTID and OP_SETCLIENTID_CONFIRM are ALLOWED_WITHOUT_FH/ALLOWED_ON_ABSENT_FS with no export check. Typical nfsd AUTH_SYS/AUTH_NULL deployments never verify RPC credentials, so any host that can reach TCP/2049 can create NFSv4.0 state and trigger the expire.
UI:N - The attacker drives the NFS compounds that establish state and expire the client. Administrative revoke or ctl expire is a server operational condition (unexport or response to a misbehaving client), not a required victim user action.
S:U - The freed object is struct nfs4_client in the NFS server kernel. Impact remains in that kernel security authority; there is no VM, IOMMU, or sandbox boundary crossing.
C:H - nfsd4_drop_revoked_stid() and nfs4_put_stid() dereference s->sc_client after expire_client() frees the nfs4_client. Reclaim of that slab lets an attacker groom contents and disclose kernel memory. Per kernel guidance a UAF is C:H.
I:H - nfs4_put_stid() lock-and-idr_remove on the freed client's cl_lock/cl_stateids, concurrent with __destroy_client() list walks, is a slab UAF write primitive usable for heap corruption and control-flow hijacking. Per kernel guidance a UAF is I:H.
A:H - Use of the freed nfs4_client spinlock, IDR, and lists oopses or panics the nfsd host, fully denying service of the NFS server.
| 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 UAF is in nfsd NFSv4.0 revoked-state cleanup (nfs40_clean_admin_revoked). A remote peer reaches it over TCP/2049 via nfsd_dispatch to nfsd4_proc_compound: SETCLIENTID/SETCLIENTID_CONFIRM (ALLOWED_WITHOUT_FH) call expire_client() while the laundromat still uses the client.
AC:L - The attacker controls the expire side by retrying SETCLIENTID_CONFIRM around the known lease interval, or by inducing the documented clients/<id>/ctl expire of a misbehaving client. Cleanup drops client_lock without pinning cl_rpc_users, so mark_client_expired_locked succeeds; this is not a race outside attacker influence.
PR:N - OP_SETCLIENTID and OP_SETCLIENTID_CONFIRM are ALLOWED_WITHOUT_FH/ALLOWED_ON_ABSENT_FS with no export check. Typical nfsd AUTH_SYS/AUTH_NULL deployments never verify RPC credentials, so any host that can reach TCP/2049 can create NFSv4.0 state and trigger the expire.
UI:N - The attacker drives the NFS compounds that establish state and expire the client. Administrative revoke or ctl expire is a server operational condition (unexport or response to a misbehaving client), not a required victim user action.
S:U - The freed object is struct nfs4_client in the NFS server kernel. Impact remains in that kernel security authority; there is no VM, IOMMU, or sandbox boundary crossing.
C:H - nfsd4_drop_revoked_stid() and nfs4_put_stid() dereference s->sc_client after expire_client() frees the nfs4_client. Reclaim of that slab lets an attacker groom contents and disclose kernel memory. Per kernel guidance a UAF is C:H.
I:H - nfs4_put_stid() lock-and-idr_remove on the freed client's cl_lock/cl_stateids, concurrent with __destroy_client() list walks, is a slab UAF write primitive usable for heap corruption and control-flow hijacking. Per kernel guidance a UAF is I:H.
A:H - Use of the freed nfs4_client spinlock, IDR, and lists oopses or panics the nfsd host, fully denying service of the NFS server.
CVSS 3.1