Get a Demo

Let's Patch It!

Book a short call with one our specialists, we'll walk you through how Endor Patches work, and ask you a few questions about your environment (like your primary programming languages and repository management). We'll also send you an email right after you fill out the form, feel free to reply with any questions you have in advance!

CVE

CVE-2026-89689

nfsd: don't free session slots that are still in use
Back to all
CVE

CVE-2026-89689

nfsd: don't free session slots that are still in use

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 setargetmaxslots below

se_fchannel.maxreqs, the shrink path checks three conditions before

calling freesessionslots():

  1. setargetmaxslots < maxreqs  (shrink was advertised)
  2. slot->slgeneration == seslot_gen  (slot is up-to-date)
  3. seq->maxslots <= setargetmaxslots  (client acknowledges)

However, seq->slotid is never checked against setargetmaxslots.

A client using a slot in the range [setargetmaxslots, maxreqs) can

satisfy all three conditions: its slot has the current generation

(set by a prior SEQUENCE), and it sends sahighestslotid <=

setargetmaxslots to acknowledge the reduction.

freesessionslots() then kfrees every slot at index >=

setargetmaxslots, including the caller's own slot. The function

continues to write slseqid, slflags, sl_generation, and stores the

dangling pointer in cstate->slot. Later, nfsd4storecache_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.

NFSD4SLOTINUSE is set under nn->client_lock before the lock is

released, so any concurrent thread past SEQUENCE will have its slot

marked. However, freesessionslots() does not check NFSD4SLOTINUSE

before freeing.

Fix both problems by:

  1. Checking that the current request's slotid is below the shrink

    boundary.

  1. Scanning slots in the to-be-freed range for NFSD4SLOTINUSE and

    deferring the shrink if any are active.

Package Versions Affected

Package Version
patch Availability
No items found.

Automatically patch vulnerabilities without upgrading

Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request

CVSS Version

Severity
Base Score
CVSS Version
Score Vector
C
H
U
9.8
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
C
H
U
0
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
C
H
U
-

Related Resources

No items found.

References

https://git.kernel.org/stable/c/72d40b103bb03f0124d3a3c8f71a30cbafaf6afa, https://git.kernel.org/stable/c/b449b134e7762ddf98653a4b1d3e76d2d212ea64, https://git.kernel.org/stable/c/f5d22e372f4ac3eb287037a488c29691d52a6330, https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/89xxx/CVE-2026-89689.json, https://nvd.nist.gov/vuln/detail/CVE-2026-89689, https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Severity

9.8

CVSS Score
0
10

Basic Information

Base CVSS
9.8
EPSS Probability
0.00649%
EPSS Percentile
0.49541%
Introduced Version
fc8738c68d0bbf5033dd98b4f63d277ecbd49fd7,6.14.0,6.19.0,0
Fix Available
f5d22e372f4ac3eb287037a488c29691d52a6330,6.18.50,7.2.4

Fix Critical Vulnerabilities Instantly

Secure your app without upgrading.
Fix Without Upgrading