{"id":"CVE-2026-89689","revision":"a1636406148242cd832f0a32a8e6812c","records":[{"revision":"a1636406148242cd832f0a32a8e6812c","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-89689","aliases":[],"title":"nfsd: don't free session slots that are still in use","description":"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.","state":0,"publishedAt":"2026-09-11T19:46:09.976+00:00","modifiedAt":"2026-10-19T08:51:02.559+00:00","affected":[{"ecosystem":"Vendor product","name":"Linux","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"product\": \"Linux\",\n                    \"vendor\": \"Linux\",\n                    \"defaultStatus\": \"unaffected\",\n                    \"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\n                    \"programFiles\": [\n                        \"fs/nfsd/nfs4state.c\"\n                    ],\n                    \"versions\": [\n                        {\n                            \"version\": \"fc8738c68d0bbf5033dd98b4f63d277ecbd49fd7\",\n                            \"lessThan\": \"72d40b103bb03f0124d3a3c8f71a30cbafaf6afa\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"fc8738c68d0bbf5033dd98b4f63d277ecbd49fd7\",\n                            \"lessThan\": \"b449b134e7762ddf98653a4b1d3e76d2d212ea64\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"fc8738c68d0bbf5033dd98b4f63d277ecbd49fd7\",\n                            \"lessThan\": \"f5d22e372f4ac3eb287037a488c29691d52a6330\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        }\n                    ]\n                }"},{"ecosystem":"Vendor product","name":"Linux","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"product\": \"Linux\",\n                    \"vendor\": \"Linux\",\n                    \"defaultStatus\": \"affected\",\n                    \"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\n                    \"programFiles\": [\n                        \"fs/nfsd/nfs4state.c\"\n                    ],\n                    \"versions\": [\n                        {\n                            \"version\": \"6.14\",\n                            \"status\": \"affected\"\n                        },\n                        {\n                            \"version\": \"0\",\n                            \"lessThan\": \"6.14\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"6.18.50\",\n                            \"lessThanOrEqual\": \"6.18.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"7.2.4\",\n                            \"lessThanOrEqual\": \"7.2.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"7.3\",\n                            \"lessThanOrEqual\": \"*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"original_commit_for_fix\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"severity":"CRITICAL"}],"references":["https://git.kernel.org/stable/c/72d40b103bb03f0124d3a3c8f71a30cbafaf6afa","https://git.kernel.org/stable/c/b449b134e7762ddf98653a4b1d3e76d2d212ea64","https://git.kernel.org/stable/c/f5d22e372f4ac3eb287037a488c29691d52a6330"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-89689","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-89689","identifiers":["CVE-2026-89689"]},"retained":false,"historicalAffected":[]}],"coverage":[]}