KernelScan.io

CRITICAL Introduced in 5.6

nfsd CopyNotify UAF

CVE-2026-89669

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: initialize copy-notify stateid before publishing it nfsd4_copy_notify() finished initializing the cpntf state after nfs4_alloc_init_cpntf_state() had already linked it into the s2s_cp_stateids IDR and the parent's sc_cp_list, with cs_count == 1 (the membership reference) and none held for the caller. A racing OFFLOAD_CANCEL (crafted cl_id == nn->s2s_cp_cl_id plus the guessable so_id) could reach manage_cpntf_state() and free the entry, turning the caller's subsequent cpn_cnr_stateid read and cp_p_stateid/cp_p_clid writes into use-after-free. The owning clientid was also only recorded after publication, so it could not gate an ownership check in that window. Record cp_p_stateid and cp_p_clid inside nfs4_alloc_init_cpntf_state() before nfs4_init_cp_state() publishes the entry, and return it with an extra reference. The caller reads the stateid under that reference and drops it with nfs4_put_cpntf_state(); on a late error the laundromat reaps the entry.

02

Engine v0.6.0

Risk summary

An NFS client can exploit a race in the NFS server's copy-notify state handling to trigger a use-after-free, potentially achieving kernel memory corruption or denial of service. Any system exporting NFSv4.2 shares to clients over the network is at risk. The attack requires sending concurrent crafted COPY_NOTIFY and OFFLOAD_CANCEL operations during a narrow initialization window.

Affectedfs/nfsd/nfs4state.c (nfsd)

Vulnerability analysis

The NFS server's copy-notify handling publishes a state tracking entry into global lookup tables before it is fully initialized and without holding a reference for the caller. A concurrent OFFLOAD_CANCEL request with a crafted client identifier and a guessable state identifier can find and free that entry during the initialization window, causing the original request to read and write freed memory. The fix moves all initialization before the entry is published and hands the caller an extra reference so the entry cannot be freed while it is still in use. This is reachable by any NFS client that can send NFSv4.2 operations to an exporting server over the network; no special server-side privileges are required beyond being an authorized client.

03

BranchIntroducedFixed inPatch commit
5.105.65.10.270863b6e995665
5.155.65.15.221d18d36395d97
6.15.66.1.1884415a692346a
6.125.66.12.109e08a3dcaca05
6.185.66.18.50a4d7fedcaaf3
6.65.66.6.1579caad13b7cfe
7.25.67.2.44cdef96892f4
mainline5.67.3129643893b79
cip/5.105.65.10.271-cip78863b6e995665
cip/6.15.66.1.189-cip614415a692346a
cip/6.1-rt5.66.1.189-cip61-rt324415a692346a
cip/6.125.66.12.111-cip32e08a3dcaca05

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/6.12Fixed in 6.12.111-cip32
cip/6.1Fixed in 6.1.189-cip61
cip/6.1-rtFixed in 6.1.189-cip61-rt32
cip/5.10Fixed in 5.10.271-cip78
cip/5.10-rtAffected — no CIP fix yet (latest 5.10.268-cip77-rt34)