CVE-2026-90037 PUBLISHED

NFSD: Prevent client use-after-free during close_lru reaping

Assigner: Linux
Reserved: 11.09.2026 Published: 16.09.2026 Updated: 16.09.2026

In the Linux kernel, the following vulnerability has been resolved:

NFSD: Prevent client use-after-free during close_lru reaping

An nfs4_openowner left on nn->close_lru after its final CLOSE keeps its last closed stateid in oo_last_closed_stid, holding only a raw pointer to its nfs4_client. The laundromat reaps timed-out entries, drops nn->client_lock, and calls nfs4_put_stid(), which dereferences the client through cl_lock. Nothing pins the client across that window, so a concurrent force_expire_client() can free it and nfs4_put_stid() reads freed memory. __destroy_client() hits the same race, walking clp->cl_openowners without cl_lock.

Pin the client with cl_rpc_users before dropping client_lock, and skip clients already expiring. __destroy_client() then cleans up its own close_lru entries through release_last_closed_stateid(), so teardown no longer races the laundromat.

Metrics

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 - nfsd is the in-kernel NFS server. A remote NFSv4.0 client reaches the UAF over TCP/UDP 2049: CLOSE places the openowner on nn->close_lru, and SETCLIENTID_CONFIRM (ALLOWED_WITHOUT_FH) calls expire_client() while nfs4_laundromat() drops client_lock and nfs4_put_stid() uses the unpinned nfs4_client. AC:L - The attacker drives both sides: OPEN/CLOSE compounds fill close_lru so the laundromat drops client_lock once per nfs4_put_stid(), and concurrent SETCLIENTID_CONFIRM with matching AUTH_SYS creds replaces the client via expire_client(). FATTR4_LEASE_TIME times the window; flooding close_lru widens it; the race is retryable. PR:N - Typical nfsd deployments use AUTH_SYS/AUTH_NULL, so RPC uids are self-asserted. SETCLIENTID and SETCLIENTID_CONFIRM are ALLOWED_WITHOUT_FH; any host allowed by the export can OPEN/CLOSE and replace the client with no local account or capability on the NFS server. UI:N - The attacker issues the NFSv4.0 compounds (SETCLIENTID, OPEN, CLOSE, RENEW, SETCLIENTID_CONFIRM) itself. No administrator or other user on the victim server must mount a filesystem, write nfsdfs ctl, or otherwise interact. S:U - The use-after-free is of the nfsd nfs4_client object (client_slab) in the NFS server kernel. Impact stays in that kernel security authority and does not cross a VM, IOMMU, or sandbox boundary. C:H - After free_client() kmem_cache_free()s the nfs4_client, nfs4_put_stid() still reads cl_lock and cl_stateids. Reclaiming the mergeable client_slab object via further SETCLIENTID discloses kernel heap; a UAF is C:H. I:H - nfs4_put_stid() then takes cl_lock and idr_remove()s from cl_stateids on the freed nfs4_client, a slab UAF write concurrent with __destroy_client(). Heap reuse enables arbitrary write and control-flow hijack; a UAF is I:H. A:H - Use-after-free of nfs4_client in nfs4_put_stid() (spin_lock of freed cl_lock) oopses or panics the nfsd laundromat worker even without a full exploit, denying service of the NFS server host.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from 217526e7ecc9f6f243e976772e81eab7ab986a4c to 83dd59ac1c3455c2c7d8ddb582d980a13199b9b3 (excl.)
  • affected from 217526e7ecc9f6f243e976772e81eab7ab986a4c to e57a9ed34ea8c17e831de59b8f1a6b2d80d347a1 (excl.)
  • affected from 217526e7ecc9f6f243e976772e81eab7ab986a4c to 2330b788d732f43668b965b3105b37ceb276dfea (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • Version 3.17 is affected
  • unaffected from 0 to 3.17 (excl.)
  • unaffected from 6.18.51 to 6.18.* (incl.)
  • unaffected from 7.2.5 to 7.2.* (incl.)
  • unaffected from 7.3-rc1 to * (incl.)

References