CVE-2026-89708
kernel: nfsd: RCU-protect cl_cb_session to fix use-after-free on session teardown
Overview
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.
Source: OX vulnerability database
Severity
9.8 · CRITICAL
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Affected packages · 0
No registry package. This ID affects operating system packages only.
Operating systems · 62 fixes
Oracle Linux 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 9 | kernel-uek +34 | 6.12.0-207.111.5.1.el9uek |
Photon OS 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 5.0 | bpftool +10 | 6.12.111-1.ph5 |
Red Hat 3 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 7 | bpftool +25 | affected |
| 8 | bpftool +45 | affected |
| 9 | bpftool +106 | affected |
amazon linux 1 release · 3 packages
| Release | Package | Fixed in |
|---|---|---|
| 2023 | kernel-livepatch-6-12-111-136-204 +1 | 1:1.0-0.amzn2023 |
| 2023 | bpftool6-12 +16 | 1:6.12.111-136.204.amzn2023 |
| 2023 | bpftool6-18 +17 | 1:6.18.51-120.162.amzn2023 |
debian 4 releases · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| 11 | linux | affected |
| 12 | linux | affected |
| 12 | linux-6-12 | 6.12.111-1~deb12u1 |
| 13 | linux | 6.12.111-1 |
| 14 | linux | 7.2.6-1 |
echo 1 release · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| linux | 1 | |
| linux-6-12 | 6.12.111-1~deb12u1 |
openSUSE 1 release · 1 package
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Tumbleweed | kernel-devel +3 | 7.2.7-1.1 | openSUSE-SU-2026:11880-1 |
ubuntu 5 releases · 33 packages
| Release | Package | Fixed in |
|---|---|---|
| 18.04-ESM | linux +12 | affected |
| 20.04-ESM | linux +21 | affected |
| 22.04 | linux +17 | affected |
| 22.04 | linux-oracle-6-8 | 6.8.0-1067.71~22.04.1 |
| 22.04 | linux-ibm-6-8 | 6.8.0-1069.70~22.04.1 |
| 22.04 | linux-aws-6-8 | 6.8.0-1069.74~22.04.1 |
40 more rows
References
- access.redhat.com https://access.redhat.com/security/cve/CVE-2026-89708
- git.kernel.org https://git.kernel.org/linus/01c5d5f58a5db9b0ee5afba2e49d3157788687b2 (7.3-rc1)
- git.kernel.org https://git.kernel.org/pub/scm/linux/security/vulns.git/plain/cve/published/2026/CVE-2026-89708.mbox
- git.kernel.org https://git.kernel.org/stable/c/01c5d5f58a5db9b0ee5afba2e49d3157788687b2
- git.kernel.org https://git.kernel.org/stable/c/13bdd486c3aad4fc19e6d8b9c3556a4b4c190b25
- git.kernel.org https://git.kernel.org/stable/c/2775ec1d617e665eab71ce0f13ab1f7959713a2b
- git.kernel.org https://git.kernel.org/stable/c/f164eb52b6f3cbf40f07fe379f9f421f88e02f76
- linux.oracle.com https://linux.oracle.com/cve/CVE-2026-89708.html
- linux.oracle.com https://linux.oracle.com/errata/ELSA-2026-500374.html
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2026-89708
Show all 25 references
- ubuntu.com https://ubuntu.com/security/notices/USN-8959-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8960-1
- ubuntu.com https://ubuntu.com/security/notices/USN-9002-1
- ubuntu.com https://ubuntu.com/security/notices/USN-9019-1
- ubuntu.com https://ubuntu.com/security/notices/USN-9020-1
- ubuntu.com https://ubuntu.com/security/notices/USN-9021-1
- ubuntu.com https://ubuntu.com/security/notices/USN-9022-1
- ubuntu.com https://ubuntu.com/security/notices/USN-9023-1
- ubuntu.com https://ubuntu.com/security/notices/USN-9024-1
- ubuntu.com https://ubuntu.com/security/notices/USN-9025-1
- ubuntu.com https://ubuntu.com/security/notices/USN-9026-1
- ubuntu.com https://ubuntu.com/security/notices/USN-9039-1
- ubuntu.com https://ubuntu.com/security/notices/USN-9040-1
- ubuntu.com https://ubuntu.com/security/notices/USN-9066-1
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2026-89708
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.