CRITICAL Introduced in 4.0
nfsd LayoutStateid Race
CVE-2026-89686
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
KernelScan AI5.3MEDIUM
01Description
In the Linux kernel, the following vulnerability has been resolved: nfsd: fix BUG_ON in nfsd4_alloc_layout_stateid on racing delegation revoke nfsd4_alloc_layout_stateid reads fp->fi_deleg_file without holding fi_lock when the parent stateid is a delegation. A concurrent delegation revoke via the laundromat can clear fi_deleg_file under fi_lock, causing nfsd_file_get() to return NULL and triggering the BUG_ON. This race is client-reachable: two NFS clients can trigger it by having one hold a delegation while another opens the same file to force a recall. When the first client doesn't respond to the recall, the laundromat revokes it. A concurrent LAYOUTGET from any client using the delegation stateid hits the race window. Fix this by taking fi_lock around the fi_deleg_file read in the SC_TYPE_DELEG path, matching the locking discipline of the find_any_file() arm, and replacing the BUG_ON with a graceful error return that cleans up the partially-initialized layout stateid.
02KernelScan AI Analysis
Risk summary
A remote NFS client can trigger a kernel panic on an NFS server by racing a LAYOUTGET operation against delegation revocation. The bug requires pNFS layout support and two cooperating clients, making it exploitable on any server exporting pNFS-enabled filesystems.
Vulnerability analysis
The NFS server can crash while handling layout requests because it reads a delegation reference without synchronizing with background cleanup. A maintenance task can clear that reference at the same moment, causing the server to hit a fatal assertion and panic. The fix ensures the read is synchronized so the reference remains valid, and replaces the fatal assertion with a normal error that safely discards the incomplete request. Any NFS client that can reach the server can trigger this by coordinating with another client to force a delegation recall and revocation while sending a layout request.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 6.12 | 4.0 | 6.12.109 | c517f2749875 |
| 6.18 | 4.0 | 6.18.50 | 607a56fea772 |
| 6.6 | 4.0 | 6.6.160 | d12af460df27 |
| 7.2 | 4.0 | 7.2.4 | 97bda8b4284d |
| mainline | 4.0 | 7.3 | ca94ba361720 |
| cip/6.12 | 4.0 | 6.12.111-cip32 | c517f2749875 |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Fixed in 6.12.111-cip32 |
| cip/6.1 | Affected — no CIP fix yet (latest 6.1.189-cip61) |
| cip/6.1-rt | Affected — no CIP fix yet (latest 6.1.189-cip61-rt32) |
| cip/5.10 | Affected — no CIP fix yet (latest 5.10.271-cip78) |
| cip/5.10-rt | Affected — no CIP fix yet (latest 5.10.268-cip77-rt34) |
| cip/4.19 | Affected — no CIP fix yet (latest 4.19.325-cip136) |
| cip/4.19-rt | Affected — no CIP fix yet (latest 4.19.325-cip136-rt50) |
| cip/4.4 | Affected — no CIP fix yet (latest 4.4.302-cip115) |
| cip/4.4-rt | Affected — no CIP fix yet (latest 4.4.302-cip115-rt63) |