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 AF69E17BA9 for ; Wed, 2 Apr 2025 14:00:46 +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=1743602446; cv=none; b=m1frtnbCyHXNo0C9UyfPsuZePjXZiXBhiRtgLAaxco5eZuLoymOpr86WM1Gl3VYvewRUebhAhyqy0sOri6WyFCweprrte+xims++BTZIfusr+byzvDZhGR3ypmdTxH01TuRGk0CMQmh/rwX6hcy4ZAs1/hxLvdMcBIw/3wRdd3s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743602446; c=relaxed/simple; bh=dtS5Pp4LWhqGWnW4efyxHVMx3Y/0Cwcd7+1WKFxQ250=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=JyWHYFXOgC7U8siwJ6tMA2NQQWW/9HyBgMGIOrN63EmtF0ssULpI8m712m6o3s9DDo5ALBxQWO56uuwOA/RmiHdgduehhHA50s+blLnrDuEWxztoHNFuKGNClhWEh8uo6KhmOlSjgHJvIAPFdACPuc2lIbot3vulWviWmeGXON0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ea3ZSYgZ; 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="ea3ZSYgZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C3ED1C4CEE7; Wed, 2 Apr 2025 14:00:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1743602446; bh=dtS5Pp4LWhqGWnW4efyxHVMx3Y/0Cwcd7+1WKFxQ250=; h=From:To:Cc:Subject:Date:Reply-to:From; b=ea3ZSYgZeSyYUVDm3zABWqFMDYZqYNSbdgrgUp4huojaPHAjHnUYqdsPzCMWbs7/a OkqhuT+moOoVLu2xrbvbLk0vEckGyZ5sXMNeAXcPuHyuh+/XLt3IbOfidbuD3dlLWb yKmdOCNudwD2mLvIqYR979AjMuSM62RYAr57m/aA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-21994: ksmbd: fix incorrect validation for num_aces field of smb_acl Date: Wed, 2 Apr 2025 14:59:15 +0100 Message-ID: <2025040214-CVE-2025-21994-44bf@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=2366; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=dtS5Pp4LWhqGWnW4efyxHVMx3Y/0Cwcd7+1WKFxQ250=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlvnTZnX5a+VL84wlzPQ1pyoVuF+inj9f+etnh3sS26W vHb5ZxERywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExktxHDgrXPBHaqCMQmNG6t vz3/+PkN5Us+lTLMs973LCTX34KzYOW5qg3eGedXF3uzAwA= 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 incorrect validation for num_aces field of smb_acl parse_dcal() validate num_aces to allocate posix_ace_state_array. if (num_aces > ULONG_MAX / sizeof(struct smb_ace *)) It is an incorrect validation that we can create an array of size ULONG_MAX. smb_acl has ->size field to calculate actual number of aces in request buffer size. Use this to check invalid num_aces. The Linux kernel CVE team has assigned CVE-2025-21994 to this issue. Affected and fixed versions =========================== Fixed in 6.1.132 with commit 9c4e202abff45f8eac17989e549fc7a75095f675 Fixed in 6.6.85 with commit d0f87370622a853b57e851f7d5a5452b72300f19 Fixed in 6.12.21 with commit a4cb17797a5d241f1e509cb5b46ed95a80c2f5fd Fixed in 6.13.9 with commit f6a6721802ac2f12f4c1bbe839a4c229b61866f2 Fixed in 6.14 with commit 1b8b67f3c5e5169535e26efedd3e422172e2db64 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-21994 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/smbacl.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/9c4e202abff45f8eac17989e549fc7a75095f675 https://git.kernel.org/stable/c/d0f87370622a853b57e851f7d5a5452b72300f19 https://git.kernel.org/stable/c/a4cb17797a5d241f1e509cb5b46ed95a80c2f5fd https://git.kernel.org/stable/c/f6a6721802ac2f12f4c1bbe839a4c229b61866f2 https://git.kernel.org/stable/c/1b8b67f3c5e5169535e26efedd3e422172e2db64