KernelScan.io

CRITICAL Introduced in 7.1

nfsd FenceWorker Race

CVE-2026-89681

CVSS 9.8 / 10.0 NVD

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

KernelScan AI5.2MEDIUM

01

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.

02

Engine v0.6.0

Risk summary

A race condition in the NFS server's pNFS layout fence worker allows an NFS client to cause a kernel memory leak by exploiting a timing window during layout recall timeout handling. Each successful race leaks a layout stateid object that is never freed. An attacker can repeat this to exhaust server memory and cause an OOM denial-of-service condition.

Affectedfs/nfsd/nfs4layouts.c (nfsd pNFS layout fencing)

Vulnerability analysis

A timing gap in the NFS server's parallel-NFS layout recall cleanup lets the same background task be started twice for one layout. When a layout recall expires, the server can briefly think the cleanup is not running even though it has already begun, so it launches a second copy. This takes an extra hold on an internal tracking object that is never released, permanently leaking kernel memory. The fix adds a dedicated busy indicator that is set while the cleanup is active, preventing the duplicate start, and removes an unnecessary automatic reschedule inside the cleanup routine itself. Any NFS client that holds a parallel-NFS block or SCSI layout past the recall timeout can trigger this path; the server must be configured to support layout fencing.

03

BranchIntroducedFixed inPatch commit
7.27.17.2.4a278d361e0e8
mainline7.17.3-rc1858057122745