From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 89EF358FD13 for ; Fri, 11 Sep 2026 20:02:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789156986; cv=none; b=NL1qNXHRUZFU7PIQdl3fcK2y94DhOoNXfKhck3dB0gPDVjfuFVJd/gxuh2tPzhp1L8gi23dLOH/S6jGtbLpZMbRsvmxwgEdzHK9xTEn04S6mhCQzhsrt0EMVxQoY23yGyTkLs9CAZx/kW8IYuwCnEPDXh0SkIeFZJiv8d9h35LI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789156986; c=relaxed/simple; bh=Bxvhgn5HDJHZWO6HwZG9+yr9nh/Skvfz1pWM0i9UUFo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=pqz0AIR4GOZP37ZI3wQeamcEvDO0jr90Y9JjtEIKfxr0UHFcUzW7rgOz+/LSlXVezb/PHi5DY5/Kjy8p+LTGQx4UZP86kNb9nCAFeE9fs/7AAM/690DzVImIIrBtpaPmHDZF37hfF8j5StUDpo5D1o4NUuPDFz8NYg/pWBULA+A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=hnzjIlHt; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="hnzjIlHt" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5DC9D1F00893; Fri, 11 Sep 2026 20:02:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789156957; bh=bTVcKoTJz5qytIYd6kvv81Z5nPJ7Jg3OAhOvuaNfjyw=; h=From:To:Cc:Subject:Date:Reply-To; b=hnzjIlHtQoOhzG0KSI3eTQirWUDyP+2nf94MYQxzgA+lTKCneTar4jErqePt+GtvC OQSONVVlhjxnfmE5eqxHyvg8qF/Bdf144sbu9NNeocUUXKIcv/qsxmyo9xxZ7xY/32 pRngbw+2h1FaGouvOTd7+PtylC1/XfKtiLs7mOCg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-89689: nfsd: don't free session slots that are still in use Date: Fri, 11 Sep 2026 21:46:18 +0200 Message-ID: <2026091153-CVE-2026-89689-8f8f@gregkh> X-Mailer: git-send-email 2.55.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3720; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=+zS4a5Bj1Abec85nZAbaodzg0N1Xqgr2O0dac03iCTQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDFlLIht32V6r1ttwSG6B6s7bQj8Wx3/oZns0U8l3XU5Vy JnbPFsLOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAib3oZ5un3zpVyDHo/202l p75I0D9C3a/LnmF+bMdRq1D+7q3blufMtmgRe+GT9HMBAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== 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 se_target_maxslots below se_fchannel.maxreqs, the shrink path checks three conditions before calling free_session_slots(): 1. se_target_maxslots < maxreqs (shrink was advertised) 2. slot->sl_generation == se_slot_gen (slot is up-to-date) 3. seq->maxslots <= se_target_maxslots (client acknowledges) However, seq->slotid is never checked against se_target_maxslots. A client using a slot in the range [se_target_maxslots, maxreqs) can satisfy all three conditions: its slot has the current generation (set by a prior SEQUENCE), and it sends sa_highest_slotid <= se_target_maxslots to acknowledge the reduction. free_session_slots() then kfrees every slot at index >= se_target_maxslots, including the caller's own slot. The function continues to write sl_seqid, sl_flags, sl_generation, and stores the dangling pointer in cstate->slot. Later, nfsd4_store_cache_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. NFSD4_SLOT_INUSE is set under nn->client_lock before the lock is released, so any concurrent thread past SEQUENCE will have its slot marked. However, free_session_slots() does not check NFSD4_SLOT_INUSE before freeing. Fix both problems by: 1. Checking that the current request's slotid is below the shrink boundary. 2. Scanning slots in the to-be-freed range for NFSD4_SLOT_INUSE and deferring the shrink if any are active. The Linux kernel CVE team has assigned CVE-2026-89689 to this issue. Affected and fixed versions =========================== Issue introduced in 6.14 with commit fc8738c68d0bbf5033dd98b4f63d277ecbd49fd7 and fixed in 6.18.50 with commit 72d40b103bb03f0124d3a3c8f71a30cbafaf6afa Issue introduced in 6.14 with commit fc8738c68d0bbf5033dd98b4f63d277ecbd49fd7 and fixed in 7.2.4 with commit b449b134e7762ddf98653a4b1d3e76d2d212ea64 Issue introduced in 6.14 with commit fc8738c68d0bbf5033dd98b4f63d277ecbd49fd7 and fixed in 7.3-rc1 with commit f5d22e372f4ac3eb287037a488c29691d52a6330 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-89689 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: fs/nfsd/nfs4state.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/72d40b103bb03f0124d3a3c8f71a30cbafaf6afa https://git.kernel.org/stable/c/b449b134e7762ddf98653a4b1d3e76d2d212ea64 https://git.kernel.org/stable/c/f5d22e372f4ac3eb287037a488c29691d52a6330