Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 9CBC624C692 for ; Tue, 20 May 2025 16:02:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747756956; cv=none; b=CxdSljw+OyqG4uaTOiD86b4YMS8vDIRLo1meFAo0h1oTXTaYDefIJnPnDC5S7dlLteHcxTJMasIohPMhQaa2P/cBlUVvAN9tPYKV6rPxSq1Csq5qAtpzsRfeo89AbWGw7NXJeWZbHAwkfoMdAP4ikR8PL5Vt2qqj43dSPmUPv24= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747756956; c=relaxed/simple; bh=jM+3+bjrAFeVeVJfsZfI9psl4ubDj2PgTjhox/qUcxs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=CIXEQJK0xI0o7i/7+B2JaHKvk9c9UCHMgUlDheVBKsI5V3vheTQhj+mRBc8cfw6PXHqvntlsvWFnNMZExOA7+j1qtrUcC7Q+/QXlSQcF8xixnC6+1du2w8Zm+Bg5SGgM/wtFz0MAJ8sPT5pfmmXE1Bl/5zQlWLkU7O4J//fPI1k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=jGicy0eD; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="jGicy0eD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9C478C4CEE9; Tue, 20 May 2025 16:02:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1747756956; bh=jM+3+bjrAFeVeVJfsZfI9psl4ubDj2PgTjhox/qUcxs=; h=From:To:Cc:Subject:Date:Reply-to:From; b=jGicy0eDHaAXT3WMqDlqcQsFwWS2uwXSi5pyx7RHHYqLlZqHq8bb/gL/OmzF+WTVh i+ns2Rs2mlqOAb4/yiXdqCH/jX+/vXMWmopH8awzD9iHlihKpTfDU0ksingjp0hKLk L27fvXNa2n+z/A3jloq+OmHNcWKtXzotH9hBtGmI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-37952: ksmbd: Fix UAF in __close_file_table_ids Date: Tue, 20 May 2025 18:02:06 +0200 Message-ID: <2025052001-CVE-2025-37952-299d@gregkh> X-Mailer: git-send-email 2.49.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2367; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=VfetY/lcuKR0xxd2gni8u4i5l4j/Bzc7H1LO5ItTE+c=; b=owGbwMvMwCRo6H6F97bub03G02pJDBk6yyu3rd4y7Wxw8EHNOMWXd9rvZf7iu9h+8t2xSMbZJ nEf/ts96YhhYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICb3MYwz+B2zaNwnvOHmxbk 7mZQebBp4Z0dHgzT1A/cOTq/f8nVvJQARY68L7e/iGYCAA== 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 UAF in __close_file_table_ids A use-after-free is possible if one thread destroys the file via __ksmbd_close_fd while another thread holds a reference to it. The existing checks on fp->refcount are not sufficient to prevent this. The fix takes ft->lock around the section which removes the file from the file table. This prevents two threads acquiring the same file pointer via __close_file_table_ids, as well as the other functions which retrieve a file from the IDR and which already use this same lock. The Linux kernel CVE team has assigned CVE-2025-37952 to this issue. Affected and fixed versions =========================== Fixed in 6.6.91 with commit fec1f9e9a650e8e7011330a085c77e7bf2a08ea9 Fixed in 6.12.29 with commit 9e9841e232b51171ddf3bc4ee517d5d28dc8cad6 Fixed in 6.14.7 with commit 16727e442568a46d9cca69fe2595896de86e120d Fixed in 6.15-rc6 with commit 36991c1ccde2d5a521577c448ffe07fcccfe104d 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-2025-37952 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/vfs_cache.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/fec1f9e9a650e8e7011330a085c77e7bf2a08ea9 https://git.kernel.org/stable/c/9e9841e232b51171ddf3bc4ee517d5d28dc8cad6 https://git.kernel.org/stable/c/16727e442568a46d9cca69fe2595896de86e120d https://git.kernel.org/stable/c/36991c1ccde2d5a521577c448ffe07fcccfe104d