Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792756940; b=kTXztQYlXWqhARs6AVLJUbjWtvVRuJKkmkKpIjJfLU2y/tzNdGcOi3JHgGzalhoEo4iX tKageZdtDGGY1W996A0DWbdDvQkI4yq7QmwGjr4bPId2RsC6IgAdDC5R0t7XD8z8pY4Ku TD6CfPrLLPep16+WRsQyzZXCWPBtCypoS+qsMFrpJbBZ2/2GTOutbsV6JlziczKAT0Tig rlujQU6QylNMrpJjTeDFio61Ya0vKdt2gMhwmYop4f15FhmeyHF6wD4pvpgcrJs9GU272 lNV9iSrxxIvFrtrAOp8YINvosr+w4KTyXUI1098GEYDK0ZPaBjscqZ6LDPpxknwB8Bw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792756940; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: Reply-To:MIME-Version:Lines:X-Developer-Signature:X-Developer-Key: Content-Transfer-Encoding; bh=+/dAvaryeELYevIeOyfvlJLvJZgEZtUIg7OEd3+mMj4=; b=uicgvTCqXy+YFLsfDEEGwkdGMnrRsANZ+mbq1JnNPg30n5puhTDcpOLjE/pDPadQAvKj 7TgiGfNG4SvzuAt0oUrtY+lWoWYr5iYBTbvnPPgKkq9Q7R1QJ1wbveSnkjHwo+XSZAN4w 2H/0T/e6YrhEWZeX4VafEB1NPEmLc0ax9RXpYm6gEIodSijLBW43LmgvX7xnEFGVDk/GJ gEp/K7PbeJVylSfbMo6TjMe/XTXtrNz20bgv5OiR6VAIQ21qNhayRnSrcRIiGM6Yu4pGK 7EDoGjvaIMbgtKMphbp/SyXXWB37ENCD20D05lK1vtHdNfo5Bjfcwra5tkrOO0bYbBg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=L2OvzRk0; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AF5C8606A31D for ; Fri, 23 Oct 2026 12:02:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=L2OvzRk0 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9C5A31F01825; Fri, 23 Oct 2026 12:02:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1792756939; bh=+/dAvaryeELYevIeOyfvlJLvJZgEZtUIg7OEd3+mMj4=; h=From:To:Cc:Subject:Date:Reply-To; b=L2OvzRk0tBBcNpE65kzyxZbNfX4MNOWk+N5vZ4t2w3gUlRUQ0+AZUugtZiukhwy4G 36NAWo8Nyxb1E57gM2UI9nRcuEModMgZeGH0zAG6G+TvNkXxe0hZRvgz7qA/K3g3Ok XeseWUufs4OOrdg0otBgJkBc4jeg7d51SvJBzaQY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-98897: ksmbd: don't hold ci->m_lock while waiting for a lease break ack Date: Fri, 23 Oct 2026 13:54:10 +0200 Message-ID: <2026102309-CVE-2026-98897-95e8@gregkh> X-Mailer: git-send-email 2.56.0 Reply-To: , X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2807; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=d55H8jXIZchDSpW96X0rXvL7BRIU3HETQNA6FoD+UGc=; b=owGbwMvMwCRo6H6F97bub03G02pJDFm3vR7+UfyvWXJt6v5lRxw8UpdN3rn/QVuV7bLMifyBb +7YW09Z3hHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATef+TYcEuW3dLabXj3WyB 9u6cHd0li1YZSjHMzy0+N3GZ8CqX6/1Roh2bheuFf1ysAwA= 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: ksmbd: don't hold ci->m_lock while waiting for a lease break ack When a cifs.ko client caches a read-handle (RH) lease via deferred close and a conflicting open arrives, ksmbd breaks the lease and waits for the acknowledgment in wait_for_break_ack() for up to OPLOCK_WAIT_TIME (35s). __smb_break_all_levII_oplock() runs that wait while holding ci->m_lock for read. cifs.ko reacts to a handle-lease break by closing the deferred handle rather than sending a lease break acknowledgment. That close path (close_id_del_oplock() -> opinfo_del()) takes ci->m_lock for write and is exactly what would wake the waiter, but it blocks on the read lock held by the waiting thread. The break is then resolved only by the 35s timeout, so xfstests generic/001 takes ~78s with leases enabled versus ~4s with oplocks only. Collect the target opinfos (each pinned with a reference) while holding ci->m_lock, then break them after releasing it, matching how smb_grant_oplock() already breaks a conflicting lease using only a reference. The reference keeps the opinfo (and its conn and lease) alive across the unlocked window, and a close racing the break is handled by the existing OPLOCK_CLOSING state check. Apply the same fix to the parent lease break paths. The Linux kernel CVE team has assigned CVE-2026-98897 to this issue. Affected and fixed versions =========================== Fixed in 6.18.53 with commit 868c9038ffd4af39766d087f68c8f543a3f66635 Fixed in 7.2 with commit 27a9bc968d4ae809a3f5ca2f2b136856ee613cb4 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-98897 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/smb/server/oplock.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/868c9038ffd4af39766d087f68c8f543a3f66635 https://git.kernel.org/stable/c/27a9bc968d4ae809a3f5ca2f2b136856ee613cb4