{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2026-89689",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2026-89689"
  ],
  "published": "2026-09-11T19:47:07Z",
  "summary": "nfsd: don't free session slots that are still in use",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nnfsd: don't free session slots that are still in use\n\nnfsd4_sequence() can free the very slot it is currently processing.\nWhen the session shrinker has reduced se_target_maxslots below\nse_fchannel.maxreqs, the shrink path checks three conditions before\ncalling free_session_slots():\n\n  1. se_target_maxslots < maxreqs  (shrink was advertised)\n  2. slot->sl_generation == se_slot_gen  (slot is up-to-date)\n  3. seq->maxslots <= se_target_maxslots  (client acknowledges)\n\nHowever, seq->slotid is never checked against se_target_maxslots.\nA client using a slot in the range [se_target_maxslots, maxreqs) can\nsatisfy all three conditions: its slot has the current generation\n(set by a prior SEQUENCE), and it sends sa_highest_slotid <=\nse_target_maxslots to acknowledge the reduction.\n\nfree_session_slots() then kfrees every slot at index >=\nse_target_maxslots, including the caller's own slot. The function\ncontinues to write sl_seqid, sl_flags, sl_generation, and stores the\ndangling pointer in cstate->slot. Later, nfsd4_store_cache_entry()\ncopies up to maxresp_cached bytes of the compound reply into the freed\nsl_data[] array, corrupting whatever slab object now occupies that\naddress.\n\nAdditionally, a concurrent thread processing SEQUENCE on a different\nhigh-numbered slot can have its slot freed out from under it.\nNFSD4_SLOT_INUSE is set under nn->client_lock before the lock is\nreleased, so any concurrent thread past SEQUENCE will have its slot\nmarked. However, free_session_slots() does not check NFSD4_SLOT_INUSE\nbefore freeing.\n\nFix both problems by:\n 1. Checking that the current request's slotid is below the shrink\n    boundary.\n 2. Scanning slots in the to-be-freed range for NFSD4_SLOT_INUSE and\n    deferring the shrink if any are active.",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
    }
  ],
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:13",
        "name": "linux"
      },
      "versions": [
        "1:6.18.29-1+rpt1",
        "1:6.18.33-1+rpt1",
        "1:6.18.34-1+rpt1",
        "1:6.18.39-1+rpt1"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.18.29+rpt-rpi-2712",
            "binary_version": "1:6.18.29-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.29+rpt-rpi-v6",
            "binary_version": "1:6.18.29-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.29+rpt-rpi-v7",
            "binary_version": "1:6.18.29-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.29+rpt-rpi-v8",
            "binary_version": "1:6.18.29-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.29+rpt-rpi-v8-rt",
            "binary_version": "1:6.18.29-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.33+rpt-rpi-2712",
            "binary_version": "1:6.18.33-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.33+rpt-rpi-v6",
            "binary_version": "1:6.18.33-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.33+rpt-rpi-v7",
            "binary_version": "1:6.18.33-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.33+rpt-rpi-v8",
            "binary_version": "1:6.18.33-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.33+rpt-rpi-v8-rt",
            "binary_version": "1:6.18.33-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.34+rpt-rpi-2712",
            "binary_version": "1:6.18.34-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.34+rpt-rpi-v6",
            "binary_version": "1:6.18.34-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.34+rpt-rpi-v7",
            "binary_version": "1:6.18.34-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.34+rpt-rpi-v8",
            "binary_version": "1:6.18.34-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.34+rpt-rpi-v8-rt",
            "binary_version": "1:6.18.34-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.39+rpt-rpi-2712",
            "binary_version": "1:6.18.39-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.39+rpt-rpi-v6",
            "binary_version": "1:6.18.39-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.39+rpt-rpi-v7",
            "binary_version": "1:6.18.39-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.39+rpt-rpi-v8",
            "binary_version": "1:6.18.39-1+rpt1"
          },
          {
            "binary_name": "linux-image-6.18.39+rpt-rpi-v8-rt",
            "binary_version": "1:6.18.39-1+rpt1"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.18.29-1+rpt1": {
            "linux_commit": "66318c5b5cd8145a662303af12ed39ac07eb27cc",
            "upstream_version": "6.18.29",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.18.50"
          },
          "1:6.18.33-1+rpt1": {
            "linux_commit": "95b85bebbedcaedfa7ca79116ed38b7376fba412",
            "upstream_version": "6.18.33",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.18.50"
          },
          "1:6.18.34-1+rpt1": {
            "linux_commit": "c8c7494100e99ee05b11aaa4f0588a223a63d1af",
            "upstream_version": "6.18.34",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.18.50"
          },
          "1:6.18.39-1+rpt1": {
            "linux_commit": "60ea684a8ace97bb0db1a16e20753bdd6ab371ff",
            "upstream_version": "6.18.39",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.18.50"
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2026-89689"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/72d40b103bb03f0124d3a3c8f71a30cbafaf6afa"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/b449b134e7762ddf98653a4b1d3e76d2d212ea64"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/f5d22e372f4ac3eb287037a488c29691d52a6330"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-09-13T06:49:25Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 9.8,
      "cvss_v3_severity": "Critical",
      "scenario": "AV:N - The bug is in nfsd4_sequence() in the in-kernel NFSv4.1 server (fs/nfsd/nfs4state.c). A remote client reaches it by sending COMPOUND RPCs with OP_SEQUENCE over TCP/2049 after EXCHANGE_ID/CREATE_SESSION; no local access to the NFS server is required.\nAC:L - After CREATE_SESSION with multiple slots, the attacker can grow the slot table and consume DRC memory so the nfsd-DRC-slot shrinker lowers se_target_maxslots, which SEQUENCE replies report. A SEQUENCE on a high slotid with sa_highest_slotid acknowledging the shrink then kfree's that in-use slot. Slotid, maxslots, cachethis, and concurrent COMPOUNDs are attacker-controlled.\nPR:N - Typical nfsd deployments accept AUTH_SYS/AUTH_NULL without cryptographic authentication. Any host allowed by the export ACL can EXCHANGE_ID/CREATE_SESSION and then SEQUENCE (ALLOWED_WITHOUT_FH, no filehandle or OPEN required); no local account or capability on the NFS server is needed.\nUI:N - The attacking NFS client sends the EXCHANGE_ID, CREATE_SESSION, and crafted SEQUENCE compounds itself. No victim user or administrator action on the NFS server, such as mounting an export or opening a file, is required.\nS:U - The use-after-free corrupts nfsd session-slot heap objects inside the NFS server host kernel. Impact stays in that kernel security authority and does not cross a VM, IOMMU, or sandbox boundary.\nC:H - free_session_slots() kfree's the nfsd4_slot still referenced by cstate->slot. Later nfsd4_store_cache_entry() and SEQUENCE processing read the freed object, including sl_cred. Slab reuse of the DRC slot (up to 2048-byte sl_data) enables arbitrary kernel memory disclosure per UAF guidance.\nI:H - After the kfree, nfsd4_sequence() writes sl_seqid, sl_flags, and sl_generation through the dangling pointer, and nfsd4_store_cache_entry() copies up to maxresp_cached bytes of the compound reply into freed sl_data[] and runs free_svc_cred() on reused memory, yielding a kernel heap write/arbitrary-free primitive.\nA:H - Use-after-free of the in-use session slot oopses or panics nfsd when the dangling cstate->slot is dereferenced or when concurrent SEQUENCE threads hit a freed slot. The attacker can repeat the SEQUENCE compounds to deny NFS service and take down the host."
    }
  }
}
