CVE-2026-93221

nfsd: convert nfsd_net boolean flags to unsigned long flags word

Published Sep 24, 2026 CVSS 3.1 · 8.1 High EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

nfsd: convert nfsd_net boolean flags to unsigned long flags word

nfsd_net contains several boolean fields that are accessed from
concurrent contexts without serialization. In particular,
nfsd4_end_grace() guards its drain path with a plain bool:

if (nn->grace_ended)
return;
nn->grace_ended = true;

The read and the write are independent, and nothing in struct
nfsd_net serializes them. At least two contexts can reach this
code with no lock held:

laundromat path
laundry_wq kworker
nfs4_laundromat()
nfsd4_end_grace()

RECLAIM_COMPLETE path
nfsd compound kthread
nfsd4_reclaim_complete()
inc_reclaim_complete()
nfsd4_end_grace()

Both callers can observe grace_ended == false on different CPUs,
both store true, and both proceed into nfsd4_record_grace_done(),
which invokes the active client_tracking_ops->grace_done callback.
For tracking ops that drain reclaim_str_hashtbl (legacy_tracking_ops
via nfsd4_recdir_purge_old, and the cld v1+ ops via
nfsd4_cld_grace_done), grace_done calls nfs4_release_reclaim(),
which walks every bucket of reclaim_str_hashtbl with no lock and
calls nfs4_remove_reclaim_record() (list_del + kfree) on each
entry. Two concurrent walkers corrupt the list and double-free
every nfs4_client_reclaim. A concurrent nfsd4_find_reclaim_client()
iterating the same bucket reads through freed memory.

A third call site exists in nfs4_state_start_net() on the
skip_grace startup path, but it runs under nfsd_mutex before any
client has connected and before the laundromat's first delayed
work fires, so it cannot race with the two callers above.

Replace the scattered boolean fields in nfsd_net with a single
unsigned long flags word and an enum nfsd_net_flag for the bit
positions. The grace_ended race is fixed by using
test_and_set_bit(), which is atomic on all architectures. The
remaining flags (grace_end_forced, in_grace, somebody_reclaimed,
track_reclaim_completes, nfsd_net_up, lockd_up) are converted to
use test_bit/set_bit/clear_bit for consistency. This avoids
sub-word cmpxchg issues on architectures like Hexagon that only
support word-sized atomic operations.

Analysis

AI-generated

Technical impact

The vulnerability resides in the Linux kernel’s NFS server module, where multiple boolean fields in the nfsd_net structure are accessed concurrently without proper synchronization. The lack of atomicity allows two independent contexts to read and modify the same flag simultaneously, leading to double-free operations and corruption of linked list structures that track reclaimable client data. This race results in heap corruption and concurrent memory misuse, which can potentially be leveraged to gain arbitrary code execution at kernel privilege level.

Affected Systems

All Linux kernel builds that compile the NFS server component and include the nfsd_net structure without the conversion to an atomic flag word are affected. The fix applies to the standard Linux kernel source and appears in commits referenced in the advisory, which are part of the official Linux distribution kernel releases beyond the original commit dates.

Risk and Exploitability

The CVSS score of 8.1 marks this flaw as high severity. The EPSS score is not available, so the likelihood of exploitation is unknown; however, the flaw introduces a classic race condition that is frequently abused by attackers for kernel escalation. It is not listed in the CISA KEV catalog. Attackers could trigger simultaneous NFS operations that cause concurrent walks of the reclaim hash table, leading to memory corruption and potential arbitrary code execution. The exploit path requires an attacker that can drive concurrent NFS client activity or manipulate server threads to induce the race.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the kernel update that implements the unsigned long flags word and atomic flag manipulation for nfsd_net; this design fix replaces the non‑atomic boolean accesses with test_and_set_bit and related operations.
  • Reboot the system or reload the NFS server after the kernel update to ensure the patch takes effect in all running NFS components.
  • If an immediate kernel upgrade is infeasible, disable the NFS server or restrict client access so that concurrent NFS operations cannot run, preventing the race that leads to memory corruption.

Generated by OpenCVE AI on September 25, 2026 at 10:58 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4904-1 linux-6.12 security update
Ubuntu USN Ubuntu USN USN-9002-1 Linux kernel (NVIDIA Tegra) vulnerabilities
Ubuntu USN Ubuntu USN USN-9019-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-9020-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9160-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-9173-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9175-1 Linux kernel (Oracle) vulnerabilities
Ubuntu USN Ubuntu USN USN-9173-2 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-9183-1 Linux kernel (FIPS) vulnerabilities
Ubuntu USN Ubuntu USN USN-9173-3 Linux kernel (NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-9174-2 Linux kernel (Low Latency NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-9191-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-9192-1 Linux kernel (NVIDIA) vulnerabilities
History
Type Values Removed Values Added
Weaknesses CWE-121
CWE-362
CWE-416
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H'}

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: nfsd: convert nfsd_net boolean flags to unsigned long flags word nfsd_net contains several boolean fields that are accessed from concurrent contexts without serialization. In particular, nfsd4_end_grace() guards its drain path with a plain bool: if (nn->grace_ended) return; nn->grace_ended = true; The read and the write are independent, and nothing in struct nfsd_net serializes them. At least two contexts can reach this code with no lock held: laundromat path laundry_wq kworker nfs4_laundromat() nfsd4_end_grace() RECLAIM_COMPLETE path nfsd compound kthread nfsd4_reclaim_complete() inc_reclaim_complete() nfsd4_end_grace() Both callers can observe grace_ended == false on different CPUs, both store true, and both proceed into nfsd4_record_grace_done(), which invokes the active client_tracking_ops->grace_done callback. For tracking ops that drain reclaim_str_hashtbl (legacy_tracking_ops via nfsd4_recdir_purge_old, and the cld v1+ ops via nfsd4_cld_grace_done), grace_done calls nfs4_release_reclaim(), which walks every bucket of reclaim_str_hashtbl with no lock and calls nfs4_remove_reclaim_record() (list_del + kfree) on each entry. Two concurrent walkers corrupt the list and double-free every nfs4_client_reclaim. A concurrent nfsd4_find_reclaim_client() iterating the same bucket reads through freed memory. A third call site exists in nfs4_state_start_net() on the skip_grace startup path, but it runs under nfsd_mutex before any client has connected and before the laundromat's first delayed work fires, so it cannot race with the two callers above. Replace the scattered boolean fields in nfsd_net with a single unsigned long flags word and an enum nfsd_net_flag for the bit positions. The grace_ended race is fixed by using test_and_set_bit(), which is atomic on all architectures. The remaining flags (grace_end_forced, in_grace, somebody_reclaimed, track_reclaim_completes, nfsd_net_up, lockd_up) are converted to use test_bit/set_bit/clear_bit for consistency. This avoids sub-word cmpxchg issues on architectures like Hexagon that only support word-sized atomic operations.
Title nfsd: convert nfsd_net boolean flags to unsigned long flags word
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-121

    Stack-based Buffer Overflow

  • CWE-362

    Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

  • CWE-416

    Use After Free

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 23, 2026, 7:59 AM
Reserved
Sep 17, 2026, 4:02 PM
Status
Received
Published
Sep 24, 2026, 4:17 PM
Modified
Nov 23, 2026, 8:17 AM