Sceawere

Vulnerability Detail

CVE-2026-89708UPDATED Verified Sceawere Triage Sources: NVD / CISA KEV

NFSD Use-After-Free in Callback

Vulnerability Metadata

Severity
Critical
Score / CVSS
9.8
Creation Date
1d ago
Vendor
Linux
Product
Linux
Attack Type
N/A
Vector String
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Attack Complexity
LOW

Narrative and Response

Description

In the Linux kernel, the following vulnerability has been resolved: nfsd: RCU-protect cl_cb_session to fix use-after-free on session teardown After a DESTROY_SESSION the per-session teardown path can free a session while rpciod still holds an inflight callback rpc_task that dereferences clp->cl_cb_session. nfsd4_probe_callback_sync() flushes cl_callback_wq, but once nfsd4_run_cb_work() has called rpc_call_async() the rpc_task lives on rpciod; flushing the workqueue does not wait for it. rpc_shutdown_client() does drain rpciod tasks, but uses a 1-second wait_event_timeout — tasks stuck in rpc_delay() (e.g. 2-second NFS4ERR_DELAY retries) can outlive the drain. destroy path rpciod ------------ ------ unhash_session(ses) nfsd4_probe_callback_sync(clp) flush_workqueue(cl_callback_wq) /* returns; rpc_task still live */ nfsd4_put_session_locked(ses) free_session(ses) -> kfree(ses) nfsd4_cb_sequence_done() reads cb_clp->cl_cb_session /* freed slab */ A second window exists in nfsd4_process_cb_update(). When __nfsd4_find_backchannel() returns NULL because unhash_session() has already removed the destroyed session from cl_sessions, setup_callback_client() takes the v4.1 early return so clp->cl_cb_session = ses never fires and the field retains a pointer to the about-to-be-freed session. Fix both by converting cl_cb_session to an RCU-protected pointer: - Move the cl_cb_session = ses assignment in setup_callback_client() to after rpc_create() succeeds, so it is only published when a working backchannel exists. Clear cl_cb_session on the error return in nfsd4_process_cb_update(). Both stores use rcu_assign_pointer(). - Annotate cl_cb_session with __rcu. All rpciod-side readers use rcu_read_lock()/rcu_dereference() and check for NULL, bailing to the appropriate error or requeue path: encode_cb_sequence4args(), decode_cb_sequence4resok(), nfsd41_cb_get_slot(), nfsd41_cb_release_slot(), nfsd4_cb_prepare(), and nfsd4_cb_sequence_done(). - Switch __free_session() from kfree() to kfree_rcu() so the session slab is not reclaimed until after an RCU grace period, guaranteeing that rpciod readers inside rcu_read_lock() never dereference freed memory. - Pass the session pointer to the nfsd_cb_seq_status and nfsd_cb_free_slot tracepoints instead of having them re-read cl_cb_session. - nfsd4_cb_prepare() calls rpc_exit() when the session is NULL, routing through the done/release path to requeue the callback.

Executive Summary

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Executive Summary Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

Technical Details

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Detailed Technical Analysis Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

Mitigations

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Remediation & Mitigations Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

References

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Intelligence References Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

Additional Metadata

{
  "score": "9.8",
  "pubDate": "2026-09-11T20:19:58.140Z",
  "pubdate": "2026-09-11T20:19:58.140Z",
  "executiveSummary": "A use-after-free vulnerability exists in the Linux kernel's nfsd component during session teardown.\nThe flaw occurs because the cl_cb_session pointer can be accessed by the rpciod workqueue even after the session memory has been deallocated following a DESTROY_SESSION operation.\nThis vulnerability impacts NFSv4.1 backchannel operations, potentially leading to kernel memory corruption, system instability, or arbitrary code execution.\nAn attacker capable of triggering NFSv4.1 callback operations can exploit this race condition to induce a use-after-free scenario.\nExploitation requires the ability to initiate and destroy NFS sessions, combined with precise timing to ensure the rpciod thread references stale memory pointers during the teardown sequence.",
  "technicalDetails": "The root cause of this vulnerability is a race condition between the NFSD session teardown path and the asynchronous backchannel processing handled by the rpciod workqueue.\nSpecifically, nfsd4_probe_callback_sync() flushes the cl_callback_wq, but this mechanism fails to wait for inflight rpc_task objects that have already been handed off to rpciod.\nBecause rpc_shutdown_client() uses a limited wait_event_timeout, tasks involved in retries (e.g., NFS4ERR_DELAY) can persist past the point where the session is freed via kfree() in __free_session().\nThe attack flow proceeds as follows: 1) An attacker initiates a DESTROY_SESSION operation. 2) The server unhashes the session and triggers nfsd4_probe_callback_sync(). 3) The teardown path proceeds to free the session memory. 4) Simultaneously, a dangling rpc_task in the rpciod context attempts to dereference the now-freed clp->cl_cb_session pointer.\nA secondary vector exists within nfsd4_process_cb_update(), where a race involving the assignment of cl_cb_session can leave the pointer referencing a memory region slated for imminent deallocation if setup_callback_client() encounters an error.\nThe exploitation allows an attacker to manipulate kernel memory by triggering callback sequences that dereference dangling pointers. Because the session object slab is immediately reclaimed, the dereference occurs on memory that may have been repurposed by the kernel, leading to unpredictable system behavior.\nThe vulnerable components reside within the NFSv4.1 state management logic in the Linux kernel, specifically affecting how callbacks are synchronized with session lifetime management."
}
CVE-2026-89708: NFSD Use-After-Free in Callback (CRITICAL Severity, CVSS: 9.8) | Sceawere