KernelScan.io

CRITICAL Introduced in 6.10

nfsd ReplayRetry UAF

CVE-2026-89688

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 AI7.5HIGH

01

In the Linux kernel, the following vulnerability has been resolved: nfsd: drop the stateid, not the stateowner, on seqid_op replay retry In nfs4_preprocess_seqid_op() the stateid is obtained from nfsd4_lookup_stateid(), which holds a reference on the nfs4_stid (sc_count) but takes no reference on the stateowner. openlockstateid() merely casts that stid and likewise takes no reference. When nfsd4_cstate_assign_replay() returns -EAGAIN (the replay owner is being torn down, RP_UNHASHED) it has not taken a stateowner reference on that path. The error handling nevertheless called nfs4_put_stateowner(stp->st_stateowner), dropping an so_count reference the function never acquired -- risking a stateowner refcount underflow and use-after-free -- while leaking the sc_count reference held on the stid. The leaked stid reference can also stall a concurrent nfsd4_close_open_stateid() waiting for sc_count to drop. Drop the reference actually held -- the stid -- before retrying. The stateowner stays alive through the reference held by the stid. This mirrors the open path in nfsd4_process_open1(), where the put balances a reference that path explicitly holds on the stateowner.

02

Engine v0.6.0

Risk summary

An NFS client can trigger a use-after-free in the NFS server kernel by sending NFSv4 seqid replay operations that race with stateowner teardown. This can lead to kernel memory corruption, potentially allowing information disclosure, arbitrary writes, or denial of service. Any device running an NFS server reachable by clients is at risk.

Affectedfs/nfsd/nfs4state.c (nfsd NFSv4 state management)

Vulnerability analysis

In the NFS server's NFSv4 seqid operation preprocessing, when a replay retry is needed because the replay owner is being torn down concurrently, the error handling path incorrectly drops a reference on the stateowner that was never acquired, while leaking the reference on the stateid that was actually held. This causes a refcount underflow on the stateowner, leading to a use-after-free, and the leaked stateid reference can stall concurrent close operations. The fix drops the stateid reference (the one actually held) instead of the stateowner reference, keeping the stateowner alive through the stateid's reference. The vulnerability is reachable by any NFS client sending NFSv4 seqid operations to the server, requiring a race between replay retry and stateowner teardown.

03

BranchIntroducedFixed inPatch commit
6.126.106.12.10969ed78b6b947
6.186.106.18.5000843074d9b8
7.26.107.2.4f7cb90ddc021
mainline6.107.3-rc15e4627d3513e
cip/6.126.106.12.111-cip3269ed78b6b947