CVE-2026-89669 PUBLISHED

nfsd: initialize copy-notify stateid before publishing it

Assigner: Linux
Reserved: 11.09.2026 Published: 11.09.2026 Updated: 13.09.2026

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.

Metrics

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

AV:N - The UAF is in nfsd COPY_NOTIFY (nfsd4_copy_notify/nfs4_alloc_init_cpntf_state). NFSv4.2 COPY_NOTIFY and a racing OFFLOAD_CANCEL are processed from compounds over TCP/2049 via nfsd4_proc_compound, so a remote NFS client reaches the published cpntf object over the network. AC:L - The attacker controls both sides: one compound publishes the cpntf IDR entry via COPY_NOTIFY while a concurrent OFFLOAD_CANCEL uses the leaked nn->s2s_cp_cl_id and a cyclic guessable so_id to kfree it before initialization finishes; the race is retryable on multiple session slots with no condition outside attacker control. PR:N - Default AUTH_SYS/AUTH_NULL nfsd exports do no cryptographic authentication; any host allowed by the export ACL can EXCHANGE_ID/CREATE_SESSION, OPEN a readable file, and issue COPY_NOTIFY and OFFLOAD_CANCEL. No local account or capability on the NFS server is required. UI:N - The attacking NFS client drives COPY_NOTIFY and the concurrent OFFLOAD_CANCEL on its own connections; no victim user or administrator action on the NFS server is required at attack time. S:U - The use-after-free corrupts a kmalloc'd nfs4_cpntf_state in the host kernel's nfsd copy-notify tables. Impact stays in that kernel security authority and does not cross a VM, IOMMU, or sandbox boundary. C:H - After OFFLOAD_CANCEL kfree's the object (cs_count was 1), nfsd4_copy_notify memcpy's the freed cp_stateid.cs_stid into the RPC reply; reclaim of that kmalloc slab lets the attacker disclose kernel memory. Per kernel guidance a use-after-free is C:H. I:H - The same path then writes cp_p_stateid and cp_p_clid into the freed nfs4_cpntf_state, a use-after-free write primitive usable for heap corruption and control-flow hijacking. Per kernel guidance a use-after-free is I:H. A:H - Use-after-free of nfs4_cpntf_state in an nfsd worker oopses or panics the NFS server even without full exploitation, and the attacker can repeat the concurrent RPC sequence to deny service.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from 624322f1adc58acd0b69f77a6ddc764207e97241 to e08a3dcaca0505f861e344a387f37f94d95dbdc2 (excl.)
  • affected from 624322f1adc58acd0b69f77a6ddc764207e97241 to a4d7fedcaaf33e60a01e53eafca9041ef966212f (excl.)
  • affected from 624322f1adc58acd0b69f77a6ddc764207e97241 to 4cdef96892f4fa6e70c405b6e8f2fd6972f3b64b (excl.)
  • affected from 624322f1adc58acd0b69f77a6ddc764207e97241 to 129643893b79f8a3c6b72045f933fbab5ee424ca (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • Version 5.6 is affected
  • unaffected from 0 to 5.6 (excl.)
  • unaffected from 6.12.109 to 6.12.* (incl.)
  • unaffected from 6.18.50 to 6.18.* (incl.)
  • unaffected from 7.2.4 to 7.2.* (incl.)
  • unaffected from 7.3-rc1 to * (incl.)

References