Linux
nfsd: fix layout fence worker double-reference race
In the Linux kernel, the following vulnerability has been resolved: nfsd: fix layout fence worker double-reference race The workqueue core clears WORK_STRUCT_PENDING before the callback is invoked, so delayed_work_pending() in lm_breaker_timedout() can return false while the fence worker is already running. This lets the breaker take a duplicate sc_count reference and schedule a new worker that coalesces with the in-progress one. The extra reference is never put, leaking the layout stateid. Replace the racy delayed_work_pending() check with an ls_fence_inflight boolean set atomically with refcount_inc_not_zero() under ls_lock, and cleared under ls_lock before the final nfs4_put_stid() on the dispose path; the retry path intentionally retains it. Remove the self-rearm mod_delayed_work() at the top of the worker.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= f52792f484ba2316853736856dde19b7e7458861, < a278d361e0e8f242211891193d56483a7a9f47a8
- >= f52792f484ba2316853736856dde19b7e7458861, < 8580571227451384399b3fa53fcde19848c48e5a
Fixed in a278d361e0e8f242211891193d56483a7a9f47a8, 8580571227451384399b3fa53fcde19848c48e5a
- 7.1
Fixed in 0, 7.2.4, 7.3
Mitigation
Upgrade Linux to a278d361e0e8f242211891193d56483a7a9f47a8 or 8580571227451384399b3fa53fcde19848c48e5a or later.
Upgrade Linux to 0 or 7.2.4 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.