KernelScan.io

HIGH Introduced in 7.2

nfsd PnfsFlag Bypass

CVE-2026-98250

CVSS 7.0 / 10.0 KernelScan AI

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

01

In the Linux kernel, the following vulnerability has been resolved: nfsd: fix handling of NFSEXP_PNFS in the netlink codepath The rework of how block layouts were checked moved the check for NFSEXP_PNFS out of nfsd4_setup_layout_type() and into the callers. That patch didn't account for the new call in nfsd4_setup_layout_type().

02

Engine v0.7.0

Risk summary

When an administrator configures an NFS export via the nfsd netlink interface, pNFS block layout types are set up unconditionally even when the NFSEXP_PNFS flag is not set. This can grant NFS clients direct block device access to exports where pNFS was never intended, potentially exposing data beyond the exported filesystem boundary. The issue can be triggered through the local netlink interface by any user with CAP_NET_ADMIN, which is available inside user namespaces on default kernels, and impacts NFS clients connecting to the misconfigured server.

Affectedfs/nfsd/export.c (nfsd)

Vulnerability analysis

When an NFS export is configured through the nfsd netlink interface, the code that sets up pNFS layout types is called unconditionally, without first checking whether the export's flags actually request pNFS support. This means every export created or modified via netlink silently gets block-layout pNFS enabled, even when the administrator did not set the pNFS flag. NFS clients connecting to such an export may then obtain direct block device access that was never intended, potentially bypassing file-level access controls on the underlying storage. The fix restores the missing flag check so that layout type setup only runs when the administrator has explicitly requested pNFS. The vulnerable path is reached locally through the nfsd netlink configuration interface, which requires CAP_NET_ADMIN; on default kernels this capability can be obtained within a user namespace, so unprivileged local code can potentially trigger the misconfiguration.

03

BranchIntroducedFixed inPatch commit
7.27.27.2.830335038d4e2
mainline7.27.3f76017a7663c