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 5AA02252299 for ; Tue, 20 May 2025 16:02:58 +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=1747756979; cv=none; b=eKxXi0aWxyPtKhcW7rC5WYsh6txmcAnkMH5F3egJPflBqjt89y5a3OPDD9sZx3uuPUclOM2ibge4Vy3YEm0nqF/rq0I+SJfKSpDASr+FfdoAs3bS+osEoiI26EO1sNBwZN9UPXtaBlA7fQtTMpSZoktMfJsCa06R/rUNTR4871g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747756979; c=relaxed/simple; bh=DUajyrsS5vC5LjMNskcCYZ/W6r6LbLWd8/W74Jm9hpo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=WOahtQrfNU46/zn/4RhcpVTabmfRDaSBx2NqHE+t3Jq9SrC4QSLZ3eukIo3U7r4VxZIhVvnEL4KYHkDoaZ5JSPzA1R1ZaspfQ9BZOKSoahglAOO/PSAW+R905X71BEMTCGNqNv4fQRsG9fJN9uknQIg1XAcXcDJsR7q5CQXmtlY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=hbXnQ5g/; 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="hbXnQ5g/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5A96BC4CEE9; Tue, 20 May 2025 16:02:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1747756978; bh=DUajyrsS5vC5LjMNskcCYZ/W6r6LbLWd8/W74Jm9hpo=; h=From:To:Cc:Subject:Date:Reply-to:From; b=hbXnQ5g/GsUgrGS+3Gm+/dDLJNvwudK0MZfvDbQyZ9aeesxFHqQ/BNrktC46YJMUD kg57vFuycx8gGN2l6EdbVVCYv59Rbvw8DTwS1qA/mtMCiuH1SePpzWDNCX4g6WJzLJ XxKSx2/3eMOdowwb9JHCKvnVbnPkYd4U+5pkZhho= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-37962: ksmbd: fix memory leak in parse_lease_state() Date: Tue, 20 May 2025 18:02:16 +0200 Message-ID: <2025052005-CVE-2025-37962-9f38@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=2861; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=OZGUI1dSp9hACBwABv/ZkSFEAzl4qSYjAnwujWDJdQ0=; b=owGbwMvMwCRo6H6F97bub03G02pJDBk6y2sFEvV57wd92qXsv2n16hWNb30YXnGmTfkYLyxQr tXEt/toRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExEy4phfuL9CJOvGyL1JMND Jr9kOSetfHF1I8McftXmVYzCE4oVlpQFaczPvhVx5YIpAA== 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 memory leak in parse_lease_state() The previous patch that added bounds check for create lease context introduced a memory leak. When the bounds check fails, the function returns NULL without freeing the previously allocated lease_ctx_info structure. This patch fixes the issue by adding kfree(lreq) before returning NULL in both boundary check cases. The Linux kernel CVE team has assigned CVE-2025-37962 to this issue. Affected and fixed versions =========================== Issue introduced in 6.1.134 with commit 629dd37acc336ad778979361c351e782053ea284 and fixed in 6.1.139 with commit facf22c1a394c1e023dab5daf9a494f722771e1c Issue introduced in 6.6.87 with commit 60b7207893a8a06c78441934931a08fdad63f18e and fixed in 6.6.91 with commit af9e2d4732a548db8f6f5a90c2c20a789a3d7240 Issue introduced in 6.12.23 with commit 800c482c9ef5910f05e3a713943c67cc6c1d4939 and fixed in 6.12.29 with commit 2148d34371b06dac696c0497a98a6bf905a51650 Issue introduced in 6.14.2 with commit 9a1b6ea955e6c7b29939a6d98701202f9d9644ec and fixed in 6.14.7 with commit 829e19ef741d9e9932abdc3bee5466195e0852cf Issue introduced in 6.15-rc1 with commit bab703ed8472aa9d109c5f8c1863921533363dae and fixed in 6.15-rc6 with commit eb4447bcce915b43b691123118893fca4f372a8f Issue introduced in 6.13.11 with commit a41cd52f00907a040ca22c73d4805bb79b0d0972 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-37962 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/facf22c1a394c1e023dab5daf9a494f722771e1c https://git.kernel.org/stable/c/af9e2d4732a548db8f6f5a90c2c20a789a3d7240 https://git.kernel.org/stable/c/2148d34371b06dac696c0497a98a6bf905a51650 https://git.kernel.org/stable/c/829e19ef741d9e9932abdc3bee5466195e0852cf https://git.kernel.org/stable/c/eb4447bcce915b43b691123118893fca4f372a8f