CVE-2026-89676: nfsd: fix stale s2s_cp_stateids IDR entry for async COPY
In the Linux kernel, the following vulnerability has been resolved:
nfsd: fix stale s2scpstateids IDR entry for async COPY
For an async COPY, nfsd4copy() called nfs4initcopystate() before dupcopyfields(), so the s2scpstateids IDR was pointed at &u->copy->cpstateid -- memory in the per-rqstp COMPOUND buffer that is reused by the next request. dupcopyfields() copies only the value into asynccopy, so the IDR slot dangled at the transient buffer for the whole background copy. Any IDR walker then dereferences reused request memory: the laundromat reads cstype from it and, if the bytes look like an expired NFS4COPYNOTIFYSTID, follows into refcountdec()/idrremove()/kfree() on garbage; managecpntfstate() has the same exposure via idrfind().
Duplicate the fields first, then register the stateid on the stable asynccopy. result->cbstateid is unchanged.
Affected Software
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Systems running the Linux kernel NFS server component (nfsd) are exposed when they handle asynchronous NFS COPY operations. The issue is in server-side state tracking for background copies.
What must occur for the vulnerable code path to be reached?
An asynchronous COPY request must cause nfsd to create copy state. Exposure persists while the background copy is active because the state IDR can retain a pointer to reused per-request memory.
What could trigger the unsafe dereference after the COPY request?
An IDR walker can dereference the stale entry. The described paths include the laundromat and manage_cpntf_state(); if reused bytes resemble an expired NFS4_COPYNOTIFY_STID, the kernel may operate on garbage through refcount decrement, IDR removal, and free operations.
What is the remediation?
Apply a kernel update containing the fix that duplicates COPY fields before registering the stateid, so the IDR points to stable async_copy storage rather than the transient request buffer. The provided stable-kernel references identify commits containing the correction.