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 B5441312837 for ; Wed, 24 Jun 2026 16:34:38 +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=1782318879; cv=none; b=a5u6ug5/F5VwAENh3zJGZiUK8zg9K8EuDPJBLogp23xfsn0a+Af2pPhk271x7FE1fUb4t2a1KPtivG37qj3gl1aRjXraIAWPnGC6JahFLMkJqWBQjKnMQFMIwLLRmJuR21KMCRqzhghN9QF7CQtHdVALn1YkLCdyAgYH9je+r3U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782318879; c=relaxed/simple; bh=FQDqcA+UHmMfzLH6VUwc4wWrzh2/dAaUJZoqkNdOG1s=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=QDfvLDNqRGJelcN25J/iIchmBgadEm03T3iATeLxzYt6DpucID7Qmu0PuV29I+f4yecUdUM4eUut28PLgEGlbq8DzPVGKE5gFGh+XbQcENGNeLwZwlvJSfeccUBocLNNnQPAKzj/2fTemCAljr0mwt5QsPYD5dDxHpOmZT0a+hA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=qcCU3LDJ; 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="qcCU3LDJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 069A81F000E9; Wed, 24 Jun 2026 16:34:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1782318878; bh=Ho4POLxpaxXjQJICYurZoPzscnuxr0zYGmLTGsTHXco=; h=From:To:Cc:Subject:Date:Reply-To; b=qcCU3LDJLSPxjoTF11vMGAlmFF9eQg0rMGuZVQa7RthhZKTIEa+c6tRnN0IW4GoY/ jDTEiv5tJjsXXEo6M+pvjY2HXbR7mbXjafl3jzd7nmEuH+AZGA2lBzT8fy3ksX7+ZZ LmUK5JH8m+QWYsF5jHitXVx58LERw4+rdfP1juVI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-52996: ksmbd: fix durable fd leak on ClientGUID mismatch in durable v2 open Date: Wed, 24 Jun 2026 17:30:20 +0100 Message-ID: <2026062445-CVE-2026-52996-c02d@gregkh> X-Mailer: git-send-email 2.54.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=4011; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=d6m4ebOkF/rbsAfJc+ZZCfELUBXBU+GJzLCcbeGP4ps=; b=owGbwMvMwCRo6H6F97bub03G02pJDFk2rL/M1hkLnjuibHJwnl3XE6tJGQsPlGnZSbMLhwm/Z Q4WdTnTEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABPxfs2wYO3MS+4qvPN03n2X OZS8I6fv971L4gwLTiTmtu3PivhWdonBKFfa4MRzngplAA== 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: fix durable fd leak on ClientGUID mismatch in durable v2 open ksmbd_lookup_fd_cguid() returns a ksmbd_file with its refcount incremented via ksmbd_fp_get(). parse_durable_handle_context() in the DURABLE_REQ_V2 case properly releases this reference on every path inside the ClientGUID-match branch, either by calling ksmbd_put_durable_fd() or by transferring ownership to dh_info->fp for a successful reconnect. However, when an entry exists in the global file table with the same CreateGuid but a different ClientGUID, the code simply falls through to the new-open path without dropping the reference obtained from ksmbd_lookup_fd_cguid(). Per MS-SMB2 section 3.3.5.9.10 ("Handling the SMB2_CREATE_DURABLE_HANDLE_REQUEST_V2 Create Context"), the server MUST locate an Open whose Open.CreateGuid matches the request's CreateGuid AND whose Open.ClientGuid matches the ClientGuid of the connection that received the request. If no such Open is found, the server MUST continue with the normal open execution phase. A CreateGuid hit with a ClientGUID mismatch is therefore the "Open not found" case: proceeding with a new open is correct, but the reference obtained purely as a side effect of the lookup must not be leaked. Repeated requests that hit this mismatch pin global_ft entries, prevent __ksmbd_close_fd() from ever running for the corresponding files, and defeat the durable scavenger, leading to long-lived resource leaks. Release the reference in the mismatch path and clear dh_info->fp so subsequent logic does not mistake a non-matching lookup result for a reconnect target. The Linux kernel CVE team has assigned CVE-2026-52996 to this issue. Affected and fixed versions =========================== Issue introduced in 6.6.32 with commit 8df4bcdb0a4232192b2445256c39b787d58ef14d and fixed in 6.6.141 with commit 407b6e699ba8b45b72cc265eed8a1bc8a7191609 Issue introduced in 6.9 with commit c8efcc786146a951091588e5fa7e3c754850cb3c and fixed in 6.12.91 with commit f31beef633fbf2b5af7805fa187a10bcff1d4b49 Issue introduced in 6.9 with commit c8efcc786146a951091588e5fa7e3c754850cb3c and fixed in 6.18.33 with commit 06f709d0e531f3e54d88665dd426be3998a774e6 Issue introduced in 6.9 with commit c8efcc786146a951091588e5fa7e3c754850cb3c and fixed in 7.0.10 with commit 8c4a0ef19c8264c150833131af34541495832cd0 Issue introduced in 6.9 with commit c8efcc786146a951091588e5fa7e3c754850cb3c and fixed in 7.1 with commit 804054d19886ac6628883d82410f6ee42a818664 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-52996 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/smb2pdu.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/407b6e699ba8b45b72cc265eed8a1bc8a7191609 https://git.kernel.org/stable/c/f31beef633fbf2b5af7805fa187a10bcff1d4b49 https://git.kernel.org/stable/c/06f709d0e531f3e54d88665dd426be3998a774e6 https://git.kernel.org/stable/c/8c4a0ef19c8264c150833131af34541495832cd0 https://git.kernel.org/stable/c/804054d19886ac6628883d82410f6ee42a818664