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 AD9CE1DC9B8 for ; Sun, 19 Jan 2025 11:53:38 +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=1737287618; cv=none; b=NTsV1p02ATGZEI+u9yj6dcK8losf6WgLXaUlmciU4/TMM9w9HG+dygDWwwWD+B15/8a11zrzLMEN80PDPvaBLr8WL/mVsBjVl2LqQBaQ+A31ckXUTX9FYNWHtJm2/uZ1R3FpiHPFs8E9W4R39eHZ8R5FYQ+FKCX63h6TT2DS/K8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737287618; c=relaxed/simple; bh=eE9kNgsspjqxeyXuGbKYf1Ny6Kxxm5FR/2fJbISl2f0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=DBgN4F3r8GLRr2PAX5OAXEfZpSARzpgHc3DSMqWSFwfDF8e4fwr3LVzZnqt0CN3OnApVdBdIrvLqkwP+cevDnXdm//CVx9KtcBuqKxkWZq1JXCf3EANMkRDespALK3OYMJsMwz4SrX1AsBDAvDDs4NAnmC3hTw9VF1qRaMP+u5g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=hLGcj4YT; 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="hLGcj4YT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 052A8C4CED6; Sun, 19 Jan 2025 11:53:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1737287618; bh=eE9kNgsspjqxeyXuGbKYf1Ny6Kxxm5FR/2fJbISl2f0=; h=From:To:Cc:Subject:Date:Reply-to:From; b=hLGcj4YTbsTcw22z5N3ek78Qso1z+AUjkK4pjq4QHYtJnRI4TI6Cn7Y5MlubOXmup 6u1+wgB1o4ZkSBq1XGHfrXTWrFMeDTWCuVuOb1X862qrzABxHoytay9r6uJpm7D052 +t7Ki89aPorYYHeySpAEfAgeAWZ77mB1eOu8TMRg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-57925: ksmbd: fix a missing return value check bug Date: Sun, 19 Jan 2025 12:52:56 +0100 Message-ID: <2025011944-CVE-2024-57925-b738@gregkh> X-Mailer: git-send-email 2.48.1 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=2806; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=eE9kNgsspjqxeyXuGbKYf1Ny6Kxxm5FR/2fJbISl2f0=; b=owGbwMvMwCRo6H6F97bub03G02pJDOk9z3t+Mq3mXZ0eOD064FOm5vWCeNHft9VNFL8Lpdhl5 RnVVSR2xLIwCDIxyIopsnzZxnN0f8UhRS9D29Mwc1iZQIYwcHEKwESyFjDM07WbEHK/ov7Yl08/ 2RtUtVc2qC/pYFjQxBvG8s02bGHp0yVK0yc7+FY3t6QDAA== 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 a missing return value check bug In the smb2_send_interim_resp(), if ksmbd_alloc_work_struct() fails to allocate a node, it returns a NULL pointer to the in_work pointer. This can lead to an illegal memory write of in_work->response_buf when allocate_interim_rsp_buf() attempts to perform a kzalloc() on it. To address this issue, incorporating a check for the return value of ksmbd_alloc_work_struct() ensures that the function returns immediately upon allocation failure, thereby preventing the aforementioned illegal memory access. The Linux kernel CVE team has assigned CVE-2024-57925 to this issue. Affected and fixed versions =========================== Issue introduced in 6.1.71 with commit f8cf1ebb7de62c7d807707ce4abb69d483629263 and fixed in 6.1.125 with commit ee7e40f7fb17f08a8cbae50553e5c2e10ae32fce Issue introduced in 6.6 with commit 041bba4414cda37d00063952c9bff9c3d5812a19 and fixed in 6.6.72 with commit 271ae0edbfc942795c162e6cf20d2bc02bd7fde4 Issue introduced in 6.6 with commit 041bba4414cda37d00063952c9bff9c3d5812a19 and fixed in 6.12.10 with commit 2976e91a3e569cf2c92c9f71512c0ab1312fe965 Issue introduced in 6.6 with commit 041bba4414cda37d00063952c9bff9c3d5812a19 and fixed in 6.13-rc7 with commit 4c16e1cadcbcaf3c82d5fc310fbd34d0f5d0db7c Issue introduced in 5.15.145 with commit 6f0207218c4c125f5bf32055ac4220b4ef3b7e67 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-2024-57925 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/ee7e40f7fb17f08a8cbae50553e5c2e10ae32fce https://git.kernel.org/stable/c/271ae0edbfc942795c162e6cf20d2bc02bd7fde4 https://git.kernel.org/stable/c/2976e91a3e569cf2c92c9f71512c0ab1312fe965 https://git.kernel.org/stable/c/4c16e1cadcbcaf3c82d5fc310fbd34d0f5d0db7c