In the Linux kernel, the following vulnerability has been resolved:
NFSD: Prevent lock owner use-after-free during client teardown
__destroy_client() releases a client's open owners, but a lock owner
whose only reference is a blocked lock (nbl) stays on
cl_ownerstr_hashtbl. client_has_state() does not count a bare owner,
so DESTROY_CLIENTID can reach __destroy_client() with such owners
present.
__destroy_client() then walks the table, calling remove_blocked_locks()
on each owner without a reference. Freeing a blocked lock drops the
owner reference held via flc_owner. The per-net laundromat reaps
blocked locks from nn->blocked_locks_lru independently of client state.
The two paths share blocked_locks_lock only for the list splice, not
the owner's lifetime. The laundromat therefore frees the owner as
__destroy_client() dereferences it, a NULL dereference in
remove_blocked_locks().
nfsd4_release_lockowner() holds a reference across the same call;
__destroy_client() does not. Hold cl_lock across the walk, taking a
reference and unhashing each owner, then drop it before
remove_blocked_locks() and nfs4_put_stateowner(), which take
blocked_locks_lock and cl_lock.
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 NFSv4.1 client teardown and blocked-lock handling, reached by remote COMPOUND RPCs on the in-kernel NFS server (TCP/UDP 2049). A network client drives EXCHANGE_ID, CREATE_SESSION, OPEN, blocking LOCK, DESTROY_SESSION, and DESTROY_CLIENTID into __destroy_client().
AC:L - The attacker controls both sides of the race: one client holds a conflicting lock while another queues a blocked lock, then DESTROY_CLIENTID races with lock-grant/CB_NOTIFY_LOCK or the laundromat freeing that lockowner. Concurrent NFS requests create the race, and it can be retried.
PR:N - Typical nfsd deployments use AUTH_SYS, which does not cryptographically authenticate the client. A remote peer that can reach an export can create NFSv4.1 state and issue DESTROY_CLIENTID without a local account or kernel capabilities on the server.
UI:N - Exploitation requires only attacker-sent NFS RPCs against a running nfsd export. No victim user action such as mounting a filesystem or opening a local file on the server is required.
S:U - The use-after-free occurs in kernel nfsd lock-owner state on the NFS server host and does not cross a separate security authority such as a VM, guest/host, or IOMMU boundary.
C:H - This is a use-after-free of the nfs4_lockowner slab object. Reclaiming the freed owner lets an attacker control later reads of so_client and related pointers in remove_blocked_locks(), yielding a kernel information-disclosure primitive.
I:H - The same UAF is exploitable for integrity: the freed lockowner includes so_ops function pointers and lo_blocked list heads, so heap reuse can hijack control flow or corrupt list pointers for an arbitrary kernel write.
A:H - The bug is a kernel use-after-free of the lock owner and was observed as a NULL dereference in remove_blocked_locks(), which can oops or panic nfsd and take down the 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 bug is in nfsd NFSv4.1 client teardown and blocked-lock handling, reached by remote COMPOUND RPCs on the in-kernel NFS server (TCP/UDP 2049). A network client drives EXCHANGE_ID, CREATE_SESSION, OPEN, blocking LOCK, DESTROY_SESSION, and DESTROY_CLIENTID into __destroy_client().
AC:L - The attacker controls both sides of the race: one client holds a conflicting lock while another queues a blocked lock, then DESTROY_CLIENTID races with lock-grant/CB_NOTIFY_LOCK or the laundromat freeing that lockowner. Concurrent NFS requests create the race, and it can be retried.
PR:N - Typical nfsd deployments use AUTH_SYS, which does not cryptographically authenticate the client. A remote peer that can reach an export can create NFSv4.1 state and issue DESTROY_CLIENTID without a local account or kernel capabilities on the server.
UI:N - Exploitation requires only attacker-sent NFS RPCs against a running nfsd export. No victim user action such as mounting a filesystem or opening a local file on the server is required.
S:U - The use-after-free occurs in kernel nfsd lock-owner state on the NFS server host and does not cross a separate security authority such as a VM, guest/host, or IOMMU boundary.
C:H - This is a use-after-free of the nfs4_lockowner slab object. Reclaiming the freed owner lets an attacker control later reads of so_client and related pointers in remove_blocked_locks(), yielding a kernel information-disclosure primitive.
I:H - The same UAF is exploitable for integrity: the freed lockowner includes so_ops function pointers and lo_blocked list heads, so heap reuse can hijack control flow or corrupt list pointers for an arbitrary kernel write.
A:H - The bug is a kernel use-after-free of the lock owner and was observed as a NULL dereference in remove_blocked_locks(), which can oops or panic nfsd and take down the server.
CVSS 3.1