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 C7D3F20B814 for ; Tue, 1 Apr 2025 15:42:39 +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=1743522159; cv=none; b=IcsBGEUDxOp+UQBAi0UTlU9anjP3jj7MHLtf6ojc5WRER9JrxqXEyOMEuEgioATWB0z7CQAknopPhEJufHlSIrHTCYokqC0d6GfZW5OWzjxEmCO4GhaxwKWA/3IOKEBSndYg7Zxp8/6F3pdwYs48Fi9N0doxVO0pWYsrfAaAnV0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743522159; c=relaxed/simple; bh=SWeFUnI2Hpe1XfhPU917Epg2eiGuKxYc8Wsj/tfXzMw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=gSJ6orXabmsG6cwptd4POd6pZ1qePZZ+CpQxQUQd4ePL5hT6HARc7uhKQQZalJYV0YcngVeAwRdh6rgU3VPylfXM1nkLGrsOQZH8G6lACiSc3f0lTzMS4VTRn/H5wzTTCfqPYPZJpk4ENtYsQPGRwpyYU124Pro6jT7nfge4vEw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=dQD5RUrs; 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="dQD5RUrs" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E1D6C4CEE5; Tue, 1 Apr 2025 15:42:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1743522159; bh=SWeFUnI2Hpe1XfhPU917Epg2eiGuKxYc8Wsj/tfXzMw=; h=From:To:Cc:Subject:Date:Reply-to:From; b=dQD5RUrsXtN6jyxXAY3UmPMKSBpYQkkrfIPkmo2pcbgOua8veE8qRc0L+qdwcF3ZT A+W1hPlcuqOAHSNJuuHK8FOvxwI6RfW4UssTaE0ljtPatUKlbmoWl9UU5nSMyR/Zlk 9vbpg8U1fOd98J6S80dRxcqibmglZ4+g60lrTEKc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-21945: ksmbd: fix use-after-free in smb2_lock Date: Tue, 1 Apr 2025 16:40:09 +0100 Message-ID: <2025040136-CVE-2025-21945-d791@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=2167; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=SWeFUnI2Hpe1XfhPU917Epg2eiGuKxYc8Wsj/tfXzMw=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlvOHbEmqk+5+m5duuZyhGTZzU8BQGiPzoWOdx9X8SZF pentcmgI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACYiMYVhfkTkx+U9Ntk5RVku 33f89t7RXj7pHMOClbovL4ZfqtGTT3W9FcStpndT7MIXAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix use-after-free in smb2_lock If smb_lock->zero_len has value, ->llist of smb_lock is not delete and flock is old one. It will cause use-after-free on error handling routine. The Linux kernel CVE team has assigned CVE-2025-21945 to this issue. Affected and fixed versions =========================== Fixed in 6.1.131 with commit 410ce35a2ed6d0e114132bba29af49b69880c8c7 Fixed in 6.6.83 with commit 8573571060ca466cbef2c6f03306b2cc7b883506 Fixed in 6.12.19 with commit a0609097fd10d618aed4864038393dd75131289e Fixed in 6.13.7 with commit 636e021646cf9b52ddfea7c809b018e91f2188cb Fixed in 6.14 with commit 84d2d1641b71dec326e8736a749b7ee76a9599fc 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-21945 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/410ce35a2ed6d0e114132bba29af49b69880c8c7 https://git.kernel.org/stable/c/8573571060ca466cbef2c6f03306b2cc7b883506 https://git.kernel.org/stable/c/a0609097fd10d618aed4864038393dd75131289e https://git.kernel.org/stable/c/636e021646cf9b52ddfea7c809b018e91f2188cb https://git.kernel.org/stable/c/84d2d1641b71dec326e8736a749b7ee76a9599fc