HIGH Introduced in 4.8
nfsd ModeCheck Panic
CVE-2026-89711
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H
KernelScan AI7.5HIGH
01Description
In the Linux kernel, the following vulnerability has been resolved: NFSD: remove flawed WARN_ON_ONCE from nfsd_mode_check The header for commit e75b23f9e323 ("nfsd: check d_can_lookup in fh_verify of directories") details the assumption that justified adding the WARN_ON_ONCE to nfsd_mode_check(), that assumption is invalid (in the case of NFS reexport). When NFSD exports an NFS filesystem it is very possible for nfsd_mode_check() to encounter a @dentry that doesn't have i_op->lookup (see nfs_fhget()'s NFS_ATTR_FATTR_MOUNTPOINT and NFS_ATTR_FATTR_V4_REFERRAL handling, and d_flags_for_inode()). So remove nfsd_mode_check()'s WARN_ON_ONCE(). The nfserr_notdir return on that branch must stay. It guards the subsequent lookup_one_unlocked() -> __lookup_slow() path, which calls inode->i_op->lookup() with no NULL check, so returning nfserr_notdir is what keeps a client LOOKUP into such a @dentry from dereferencing a NULL method pointer.
02KernelScan AI Analysis
Risk summary
An NFS client can trigger a kernel panic on a host running nfsd when it re-exports an NFS filesystem. The panic occurs because a WARN_ON_ONCE fires on a legitimate code path involving NFS mountpoints or referrals, which can be triggered by normal client LOOKUP operations.
Vulnerability analysis
When the kernel NFS server re-exports an NFS filesystem, directory entries representing NFS mountpoints or referrals lack a lookup inode operation. The server's mode-checking code contained a debug assertion that assumed all directories it sees must support lookup, which is not true for re-exported NFS filesystems. A client performing a LOOKUP into such a directory triggers the assertion, causing a kernel warning that, depending on configuration (panic_on_warn), can crash the system. The fix removes the flawed assertion while keeping the error return that prevents a subsequent NULL pointer dereference in the lookup path. The vulnerability is reachable from any NFS client that can access an export on the affected server, requiring no special privileges beyond network access to the NFS service.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.10 | 4.8 | 5.10.270 | ae251937c6f0 |
| 6.1 | 4.8 | 6.1.188 | 9f4434893a27 |
| 6.6 | 4.8 | 6.6.157 | 2ef131323999 |
| 6.12 | 4.8 | 6.12.109 | b55b4d880bb0 |
| 7.2 | 4.8 | 7.2.4 | a275de3bac56 |
| mainline | 4.8 | 7.3-rc1 | aa0cf48a448c |
| 6.18 | 4.8 | 6.18.50 | 7ef182a8fe9c |
| 5.15 | 4.8 | 5.15.221 | e145e8d67a5d |
| cip/6.12 | 4.8 | 6.12.111-cip32 | b55b4d880bb0 |