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 AA223156678 for ; Thu, 1 May 2025 13:09:11 +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=1746104951; cv=none; b=G4SpXD8+a7zr8ZIoeSveXpigo4EunbRoFaAqT/EkHaonE38t6F5g4OBpfh/NZr/N3yYXz8tuHdH4fUfPrewUVR70RawsiqZewcQM6qGcMYtALDn9C8UjjDp0xVT3y+akIbvgYl9Arjb5bVGe59+Q4N2prrrNHL1WfvjKSIS+3lw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746104951; c=relaxed/simple; bh=i5DzMt8M+fb3RUV0io08SgJilRC2TdU9FKDgbG3z4iA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=kEYU1dMNyl+ewVYAvZk4p/h03nUTNJgIqMeZT9i/zCYEDTXnu8RBISo1tsn9h5LGUrhWjUTxS4aI/qQKoepYn516GDgG6PH3uyRB9gFIkQC2Yb/WvPtfaxtEKhJj8B4k8TcExYvT1eiwMmYcw+Ebuke/CXKGhZfKt0HGL1K1PMs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=VlM87DSd; 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="VlM87DSd" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 321FFC4CEE3; Thu, 1 May 2025 13:09:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746104951; bh=i5DzMt8M+fb3RUV0io08SgJilRC2TdU9FKDgbG3z4iA=; h=From:To:Cc:Subject:Date:Reply-to:From; b=VlM87DSda4KHzcjO++6McWqa3w9yk4b6rgkm3BOgAU1RObXMz6ZdYbhy0kWGdfWpK g8Dtzp0g0yx+OWO07A/JujQTj+BkZe6OXWQfQ3GZXEzeDg+5iJY7RzxbnSj+WeCLWl ii6Rr9UQ9PCYVMtajpV4idWeHF5mtibOJuC565Bs= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-37777: ksmbd: fix use-after-free in __smb2_lease_break_noti() Date: Thu, 1 May 2025 15:07:25 +0200 Message-ID: <2025050115-CVE-2025-37777-886d@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=2060; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=BGLt9DS8cmJObjBCEl0V2CXO7QXIWLx0FpmAcOv+y0s=; b=owGbwMvMwCRo6H6F97bub03G02pJDBnCRSwODyofT9H+kZ7s++zpJ4NVF2INo7V23D/w4NKM+ 09XPqu73xHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATWcfMMN/jibMBQ9WK276p U/b0iJR1Hm3Rusgw3/k2e5wcb0V+mIj3S5mz4eulmpI0AA== 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 use-after-free in __smb2_lease_break_noti() Move tcp_transport free to ksmbd_conn_free. If ksmbd connection is referenced when ksmbd server thread terminates, It will not be freed, but conn->tcp_transport is freed. __smb2_lease_break_noti can be performed asynchronously when the connection is disconnected. __smb2_lease_break_noti calls ksmbd_conn_write, which can cause use-after-free when conn->ksmbd_transport is already freed. The Linux kernel CVE team has assigned CVE-2025-37777 to this issue. Affected and fixed versions =========================== Fixed in 6.14.4 with commit e59796fc80603bcd8569d4d2e10b213c1918edb4 Fixed in 6.15-rc3 with commit 21a4e47578d44c6b37c4fc4aba8ed7cc8dbb13de 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-37777 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/connection.c fs/smb/server/transport_tcp.c fs/smb/server/transport_tcp.h 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/e59796fc80603bcd8569d4d2e10b213c1918edb4 https://git.kernel.org/stable/c/21a4e47578d44c6b37c4fc4aba8ed7cc8dbb13de