KernelScan.io

HIGH Introduced in 5.6

nfsd ForeignFh Deref

CVE-2026-89696

CVSS 7.5 / 10.0 NVD

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

KernelScan AI6.5MEDIUM

01

In the Linux kernel, the following vulnerability has been resolved: nfsd: block non-SAVEFH ops after FOREIGN PUTFH to prevent NULL deref When CONFIG_NFSD_V4_2_INTER_SSC is enabled, nfsd4_putfh() can return success with fh_dentry and fh_export both NULL if fh_verify() returns nfserr_stale and putfh->no_verify is true. The NFSD4_FH_FOREIGN flag is set, but the compound dispatch loop only uses this flag to bypass the nfserr_nofilehandle check -- it does not prevent subsequent ops from running with a NULL fh_dentry. A remote client can exploit this by crafting a COMPOUND that includes an inter-SSC COPY (which causes check_if_stalefh_allowed() to set no_verify=true on the saved PUTFH) with an additional op inserted between the source PUTFH and SAVEFH. For example, SETATTR calls fh_want_write() which dereferences fh_export->ex_path.mnt without calling fh_verify() first, causing a NULL pointer dereference in the nfsd kthread. Fix this by gating the dispatch loop: when NFSD4_FH_FOREIGN is set and fh_dentry is NULL, only OP_SAVEFH (needed for the inter-SSC flow) and ops with ALLOWED_WITHOUT_FH (which don't need a resolved filehandle) may proceed. All other ops receive nfserr_stale, per RFC 7862 Section 15.2.3 which specifies that foreign filehandle validation is deferred to the consuming operation and NFS4ERR_STALE returned at that point.

02

Engine v0.6.0

Risk summary

A remote NFS client can crash the NFS server kernel thread by sending a crafted COMPOUND request that exploits a NULL pointer dereference when inter-SSC COPY support is enabled. The vulnerability requires CONFIG_NFSD_V4_2_INTER_SSC to be compiled in and the NFS server to be reachable over the network. Impact is denial of service — the server kernel oopses or panics, disrupting all NFS service.

Affectedfs/nfsd/nfs4proc.c (nfsd)

Vulnerability analysis

When the inter-server copy feature is enabled, the server can accept a filehandle for a foreign file that resolves to nothing while still reporting success. The server then allows follow-up operations to run against this missing filehandle, and some of those operations dereference it without checking, causing a kernel crash. The fix blocks most operations from running when this empty foreign filehandle is present, allowing only the specific save operation needed for the copy flow and operations that never need a filehandle to proceed; everything else gets a stale-filehandle error, deferring validation to the consuming operation as the protocol standard specifies. A remote client can trigger this by sending a crafted request that sets up an inter-server copy and inserts an extra operation before the save step; the attacker only needs to be an authorized client that can reach the NFS service, and the server must have the inter-SSC feature compiled in.

03

BranchIntroducedFixed inPatch commit
5.155.65.15.22100c84f4eec71
5.105.65.10.270ffdc844e673d
6.15.66.1.1882d9846fd1c76
6.65.66.6.157977e6f006a7a
6.125.66.12.10935f248bd40b4
6.185.66.18.50311f7d926630
7.25.67.2.4bf4d338dc862
mainline5.67.3-rc1c59738a00aa5
cip/6.125.66.12.111-cip3235f248bd40b4