Linux
NFSD: Prevent client use-after-free during close_lru reaping
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.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 217526e7ecc9f6f243e976772e81eab7ab986a4c, < 1d721729762a413015864b2a56d7fb86fb8efa9f
- >= 217526e7ecc9f6f243e976772e81eab7ab986a4c, < adc34b5df5c5d87043cb500b0867fc1c4ad0117e
- >= 217526e7ecc9f6f243e976772e81eab7ab986a4c, < 0763482227822f7343557f086afc382086d56c4c
- >= 217526e7ecc9f6f243e976772e81eab7ab986a4c, < 83dd59ac1c3455c2c7d8ddb582d980a13199b9b3
- >= 217526e7ecc9f6f243e976772e81eab7ab986a4c, < e57a9ed34ea8c17e831de59b8f1a6b2d80d347a1
- >= 217526e7ecc9f6f243e976772e81eab7ab986a4c, < 2330b788d732f43668b965b3105b37ceb276dfea
Fixed in 1d721729762a413015864b2a56d7fb86fb8efa9f, adc34b5df5c5d87043cb500b0867fc1c4ad0117e, 0763482227822f7343557f086afc382086d56c4c, 83dd59ac1c3455c2c7d8ddb582d980a13199b9b3, e57a9ed34ea8c17e831de59b8f1a6b2d80d347a1, 2330b788d732f43668b965b3105b37ceb276dfea
- 3.17
Fixed in 0, 6.1.191, 6.6.160, 6.12.111, 6.18.51, 7.2.5, 7.3
Mitigation
Upgrade Linux to 1d721729762a413015864b2a56d7fb86fb8efa9f or adc34b5df5c5d87043cb500b0867fc1c4ad0117e or 0763482227822f7343557f086afc382086d56c4c or 83dd59ac1c3455c2c7d8ddb582d980a13199b9b3 or e57a9ed34ea8c17e831de59b8f1a6b2d80d347a1 or 2330b788d732f43668b965b3105b37ceb276dfea or later.
Upgrade Linux to 0 or 6.1.191 or 6.6.160 or 6.12.111 or 6.18.51 or 7.2.5 or 7.3 or later.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.