In the Linux kernel, the following vulnerability has been resolved:
nfsd: set SC_STATUS_FREED in nfsd4_drop_revoked_stid for delegations
nfsd4_drop_revoked_stid() handles FREE_STATEID for admin-revoked
delegations but does not set SC_STATUS_FREED before releasing cl_lock.
revoke_delegation() uses this flag to detect whether FREE_STATEID has
already processed the delegation -- without it, the freed delegation is
added to cl_revoked via list_add(), producing a use-after-free when
cl_revoked is later traversed in __destroy_client().
The SC_STATUS_REVOKED path in nfsd4_free_stateid() (line 7983) already
sets SC_STATUS_FREED correctly. Apply the same pattern to the
SC_STATUS_ADMIN_REVOKED path in nfsd4_drop_revoked_stid().
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 nfsd4_drop_revoked_stid()/revoke_delegation() in fs/nfsd/nfs4state.c. A remote NFSv4 peer reaches it over TCP/2049 via svc_process to nfsd_dispatch to nfsd4_proc_compound: SEQUENCE then FREE_STATEID (ALLOWED_WITHOUT_FH), or a v4.0 op that hits nfsd40_drop_revoked_stid on an admin-revoked delegation.
AC:L - The attacker holds a delegation and retries FREE_STATEID (or v4.0 use of that stateid) while nfsd4_revoke_states() unhashes with ADMIN_REVOKED and revoke_delegation() runs, then DESTROY_CLIENTID/expire so __destroy_client() walks cl_revoked. They control the NFS side of the race; unexport is a routine nfsd operational condition, not an uninfluenced layout.
PR:N - Typical nfsd deployments use AUTH_SYS/AUTH_NULL with no cryptographic RPC authentication. Any host allowed by the export can EXCHANGE_ID/CREATE_SESSION or SETCLIENTID, OPEN to receive a delegation, and issue FREE_STATEID; no local Linux account or capability on the NFS server is required.
UI:N - The attacker sends the NFSv4 compounds that obtain the delegation, FREE_STATEID, and client teardown. Administrative unlock_filesystem/unexport is a server operational condition (exportfs -u or volume detach), not a required victim user action such as mounting or opening a file.
S:U - The use-after-free corrupts a kmalloc'd nfs4_delegation (deleg_slab) in the NFS server kernel. Impact stays in that host kernel security authority and does not cross a VM, IOMMU, or sandbox boundary.
C:H - Without SC_STATUS_FREED, revoke_delegation() list_add()s a kmem_cache_free'd nfs4_delegation onto cl_revoked (KMEM_CACHE flags 0, not SLAB_TYPESAFE_BY_RCU). __destroy_client() then walks that freed object; slab reuse yields an arbitrary kernel-read primitive. Per guidance a UAF is C:H.
I:H - list_add on the freed dl_recall_lru and later list_del_init/nfs4_put_stid in __destroy_client() write through reclaimed deleg_slab, including sc_free. That is a heap-spray write and control-flow hijack primitive. Per guidance a UAF is I:H.
A:H - Use-after-free of nfs4_delegation when __destroy_client() traverses cl_revoked oopses or panics the nfsd thread even without full exploitation, fully denying service of the NFS server host.
| 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 nfsd4_drop_revoked_stid()/revoke_delegation() in fs/nfsd/nfs4state.c. A remote NFSv4 peer reaches it over TCP/2049 via svc_process to nfsd_dispatch to nfsd4_proc_compound: SEQUENCE then FREE_STATEID (ALLOWED_WITHOUT_FH), or a v4.0 op that hits nfsd40_drop_revoked_stid on an admin-revoked delegation.
AC:L - The attacker holds a delegation and retries FREE_STATEID (or v4.0 use of that stateid) while nfsd4_revoke_states() unhashes with ADMIN_REVOKED and revoke_delegation() runs, then DESTROY_CLIENTID/expire so __destroy_client() walks cl_revoked. They control the NFS side of the race; unexport is a routine nfsd operational condition, not an uninfluenced layout.
PR:N - Typical nfsd deployments use AUTH_SYS/AUTH_NULL with no cryptographic RPC authentication. Any host allowed by the export can EXCHANGE_ID/CREATE_SESSION or SETCLIENTID, OPEN to receive a delegation, and issue FREE_STATEID; no local Linux account or capability on the NFS server is required.
UI:N - The attacker sends the NFSv4 compounds that obtain the delegation, FREE_STATEID, and client teardown. Administrative unlock_filesystem/unexport is a server operational condition (exportfs -u or volume detach), not a required victim user action such as mounting or opening a file.
S:U - The use-after-free corrupts a kmalloc'd nfs4_delegation (deleg_slab) in the NFS server kernel. Impact stays in that host kernel security authority and does not cross a VM, IOMMU, or sandbox boundary.
C:H - Without SC_STATUS_FREED, revoke_delegation() list_add()s a kmem_cache_free'd nfs4_delegation onto cl_revoked (KMEM_CACHE flags 0, not SLAB_TYPESAFE_BY_RCU). __destroy_client() then walks that freed object; slab reuse yields an arbitrary kernel-read primitive. Per guidance a UAF is C:H.
I:H - list_add on the freed dl_recall_lru and later list_del_init/nfs4_put_stid in __destroy_client() write through reclaimed deleg_slab, including sc_free. That is a heap-spray write and control-flow hijack primitive. Per guidance a UAF is I:H.
A:H - Use-after-free of nfs4_delegation when __destroy_client() traverses cl_revoked oopses or panics the nfsd thread even without full exploitation, fully denying service of the NFS server host.
CVSS 3.1