Cloudanix VulnDB

CVE-2026-89689

Critical · 9.8

CVSS

9.8

EPSS

0.6%

Published

Sep 11, 2026

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

A flaw in the Linux kernel's NFS server can let a remote attacker corrupt memory and potentially seize control of the server without any login.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Moderate
Impact
Full Compromise
Component
OS kernel
Class
Use After Free
Remediation
Patch
Effort
Medium
Patch risk
Low

What it actually does

Use-after-free in nfsd4_sequence() and free_session_slots() allows freeing of active NFS session slots when se_target_maxslots is reduced, followed by writes to the freed sl_data[] buffer and dangling pointer storage in cstate->slot, resulting in slab object corruption.

Why it matters to the business

Remote attackers can crash or take full control of Linux NFS servers, leading to denial of service, data exfiltration, or lateral movement in environments that expose NFSv4 services.

How an attack unfolds

An attacker sends a crafted SEQUENCE operation referencing a high-numbered slot that satisfies the shrink conditions but remains in use; the kernel frees the slot, a concurrent or subsequent operation writes into the now-freed memory, and the resulting corruption can be leveraged for arbitrary code execution or kernel panic.

How to fix it

Apply the upstream kernel commit that adds the slotid boundary check and NFSD4_SLOT_INUSE scan before freeing; rebuild and deploy the patched kernel on all NFS servers; until patches are available, restrict NFSv4 access to trusted clients or disable NFSv4 if feasible.

How to confirm the fix worked

Confirm the presence of the two new checks (slotid below shrink boundary and NFSD4_SLOT_INUSE scan) in the nfsd4_sequence and free_session_slots paths of the running kernel source or binary; test that shrinking maxslots while active high-numbered slots exist no longer frees them.

Typical attack path

  1. Establish an NFSv4 session and obtain a slot in the range above the target shrink boundary
  2. Trigger or wait for the session shrinker to reduce se_target_maxslots
  3. Send a subsequent SEQUENCE acknowledging the reduced slot count while still referencing the high slot
  4. Cause free_session_slots() to release the in-use slot without checking NFSD4_SLOT_INUSE
  5. Trigger nfsd4_store_cache_entry() or another path that writes into the freed sl_data[]
  6. Exploit the resulting slab corruption for privilege escalation or denial of service

How to detect it

Review kernel logs for slab corruption warnings or use-after-free reports involving nfsd session structures; inspect NFSv4 traffic for SEQUENCE operations that set sa_highest_slotid below the previously advertised maxreqs while using higher slots; correlate with any sudden NFS server crashes or restarts.

What your security team should do

  • Prioritize patching all internet-facing and internal NFSv4 servers within the next maintenance window
  • Monitor for unusual NFSv4 SEQUENCE traffic patterns and high slot usage
  • Temporarily reduce se_target_maxslots only after verifying no active high slots
  • Consider network segmentation or firewall rules limiting NFSv4 to known clients until patched

The record

In the Linux kernel, the following vulnerability has been resolved: nfsd: don't free session slots that are still in use nfsd4_sequence() can free the very slot it is currently processing. When the session shrinker has reduced se_target_maxslots below se_fchannel.maxreqs, the shrink path checks three conditions before calling free_session_slots(): 1. se_target_maxslots < maxreqs (shrink was advertised) 2. slot->sl_generation == se_slot_gen (slot is up-to-date) 3. seq->maxslots <= se_target_maxslots (client acknowledges) However, seq->slotid is never checked against se_target_maxslots. A client using a slot in the range [se_target_maxslots, maxreqs) can satisfy all three conditions: its slot has the current generation (set by a prior SEQUENCE), and it sends sa_highest_slotid <= se_target_maxslots to acknowledge the reduction. free_session_slots() then kfrees every slot at index >= se_target_maxslots, including the caller's own slot. The function continues to write sl_seqid, sl_flags, sl_generation, and stores the dangling pointer in cstate->slot. Later, nfsd4_store_cache_entry() copies up to maxresp_cached bytes of the compound reply into the freed sl_data[] array, corrupting whatever slab object now occupies that address. Additionally, a concurrent thread processing SEQUENCE on a different high-numbered slot can have its slot freed out from under it. NFSD4_SLOT_INUSE is set under nn->client_lock before the lock is released, so any concurrent thread past SEQUENCE will have its slot marked. However, free_session_slots() does not check NFSD4_SLOT_INUSE before freeing. Fix both problems by: 1. Checking that the current request's slotid is below the shrink boundary. 2. Scanning slots in the to-be-freed range for NFSD4_SLOT_INUSE and deferring the shrink if any are active.

Affected packages

Ecosystem Package Introduced Fixed